simple PC-based router using IPTABLES
Hi,
I need some help on using IPTABLES to setup a simple PC-based router (for LAN usage).
The PC consists of a 10/100 NIC on eth0, and a gigabit fiber NIC on eth1. The gigabit fiber NIC is connected to another fiber-based port, whereas the 10/100 NIC is connected to a 10/100 hub. Now, for all packets coming from eth0, forward it to eth1, and vice versa. Could anyone verify/suggest commands to set for this setting?
# iptables -A FORWARD -i eth0 -o eth1 # iptables -A FORWARD -i eth1 -o eth0
Is it that's all we need to do? Thanks.
Regards,
Jocelyn
---------------------------------
Do you Yahoo!?
Meet the all-new My Yahoo! – Try it today!
Quoted 6 lines · Lim Boon Ping
I need some help on using IPTABLES to setup a simple PC-based router (for LAN usage). The PC consists of a 10/100 NIC on eth0, and a gigabit fiber NIC on eth1. The gigabit fiber NIC is connected to another fiber-based port, whereas the 10/100 NIC is connected to a 10/100 hub. Now, for all packets coming from eth0, forward it to eth1, and vice versa. Could anyone verify/suggest commands to set for this setting?
You don't need to use iptables at all if you just want a router. And perhaps you want to set up a bridge, anyway.
Quoted 4 lines
# iptables -A FORWARD -i eth0 -o eth1 # iptables -A FORWARD -i eth1 -o eth0Is it that's all we need to do?
Those commands don't do anything useful.
I suggest you start here:
http://www.faqs.org/docs/iptables/
Google will also find you many, many descriptive articles on setting up routers and firewalls using netfilter/iptables.
---
Charlie