Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-06-2013, 10:19 AM   #1
LQ Newbie
Registered: Apr 2013
Posts: 5

Rep: Reputation: Disabled
OpenVPN - route traffic based on ports?


I pay for a VPN service and I'm running an OpenVPN client on Debian. Right now settings get pushed from my VPN provider that route everything through the VPN, but I'd like to use iptables and iproute2 to mark traffic going through certain ports and route them through my regular connection instead.

I've tried to set it up myself but can't get it working. My settings, as they are pushed by the VPN server, are on pastebin. What would I need to change to get services that use ports 7000, 9999 and 6697 for instance to bypass the VPN?

Very grateful for any assistance! Thanks.
Old 05-06-2013, 03:18 PM   #2
Registered: Feb 2006
Distribution: distrohopper
Posts: 50

Rep: Reputation: 13
Old 05-07-2013, 02:50 PM   #3
Senior Member
Registered: Apr 2009
Posts: 1,593

Rep: Reputation: 138Reputation: 138
If your Linux support NetworkManager, following link can make slit VPN's configuration easy.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
openvpn push route priority over existing route lievendp Linux - Networking 0 06-22-2012 07:52 AM
Unable to route traffic based on packet content jiecenzhao Linux - Networking 1 05-08-2011 02:37 PM
OpenVPN route issues, all traffic through VPN tunnel stuartornum Linux - Server 4 03-05-2007 03:07 AM
route based on ports lhrt Linux - Networking 2 11-19-2006 11:06 PM
Can I route web traffic to 2 different hosts based on URL under 1 IP Address? Marshalle Linux - Networking 5 05-14-2005 03:02 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration