LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IPtables: Route outgoing traffic from internal host to only go a internet interface (http://www.linuxquestions.org/questions/linux-networking-3/iptables-route-outgoing-traffic-from-internal-host-to-only-go-a-internet-interface-845619/)

predatorz 11-21-2010 07:32 AM

IPtables: Route outgoing traffic from internal host to only go a internet interface
 
Hi,

My Ubuntu Box has 3 interfaces.
eth0 (Internal 192.168.1.0/24)
eth1 (External ISP DHCP)
eth2 (External ISP Static IP)
I need the outgoing traffic to internet for 1 of the internal pc (192.168.1.10) to only go only go through eth2.

How do i write using iptables to do the above?
Thanks.

DaRkBoDoM 11-21-2010 10:47 AM

It's a routing issue, not a firewall issue.

Check google for iproute2 and "source routing"

predatorz 11-21-2010 10:13 PM

Okay thanks.

jschiwal 11-21-2010 10:38 PM

Look at Section 4.1 Simple Source Routing for an example:

http://www.linuxdocs.org/HOWTOs/Adv-...g-HOWTO-4.html

An updated version of this document may have been supplied with the iproute2 package:
file:///usr/share/doc/howto/en/html/Adv-Routing-HOWTO/index.html

predatorz 11-24-2010 09:05 AM

Thanks for the help, i managed to get it working nicely.
:D


All times are GMT -5. The time now is 10:43 PM.