wget http://openvpn.net/release/lzo-1.08-4.rf.src.rpm
#wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
hxxp://sohonetwork.blogspot.com/2010/08/installing-openvpn-on-centos-55-x8664.html
hxxp://nuttinu.wordpress.com/2010/07/17/installing_openvpn_on_vps_centos_5_based/
yum install rpm-build autoconf.noarch zlib-devel pam-devel openssl-devel gcc make
#####################################################################################
vi /etc/openvpn/server.conf
local 172.16.x.x
port 443
proto tcp
dev tun
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
;ca ca.crt
;cert server.crt
;key server.key
;dh dh1024.pem
server 10.10.10.0 255.255.255.0
push "redirect-gateway"
;client-config-dir /etc/openvpn/ccd
;route 172.16.1.0 255.255.255.0
;push "route 172.16.1.0 255.255.255.0"
push "dhcp-option DNS 172.16.x.x"
push "dhcp-option DOMAIN mmx.com"
ifconfig-pool-persist ipp.txt
client-to-client
keepalive 10 120
max-clients 50
comp-lzo
user nobody
group users
persist-key
persist-tun
status openvpn-status.log
verb 3
############################################################
vi /etc/sysconfig/iptables
-A POSTROUTING -o eth0 -j MASQUERADE
-A FORWARD -i eth0 -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i tun0 -o eth0 -j ACCEPT
############################################################
client.ovpn
client
dev tun
proto tcp
resolv-retry infinite
remote gateway.mmx.com 443
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
comp-lzo
verb 3
1 comment:
The information were very helpful for me, I've bookmarked this post, Please share more information about this
Thanks
Post a Comment