use vpn for specific sites

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
mo4sa
DD-WRT Novice


Joined: 09 Jul 2019
Posts: 2

PostPosted: Tue Jul 09, 2019 12:29    Post subject: use vpn for specific sites Reply with quote
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 ? Cool
Thanks
Regards
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6856
Location: Romerike, Norway

PostPosted: Tue Jul 09, 2019 16:02    Post subject: Reply with quote
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.
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2028

PostPosted: Tue Jul 09, 2019 16:18    Post subject: Reply with quote
Also look at this post by egc:
Simple script for Policy Based OpenVPN Routing [WORKING]

_________________
Forum Guide Lines (with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips!)
How to get help the right way

Before asking for help - Read the forum guidelines AND Upgrade DD-WRT!
Adblock by eibgrad + Blocklist Collection
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6856
Location: Romerike, Norway

PostPosted: Tue Jul 09, 2019 16:32    Post subject: Reply with quote
@bushant

You are not listening. I instructed to use routing here, not PBR.
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2028

PostPosted: Tue Jul 09, 2019 17:59    Post subject: Reply with quote
Please accept my apologies. Embarassed
_________________
Forum Guide Lines (with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips!)
How to get help the right way

Before asking for help - Read the forum guidelines AND Upgrade DD-WRT!
Adblock by eibgrad + Blocklist Collection
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12835
Location: Netherlands

PostPosted: Tue Jul 09, 2019 18:40    Post subject: Reply with quote
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

So I would consider it a usefull reference Smile
(But of course I am the author Very Happy)

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum