Support LQ: Use code LQ3 and save $3 on Domain Registration
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 04-12-2012, 09:13 AM   #1
LQ Newbie
Registered: Apr 2012
Posts: 3

Rep: Reputation: Disabled
How to route 2 interface one with local GW and one with VPN on the same machine.

Router----------VPN-------------Desired behaviour-------ETH
----------------NO--------------all ports execpt XXXX---ETH0
DMZ-------------Yes-------------only port XXXX----------ETH1

ETH0 192.168.1.XX uses GW to acces internet.
ETH1 192.168.1.XY uses VPN to acces internet (DMZ in local router).

So I want help how to route the traffic for port XXXX on the machine.
All traffic on port XXXX both incoming and outgoing should go trough ETH1, ETH1 is connected to an VPN and is DMZ in the router.
ETH0 is going to have all other ports on it and it is not connected to any VPN.

Is this somehow plausible? And how? Will be very happy for any help with it.

Best Regards
Old 04-13-2012, 07:18 AM   #2
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
I think it is pretty much the same solution.
Old 04-19-2012, 05:08 AM   #3
LQ Newbie
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
I will try that solution as soon as i get time next week. Will get back if it work's or not. Thank's.
Old 04-25-2012, 09:18 AM   #4
LQ Newbie
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Tried that solution must have done something wrong because when I try it the computer loses all connection to the outside world.

To simplify the question eth0 should have all internal traffic 192.168.1.X and eth 1 all traffic from internet.
ETH1 is going to be DMZ and connected to an VPN as gateway. ETH0 is going to have as gateway. Both interfaces is connected to the same network and router with static IP.

Mayde soem IP tables configuration would help to?
Old 04-25-2012, 11:18 PM   #5
LQ Newbie
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
maybe you should use iptables to add some rules.

iptables -A INPUT -i eht1 -p tcp -m tcp xxxx -j DROP
iptables -A INPUT -i eth0 -p tcp -m tcp xxxx -j ACCPET
iptables -A INPUT -i eht0 -j DROP


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
[SOLVED] vpn via route saavik Linux - Networking 7 12-07-2009 08:29 AM
packet coming through one interface route out via another interface and SNAT also saiyen2002 Linux - Networking 2 09-14-2009 07:56 PM
VPN route vkmgeek Linux - Networking 5 08-01-2008 02:55 AM
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 06:04 AM
bypass local prerouting route for external eth interface? tblack Linux - Networking 1 09-27-2004 04:47 PM

All times are GMT -5. The time now is 02:39 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