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

Masquerade is required inside openvpn container #27

Open
patachi opened this issue May 25, 2020 · 0 comments
Open

Masquerade is required inside openvpn container #27

patachi opened this issue May 25, 2020 · 0 comments

Comments

@patachi
Copy link

patachi commented May 25, 2020

Setting the default route option (redirect-gateway def1) in client-side to redirect all traffic over the VPN it stays connected but nothing passes through even simple ping request.

And it fixed by adding masquerade rule inside openvpn container

docker exec -it openvpn /bin/bash
iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 172.16.0.0/12 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -j MASQUERADE

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

1 participant