Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

How to use IP tables to route ports through / around a VPN connection

Options
  • 29-11-2014 8:16pm
    #1
    Registered Users Posts: 386 ✭✭


    Hi All,

    I'm using a Netgear R6300 running DD-WRT v24-sp2 (10/27/14) giga - build build r24170.

    I have a running VPN connection to a 3rd party VPN supplier. I have specific IP addresses that I route through the VPN, but what I would like to do in conjunction, is route particular ports through the VPN, and other ports directly to my ISP. I understand that I need to use IPtables to do this, but I cannot for the life of me get my head around it.

    For example port 80 should go direct to my ISP, but port 500 should go through the VPN.

    Can anyone provide an example of how I might go about this? I have searched many sites, but cannot find / understand one that will work.

    Thanks in advance,

    SH


Comments

  • Registered Users Posts: 1,193 ✭✭✭liamo


    This thread at linuxquestions.org asks much the same question.

    From the article :
    Basically, you edit your firewall rules to mark stuff from a specific port (ssh or icq, whatever) with a number. Then you configure iproute to send everything marked with that number out the correct interface.

    It also helpfully points you to the Advanced Routing HowTo

    Hope this helps

    Liam


Advertisement