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 11-28-2007, 01:07 PM   #1
LQ Newbie
Registered: Jun 2007
Posts: 20

Rep: Reputation: 0
Some help with iptables and iproute2 or route

I'm looking to isolate an ether net card in my box. I would like all masqueraded internet traffic to go out eth1, and if I want to view my web page, it comes back in through eth0. I would like to isolate eth0 so it can't be accessed just by looking up my web page. Can I add a reject or drop rule to the internal network card, which would force it to go out eth1 to eth0 which is my web page? Also how can you force 2 network cards to go out the same gateway? I want one to be masqueraded ( eth1 ) and the other stand alone ( eth0 ).

Old 11-28-2007, 02:53 PM   #2
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
You aren't making any sense. Are you running a web server that you only want accessible from your box? If so, just run it on localhost. Do you have more than one box, and you want all of them to be able to access the webserver on that box, but not other people on the internet? Set up your network and webserver to answer on only one of the ethernet cards and put a rule in your iptables to only allow access from your internal machines, dropping all others.

I'm not sure where to point you. You are using some of the correct terms, but networking doesn't work the way you are trying to make it. Each ethernet card must answer a different subnet or your machine won't know how to route packets, and will therefore not know how to get answers back from other machines.

I guess if you started over and let us know what you wanted as an outcome without trying to guess as to how to do it, the question would be easier to answer.




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
what's wrong with iptables or route utnalove Linux - Security 5 07-29-2007 07:41 PM
iproute2 (ip route), pppoe and default route lorddoskias Linux - Networking 0 05-09-2007 11:04 AM
iptables -L -v and route lag tgo Linux - Networking 4 07-24-2006 07:12 PM
STATIC Route using IPTables Milkman00 Linux - Networking 3 03-06-2003 07:47 PM
iptables and iproute2+tc source code thanhnx Linux - Networking 1 02-19-2003 07:39 AM > Forums > Linux Forums > Linux - Networking

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