2
I installed and ran successfully a pptp vpn client on a ubuntu server (aws ec2).
I want to be able access certain websites through this vpn. However, still able to ssh and connect to server.
$ route -n #after connecting to vpn
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.31.0.1 0.0.0.0 UG 100 0 0 eth0
172.31.0.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0
192.168.68.35 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
209.99.22.18 172.31.0.1 255.255.255.255 UGH 0 0 0 eth0
The routing table is as above after connection. If, I make ppp0 as default gateway, i am not able to ssh to server again.
So, I want to add some rules, so that whenever an application/script request for certain web address or HTTP/HTTPS requests, it will redirect the traffic over ppp0 or the vpn connection but not other connections.
Is it possible?
Thanks in advance!