configure gateway

victorli used Ask the Experts™
I have a linux network which have 4 computers all installed in Linux: a front firewall, a web server, another firewall  and database server. The second firewall is for protecting db server and also acts as a gateway between the 2 subnetwork: is made up of "front firewall",   "web server", "second firewall", is made up of "second firewall" and "db server". All these are configured by my college and work very well.

My taks is to add another web server to this network, now my problem is the new server can see all computers on but not, I use "/sbin/route -n" to check the routing table and found the gateway is not there. Since I am doing the configuration remotely and the new web server did not install X, I supposed I may need to directly edit some configuration files, how to do that?

The machine is linux redhat 7.3.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2005

It sounds like the topology looks like:

                Front firewall
                    |  Web server
               Second firewall
                    |   DB server

And the new web server is in the network.

It should have a default route pointing to the "Front firewall", and a static route to the network pointing to the "Second firewall". And to see the DB server, adjustments in the configuration of the "Second firewall" will be necessary to allow traffic from the new web server to reach the DB server.
Solution Architect
you should do this:

route add -net gw ip.of.the.second.firewall

and test pinging it.

if it works, then add that line to your /etc/rc.d/rc.local file, at the end, and you're all set.


Redimido & jlevie:

Thanks for your comments and I found Redimido's comment is easy to follow and works although jlevie's comments may work as well.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial