LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 01:14 AM   #1
rcmonroig
Member
 
Registered: Mar 2007
Location: Chandler, AZ
Distribution: Fedora 10,12,and 14
Posts: 62
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, 01: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, 01:26 AM   #3
paulsm4
LQ 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 01:28 AM.
 
Old 01-27-2010, 02:03 AM   #4
rcmonroig
Member
 
Registered: Mar 2007
Location: Chandler, AZ
Distribution: Fedora 10,12,and 14
Posts: 62

Original Poster
Blog Entries: 1

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, 04:36 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638

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, 10: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 09:50 PM
Help to set up Linux Box As a network gateway pbhat Linux - Networking 3 05-17-2009 03:41 AM
Linux Network Gateway matsko Linux - Software 2 01-29-2009 06:59 PM
Linux as file server/media gateway nashallen Linux - Newbie 4 12-19-2005 05:54 PM
Linux box as Gateway to internet for Windows Network bickyz Linux - Networking 11 11-29-2004 07:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:59 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration