1.install
sudo -i
yum install openvpn
openvpn --genkey --secret /etc/openvpn/openvpn-key.txt
2.edit configure file
vim /etc/openvpn/openvpn.conf
port 1194
proto udp
dev tun
secret openvpn-key.txt
ifconfig 192.168.2.1 192.168.2.2
keepalive 10 120
comp-lzo
persist-key
persist-tun
status server-tcp.log
verb 3
3.restart server
service openvpn restart
then amazon secret group add inbound 1194 udp for this.
4.client download openvpn client for windows,then install it.
download openvpn。becaused i used windows8 x64 and i am in china, so i cann’t download from openvpn from official website. in here:
http://www.windows8downloads.com/win8-openvpn-x64-zpmxsfou/download.html
5.modify openvpn client.
in installpath\OpenVPN\config\
openvpn-key.txt
is same as server’s generator /etc/openvpn/openvpn-key.txt file content.
client.ovpn
dev tun
proto udp
remote YOURSERVERHERE 1194
resolv-retry infinite
nobind
secret openvpn-key.txt
ifconfig 192.168.2.2 192.168.2.1
comp-lzo
verb 3
dhcp-option DNS 8.8.8.8
redirect-gateway def1
No comments:
Post a Comment