LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 11-28-2007, 01:07 PM   #1
Histamine
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 ).

TIA
 
Old 11-28-2007, 02:53 PM   #2
forrestt
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.

HTH

Forrest
 
  


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
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


All times are GMT -5. The time now is 05:10 AM.

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