OPENVPN Server enable NAT routing

Here you should can connect with OpenVPN server thru VPN. However general web browsing will be accomplished with direct connections that bypass the VPN.
If you want to browse web thru VPN , please continue to follow the steps below.

1. Add the following directive to the server configuration file 'server.conf'
push "redirect-gateway def1"
push "dhcp-option DNS"

2. Setting NAT routing for VPN client on server
#vi /etc/openvpn/


   # Clean the all rules
   $ipt -F
   $ipt -X
   $ipt -t nat -F
   $ipt -t nat -X

   # Enable ip_forward
   echo "1" > /proc/sys/net/ipv4/ip_forward

   # For NAT routing
   $ipt -t nat -A POSTROUTING -s -o eth0 -j MASQUERADE
   $ipt -t nat -L

#cd /etc/openvpn



vim 的取代置換功能「s」

Wi-Fi Multimedia (WMM)