LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Some help with iptables and iproute2 or route (https://www.linuxquestions.org/questions/linux-networking-3/some-help-with-iptables-and-iproute2-or-route-603049/)

Histamine 11-28-2007 01:07 PM

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

forrestt 11-28-2007 02:53 PM

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


All times are GMT -5. The time now is 07:32 PM.