use vpn for specific sites

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


Joined: 09 Jul 2019
Posts: 1

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: 5129
Location: Akershus, 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: 1142
Location: Indiana

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]

_________________
SUPPORTED DEVICES -- DON'T USE ROUTER DATABASE!
--IMPORTANT UPGRADE INFORMATION--Stubby DoT
Qualcomm-Atheros:
R7800 x2 kongat & BS WDS AP & Sta- R7500V2 kongat WDS STA- WNDR3700v4 BS std WDS STA- Nanostation M2 AirOS- LocoM2 AirOS
Broadcom:
R6200v2 kongac WLAN Repeater Archer C9 v1 OEM WAP
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 5129
Location: Akershus, 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: 1142
Location: Indiana

PostPosted: Tue Jul 09, 2019 17:59    Post subject: Reply with quote
Please accept my apologies. Embarassed
_________________
SUPPORTED DEVICES -- DON'T USE ROUTER DATABASE!
--IMPORTANT UPGRADE INFORMATION--Stubby DoT
Qualcomm-Atheros:
R7800 x2 kongat & BS WDS AP & Sta- R7500V2 kongat WDS STA- WNDR3700v4 BS std WDS STA- Nanostation M2 AirOS- LocoM2 AirOS
Broadcom:
R6200v2 kongac WLAN Repeater Archer C9 v1 OEM WAP
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 3787
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 R7800, Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
Install guide Linksys EA6900: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=291230
Simple PBR (Policy Based Routing) script: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318662
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN server setup guide:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum 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