how to configure my router on linux?

I use centos4.2(RHEL4.2). I want to configure a router on linux.
My pc-router has three ethernet cards. The ip adress of the three cards are:    to internet(net1)    to acces to the net    to acces to the net
I have also set ip_forward to 1.
What else must I configure to run my router?
I want that any pc on the net can ping, or ssh to any pc on the net
When I run 'route', what must I see for my router?
Who is Participating?
Hi gdmo

Do you have any firewalls set on any of these networks at the moment or the machines you are trying to connect to.

this looks to be quite a complex network and there could be many places that this could be failing.

Try doing a traceroute from a machine on the to a machine on the

Hi gdmo,

the way i would do this would be by using iptables/ipchains.

give one of the interfaces a default gateway out to the internet.
your client machines should use the ip of your gateway linux router as their gateway
ie. gw = gw = gw =

Then using iptables/ipchains set the outbounds rules you require.
firewalls built into linux can get quiete complex and you can create quite and advance firewall allow access based on source and destination interfaces, ports, source and destination ip etc....
gdmoAuthor Commented:
I  have done what you wrote above about the gateways.
in fact, I have more than three nets.  when I issue 'route' on my pc,  I get:
[root@rato etc]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   UG    0      0        0 eth3   UG    0      0        0 eth2   UG    0      0        0 eth1   UG    0      0        0 eth0   UG    0      0        0 eth6         UG    0      0        0 eth0

But I do not succeed that a pc from the net ping another pc from the net
You wrote that I should set "the outbounds rules that I require".  I have read the doc about iptables, but I have never yet used iptables. I am a newbie in networking. Which command should I do with iptables to ping? I want that any pc on the net can ping, or ssh to any pc on the net
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.