adamwalach / openvpn-web-ui

Web interface (with golang backend) for monitoring and administration of OpenVPN server
MIT License
673 stars 274 forks source link

tic for forwarding internet usage. #22

Open JDN2 opened 5 years ago

JDN2 commented 5 years ago

I can not find a proper setting to send all traffic over vpn.

6ak5 commented 4 years ago

I can not find a proper setting to send all traffic over vpn.

try to change push "route 10.8.0.0 255.255.255.0" to push "redirect-gateway" in openvpn-data/conf/server.conf

restart container's docker-compose restart

after that connect to openvpn container by id: docker exec -ti you_openvpn_container_id bash and add the following rule: iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

try connect to vpn