OpenVPN selective website route

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
mkaand
DD-WRT User


Joined: 06 Jan 2008
Posts: 307
Location: Istanbul

PostPosted: Mon May 22, 2017 19:01    Post subject: OpenVPN selective website route Reply with quote
Hello,

I use free OpenVPN service (VPNBook). I successfully made OpenVPN connection (TUNNEL not TAP). But problem is If I enable NAT it redirects all packets to tun0. If I do not enable NAT. I can not reach any website but OpenVPN connected. What I want:

I want to use my own internet for access everywhere but I want to use OpenVPN for some websites like:

pandora
wikipedia
etc.

How can I do that? Thanks.

_________________
Kaan's World | @mkaand | PLEX Archive | Trakt.tv
Sponsor
mkaand
DD-WRT User


Joined: 06 Jan 2008
Posts: 307
Location: Istanbul

PostPosted: Tue May 23, 2017 12:23    Post subject: Reply with quote
I found my own solution. If someone has better solution please share..

First I added

Code:
route-nopull


to OpenVPN Client Additional Config field.Because I do not want to send my all traffic to VPN.

Second I added these lines as startup scrip:

Code:
sleep 45
ip route add 208.85.40.0/24 dev tun1
ip route add 198.35.26.0/23 dev tun1


First one for pandora.com second one for wikipedia.org.

Now my system works smoothly. My all traffic goes thru my own ISP. Just pandora.com and wikipedia.org goes thru OpenVPN. I hope it helps someone..

_________________
Kaan's World | @mkaand | PLEX Archive | Trakt.tv
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