HRomie / obfs4proxy-openvpn-linux

Obfuscating OpenVPN traffic using obfs4proxy - Linux platform
MIT License
91 stars 18 forks source link

routing default traffic on client #8

Open william-bohannan opened 11 months ago

william-bohannan commented 11 months ago

Have a VPS server in the cloud, and would like to route all traffic on the client via the tun_obfs4 interface once the OpemVPN is up. Checked the OpenVPN website at looks like i have to do some minor adjustments as per below. Please can you confirm if below is correct as it does not seem to be working?

[cloud vps server] openvpn_server.conf.obfs4

# forward internet traffic through OpenVPN
push "redirect-gateway def1"

server iptables rules:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o tun_obfs4 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i tun_obfs4 -o eth0 -j ACCEPT
iptables -t nat -L -n -v
iptables -t filter -L FORWARD -n -v
iptables-save | sudo tee /etc/iptables/rules.v4

openvpn_client.conf.obfs4:

# forward internet traffic through OpenVPN
push "redirect-gateway def1"

client iptables rules:

iptables -t nat -A POSTROUTING -o tun_obfs4 -j MASQUERADE
iptables -t nat -L POSTROUTING -n -v
iptables-save | sudo tee /etc/iptables/rules.v4

from client:

Yisensol commented 2 months ago

Same issue,have you resolved now?