Routing one local IP through the VPN tunnel

Hello,

finally I am running Lede on my Travelrouter.
What I want to do is, route just the local client with the IP 192.168.8.244 through a established VPN Tunnel. In my OpenVPN client config, I added:

  • route-nopull

Before, everything was going through the Tunnel. Now I just want this local IP.
I am connecting via WWAN, I was already trying the policy-routing app, but it looks like that this is not working with router. I can insert my IP, but nothing will happen....
I hope that one of you have any idea to slove this problem. Thanks a lot

You should just need a single static unicast route for the /32 IP.

Hello, thank you very much for your answer
But how can I do this? I am very very new to this kind of stuff :wink:

I think you should configure your openvpn server to not push such a catch all rule and leave your client to pull rules...

My openvpn server pushes only some local subnets that i want connect to...

On which system is your server running? OpenWRT?

Hello,

Thank you very much for your answer. The problem is, that I am using a VPN offer from VpnUnlimited, so I can't configure the server.conf

Re-reading your first post. It seems like you have a VPN service from VPNUnlimited. You're not trying to route the 192.168.x.x IP; but trying to configure only that LAN IP to use the VPN.

To do so, you would A.) make an IP route on a second table, B.) and create an IP rule to use that default :

ip route default via <VPN_Interface> table 2
ip rule from 192.168.8.244 table 2 priority 2

  • Firewall: Lastly, you have to ALLOW FORWARD from 192.168.8.244 to the VPN Zone and enable Masquerade.

Hope this helps.