You would have to enable routing and setup some Masquerading in iptables.
In FC5 to enable routing you can edit /etc/sysctl.conf
# Controls IP packet forwarding
net.ipv4.ip_forward = 1 (0 is disabled, 1 is enabled)
This changes the value in /proc/sys/net/ipv4/ip_forward, so another way you could do this is echo "1" > /proc/sys/net/ipv4/ip_forward.
But this will reset to 0 if the pc is rebooted and /etc/sysctl.conf has 0 as the setting.
Also, say you had eth0 connected to internet and eth1 connected to LAN and you wanted to route packets from the internal lan out to the internet then your basic iptables command would be
iptables -t nat -A POSTROUTING -s eth1 -o eth0 -j MASQUERADE
To try and explain this:
iptables -t nat = Work with NAT
-A POSTROUTING = Add a rule to the POSTROUTING table
-s eth1 = the source is comming from eth1
-o eth0 = the output is eth0
-j MASQUERADE = jump to (use) masquerading.
Theres more you can do to 'tune' iptables to accept this and that from here and there (lol good description hey) but the above command will get you working.
Dont know of any good sites, google should give you plenty. Or the netfilter (people who make iptables) site should help
Last edited by friskydrifter; 08-03-2006 at 10:43 PM.
|