diff --git a/udp2raw-openvpn-config-guide.md b/udp2raw-openvpn-config-guide.md index e9fba29..bbd38a9 100644 --- a/udp2raw-openvpn-config-guide.md +++ b/udp2raw-openvpn-config-guide.md @@ -93,8 +93,23 @@ rcvbuf 2000000 ##### important txqueuelen 4000 ##### suggested ``` -# to redirect all traffic through udp2raw+openvpn +# Addtional steps to transparently redirect traffic -check this article, its essentially same: +#### at server side +run: +``` +#enable ip forward: +echo 1 >/proc/sys/net/ipv4/ip_forward -https://github.com/wangyu-/UDPspeeder/wiki/UDPspeeder-openvpn-config-guide \ No newline at end of file +#setup SNAT rule: +iptables -t nat -A POSTROUTING -s 10.222.0.0/16 ! -d 10.222.0.0/16 -j MASQUERADE +``` + +#### at client side + +add following line to the end of you OpenVPN config: + +``` +redirect-gateway def1 +route 44.55.66.77 255.255.255.255 net_gateway # change 44.55.66.77 to your server ip +``` \ No newline at end of file