LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux gateway network file (https://www.linuxquestions.org/questions/linux-newbie-8/linux-gateway-network-file-784992/)

rcmonroig 01-27-2010 12:14 AM

Linux gateway network file
 
Hi,
Setting up a Linux router in Fedora 10. The router has an IP (192.168.1.1) for the eth0 on the internal LAN and a static registered IP for eth1 on the internet connection. All the internal LAN client PCs have gateway set to 192.168.1.1. My question is what do I set the gateway address to on eth0 and eth1 and how would I configure this in /etc/sysconfig/network?

Any help would be greatly appreciated,

Ron

sohail0399 01-27-2010 12:22 AM

You have to add route for this there is command /sbin/route

you can also see the command
man route

and utilize it according to your need.

paulsm4 01-27-2010 12:26 AM

It depends.

These articles might help:

http://www.linuxjournal.com/article/2408

http://www.cyberciti.biz/tips/linux-...etworking.html

http://ftp.utcluj.ro/pub/docs/how-to...tiple-Ethernet

rcmonroig 01-27-2010 01:03 AM

What address do I assign to GATEWAY ?
 
Thank you for your help. One of the articles was helpful. But I still need to know what IP address I would assign to GATEWAY in the network file for eth1 (internet NIC) and eth0 (LAN NIC)? I mean do I even use the GATEWAY line in eth0 /etc/sysconfig/network file?

linuxlover.chaitanya 01-27-2010 03:36 AM

If you want to set it up as router, then using iptables rules can help you out.
And using nat and masquerading rules for outgoing packets should do it. It should not matter what gateway you have set for internal card. It would masquerade all the traffic.

nimnull22 01-27-2010 09:14 AM

Quote:

Originally Posted by rcmonroig (Post 3841911)
Thank you for your help. One of the articles was helpful. But I still need to know what IP address I would assign to GATEWAY in the network file for eth1 (internet NIC) and eth0 (LAN NIC)? I mean do I even use the GATEWAY line in eth0 /etc/sysconfig/network file?

GW - it is a device through which packets goes out to the next network.
Fedora 10 needs GW, because it will send packet through it to internet. As long internet comes from eth1, default route should have GW and eth1.
Your local aria computers, also should have GW, but for them it will be Fedora 10 IP eth0.


All times are GMT -5. The time now is 04:15 PM.