Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routing default traffic on client #8

Open
william-bohannan opened this issue Jul 26, 2023 · 1 comment
Open

routing default traffic on client #8

william-bohannan opened this issue Jul 26, 2023 · 1 comment

Comments

@william-bohannan
Copy link

william-bohannan commented Jul 26, 2023

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:

  • can ping 10.1.0.1 (the server)
  • bwm-ng shows little to no traffic on the interface tun_obfs4
    from server:
  • can ping 10.1.0.2 (the client)
@Yisensol
Copy link

Same issue,have you resolved now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants