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

Notices

Reply
 
LinkBack Search this Thread
Old 04-12-2012, 08:13 AM   #1
Tampen
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 192.168.1.1 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, 06:18 AM   #2
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 165

Rep: Reputation: 33
See http://www.linuxquestions.org/questi...erface-939475/
I think it is pretty much the same solution.
 
Old 04-19-2012, 04:08 AM   #3
Tampen
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, 08:18 AM   #4
Tampen
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 192.168.1.1 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, 10:18 PM   #5
ourfirst
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
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


All times are GMT -5. The time now is 02:25 PM.

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