LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-17-2008, 12:40 AM   #1
binu johney
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
internet connection shaaring in redhat linux 5


how to share internet connection sharing in redhat linux 5

Last edited by binu johney; 03-25-2012 at 08:32 AM.
 
Old 10-17-2008, 05:19 AM   #2
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Rep: Reputation: 37
I presume you have 2 Ethernet NICs eth0 and eth1, eth0 is connected to the gateway(modem I presume).

So you open up:
/etc/sysconfig/network-scripts/ifcfg-eth0 and input:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
HWADDR=00:80:48:EB:BC:FC
IPADDR=192.168.1.3
IPV6ADDR=
IPV6PREFIX=
IPV6_AUTOCONF=yes
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes

Or if you want to have it done by DHCP:
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:80:48:EB:BC:FC
ONBOOT=yes

And for eth1 you seek up file:
/etc/sysconfig/network-scripts/ifcfg-eth1 and input:
DEVICE=eth1
BOOTPROTO=static
BROADCAST=10.0.0.255
HWADDR=00:11:6B:94:3B:39
IPADDR=10.0.0.1
IPV6ADDR=
IPV6PREFIX=
IPV6_AUTOCONF=yes
NETMASK=255.255.255.0
NETWORK=10.0.0.0
ONBOOT=yes

This one can not be done by DHCP and you can change the IP settings, those are mine that I use.

And finally you edit /etc/sysctl.conf and change:
net.ipv4.ip_forward = 0
to
net.ipv4.ip_forward = 1

Then you connect other computers up and assign them IPs automatically, if you want to have a DHCP server as well you'll need to install it first I think at least on CentOS it is like that and start it.
 
  


Reply



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
Sharing a Dialup Internet Connection between Redhat Linux 9 and Windows XP nitpil Linux - Networking 9 03-21-2004 11:43 AM
internet connection redhat 9 mindseye Linux - Newbie 8 10-11-2003 08:14 PM
Help Wanted in setting internet LAN Connection for LINUX REDHAT a_ravichandar Linux - Networking 7 07-19-2003 12:22 PM
How Can I Make Internet Connection Sharing Server With RedHat Linux 7.3? SurfTurtle Linux - Networking 6 10-20-2002 01:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:07 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