Posted: Tue Jul 09, 2019 12:29 Post subject: use vpn for specific sites
Hello
My Router Is TP-Link tl-wr841n And DD-WRT Last Build Number On This
in my country Telegram is out of use and filtered by isp
i want to connect a vpn (No matter which protocol to use open vpn or sspt or l2tp or pptp or anyone i have a vpn connection on any protocol ) on my router and only telegram ip address use a vpn tunnel and another applications use a default gateway how can i do this ?
Thanks
Regards
Joined: 13 Aug 2013 Posts: 6870 Location: Romerike, Norway
Posted: Tue Jul 09, 2019 16:02 Post subject:
Enable the OpenVPN Client without redirecting the default gateway. Enter a route to Telegram via the VPN in the routing table. You don't use PBR here as that is for when different source IPs is going through the VPN.
Joined: 18 Mar 2014 Posts: 12917 Location: Netherlands
Posted: Tue Jul 09, 2019 18:40 Post subject:
Actually the thread, @bushant is referring to, is explaining how you can do destination based routing, you do not need to add routes to the routing table but can do it via the VPN like:
Quote:
Destination based routing is standard for OVPN, in the additional config you can enter destinations by IP address or URL and specify whether these should be routed through WAN or VPN e.g:
Code:
route 209.222.18.222 255.255.255.255 vpn_gateway # DNS server PIA
route 209.222.18.218 255.255.255.255 vpn_gateway # DNS server PIA
route 204.11.35.98 255.255.255.255 vpn_gateway #whatsmyip.org
route 95.85.16.212 255.255.255.255 net_gateway # ipleak.net
route 23.239.16.110 255.255.255.255 vpn_gateway #dnsleaktest.com
route 212.58.0.0 255.255.0.0 vpn_gateway #BBC
route amazon.com 255.255.255.255 net_gateway # Routing by URL only with 255.255.255.255
Further more it is explained how to ignore the redirect default gateway, which is what PBR is all about