LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-27-2010, 12:14 AM   #1
rcmonroig
Member
 
Registered: Mar 2007
Location: Chandler, AZ
Distribution: Fedora 10,12,and 14
Posts: 51
Blog Entries: 1

Rep: Reputation: 15
Question 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
 
Old 01-27-2010, 12:22 AM   #2
sohail0399
Member
 
Registered: Oct 2008
Location: Pakistan, Islamabad
Distribution: CentOS, Fedora, Solaris
Posts: 154

Rep: Reputation: 23
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.
 
Old 01-27-2010, 12:26 AM   #3
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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

Last edited by paulsm4; 01-27-2010 at 12:28 AM.
 
Old 01-27-2010, 01:03 AM   #4
rcmonroig
Member
 
Registered: Mar 2007
Location: Chandler, AZ
Distribution: Fedora 10,12,and 14
Posts: 51
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Question 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?
 
Old 01-27-2010, 03:36 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
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.
 
Old 01-27-2010, 09:14 AM   #6
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Quote:
Originally Posted by rcmonroig View Post
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.
 
  


Reply

Tags
gateway, network, router


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Protect Your Network with the Linux-based Untangle Gateway LXer Syndicated Linux News 0 07-27-2009 08:50 PM
Help to set up Linux Box As a network gateway pbhat Linux - Networking 3 05-17-2009 02:41 AM
Linux Network Gateway matsko Linux - Software 2 01-29-2009 05:59 PM
Linux as file server/media gateway nashallen Linux - Newbie 4 12-19-2005 04:54 PM
Linux box as Gateway to internet for Windows Network bickyz Linux - Networking 11 11-29-2004 06:06 PM


All times are GMT -5. The time now is 02:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration