If you want to use push "redirect-gateway" function, you have to type the following commands
step1: iptables -t nat -A POSTROUTING -o eth0 (change to vpn server's interface which hold the real IP) -j SNAT --to 63.127.146.199 (changed to vpn server's real IP)
step2: iptables -A FORWARD -j ACCEPT
step3: iptables -L -t nat (list all rules,have a look of result)
step4: echo 1 > /proc/sys/net/ipv4/ip_forward
----------------------------------------------------------------------------
Edit your server.conf with adding the following lines
push "dhcp-option DNS xxx.xxx.xxx.xxx" where xxx.xxx.xxx.xxx is your ISP's DNS
push "redirect-gateway"
-----------------------------------------------------------------------------
Edit client.ovpn under win7/vista with the adding the following lines for successful connection
route-method exe
route-delay 10
Finally, restart your openvpn server. Everything is supposed to be ok then! Enjoy it:) |