Results 1 to 2 of 2
hi all,
I am hoping someone can assist me,
I have 2 external interfaces eth1 and eth2 , (and eth0 internal interface)
eth1 = Diginet
eth2 = ADSL
I need ...
- 05-10-2007 #1Just Joined!
- Join Date
- Sep 2006
- Posts
- 8
2 external interface and 1 internal routing
hi all,
I am hoping someone can assist me,
I have 2 external interfaces eth1 and eth2 , (and eth0 internal interface)
eth1 = Diginet
eth2 = ADSL
I need to route all browsing traffics (port 80, 312
through eth2 and the rest of the traffic through eth1,
I am using Debian Linux fw1 2.6.8-2-386 (i am loathed toupgrade to the 686 kernal as I have been having trouble with the apt-get upgrade, since the release of Debian ver.4 it seems to have had a problem with the lic6 file), anyway
The way I figure is that I can either do it through iptables or through squid , does anyone have any ideas or white papers on how i can do this ?
Any info will be greatly appreciated
Best regards
Captain
- 05-13-2007 #2Linux User
- Join Date
- Feb 2006
- Posts
- 484
hi
i see nobody want help you , unfortunately i am not a great iptables guru.
so you need NAT and need FORWARD
in the example:
eth1 ,eth2 external interfaces , eth0 internal
you need a setup script for iptables
i hope this will work but i am not sure and not guarantee anythingCode:############################# #!/bin/sh #setting up ip forward in the kernel echo "1" > /proc/sys/net/ipv4/ip_forward #setting up forward in iptables #these four line will set up a basic forwarding without any filtering #function iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT iptables -A FORWARD -i eth2 -o eth0 -j ACCEPT iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT iptables -A FORWARD -i eth0 -o eth2 -j ACEPPT #setting up NAT iptables -t NAT -A POSTROUTING -o eth1 -j MASQUERADE iptables -t NAT -A POSTROUTING -o eth2 -j MASQUERADE ################################


Reply With Quote
