Operating Systems > Linux and UNIX

RH 7.3 internet connection sharing

(1/2) > >>

ims27_8:
my uni / job work has died down for a while, so i'm starting to fiddle around with linux again. I've got red hat 7.3 installed, and i can access the internet (using my cable modem connected to eth1). I have 2 NIC's, one for the modem and one for my home network. How do i go about setting up ICS so that a windows 98 computer can access the internet over the network?

Stryker:
I will assume you are using pico as it is the easiest text editor (in my opinion) for this activity.
as root:

$ pico /etc/sysconfig/network
/*
set GATEWAY=<your private ip address for your lan for the server>

set GATEWAYDEV=ppp0 (or whatever your internet device is)

*/
CTRL+X to exit (choose yes and override the file)

pico /etc/sysctl/conf

/*
set net.ipv4.ip_forward = 1
*/
CTRL+X

pico /etc/sysconfig/ipchains

/*
at the top make sure you have:
:input ACCEPT
:forward ACCEPT
-P forward DENY
-A forward -i ppp0 -s <ipaddress>/<netmask> -j MASQ
 : output ACCEPT (There is no space there, i needed it for that silly face)
*/

CTRL+X
chkconfig ipchains on
/etc/init.d/network restart
/etc/init.d/ipchains restart

That should do it for you, on the client machines you will need to set the route to the server's ip.
for windows (i will regret saying this):
start->settings->control panel->network
doule click the interface that supports connecting to the linux router (Example: 10/100mbps ETHERNET Adapter)
click the gateway tab, type the ip address of the router.... (you know what to do here)
click the DNS Configuration tab, type in the number of the DNS server that you use to resolve addresses on the internet (I use 4.2.2.1 and 4.2.2.2)
reboot


I applogize to everyone for the windows info... I was focusing on the linux router though

[ September 25, 2002: Message edited by: Stryker ]

ims27_8:
thanks for the help, though it's not working, i must have done something wrong. A couple of questions:
do i use eth1 instead of ppp0 (my cable modem is connected to eth1, eth0 connects to the network, and in the line
-A forward -i ppp0 -s <ipaddress>/<netmask> -j MASQ
i use the ipaddress and netmask of eth1? if that's right, then i'm pretty sure i did everything right, but i'll double check. Thanks again for the help.

sporkme:
...a router

voidmain:
http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/

Navigation

[0] Message Index

[#] Next page

Go to full version