Route a specific user's traffic via VPN but still allow local networking
Posted
by
wbg
on Server Fault
See other posts from Server Fault
or by wbg
Published on 2013-07-01T21:55:23Z
Indexed on
2013/07/01
23:07 UTC
Read the original article
Hit count: 193
So, I want to route certain traffic via a VPN connection and the rest via my normal Internet connection. I want to run several different programs and most of them don't support binding to a specific network interface (tun0
in my case).
I've managed to send a specific user's traffic via the VPN following the answers given here: iptables - Target to route packet to specific interface?
But unfortunately, when I run a server that connects to the Internet and has a web interface running on a local IP (127.0.0.1/192.168.0.*
), all the Internet traffic correctly goes via tun0
, but I'm unable to connect to the web interface from a local IP as a different user.
When I log in as the VPN-ified user, I can access services running on local IPs, but other users/machines can't access any servers I start.
Can anyone point me in the right direction?
© Server Fault or respective owner