From 75a8d1255ceaa5ea9fadef6b2470a9caae163489 Mon Sep 17 00:00:00 2001 From: wangyu- Date: Sun, 25 Feb 2018 10:53:56 +0800 Subject: [PATCH] Updated udp2raw openvpn config guide (markdown) --- udp2raw-openvpn-config-guide.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) 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