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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.