Click to See Complete Forum and Search --> : internal lan sharing isp connection


enzo250gto
06-04-2001, 06:08 PM
I've read the NHF and a few HOWTO's on sharing a internet connection. My question is how do I assign my linux box 2 IPs? (The one provided by my ISP which I have to use static for, and the internal LAN IP of 192.168.0.1 for my gateway.)

FoBoT
06-04-2001, 06:54 PM
from that NHF, try this

a general way to set the IP for your machines is to add the following line to /etc/rc.d/rc.local:

/sbin/ifconfig eth0 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0

You will need to do that for every machine, changing the IP address of course. Then type:

source /etc/rc.d/rc.local


this will make your internal interface/eth0 be 192.168.0.1 (the gateway you put into your other internal pc's ) and add a similar line but substite eth1 and xxx.xxx.xxx.xxx (the static ip from your isp) for the external interface going to you cable/dsl modem/box

good luck! :)