So I have a server with the public ip address of 22.214.171.124 (for example). This server is running an openvpn server, plus a bunch of other stuff that is listening on the public ip network device ports.
What I want to do is once connecting to 126.96.36.199, route all future traffic to this IP via the VPN.
So for example if I
curl 188.8.131.52:8080 it goes via the VPN connection.
I've tried adding a
push route to my server.conf like so:
push "route 184.108.40.206 255.255.255.255"
and I even tried adding an exclusion route:
push "route 220.127.116.11 255.255.255.255 net_gateway"
but I didn't seem to work. running
sudo route -n still showed the route going via my home router:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 10.8.0.1 10.8.0.5 255.255.255.255 UGH 0 0 0 tun0 10.8.0.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 18.104.22.168 192.168.1.1 255.255.255.255 UGH 0 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
Any thoughts on how I can accomplish this? I figured the problem was likely the fact that I'm trying to route traffic to the vpn server itself, via the vpn server, and thus forming some sort of infinite loop, but that's just a guess.