LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux Internet Sharing (https://www.linuxquestions.org/questions/linux-networking-3/linux-internet-sharing-110250/)

erycz 10-30-2003 01:36 AM

Linux Internet Sharing
 
I have a few XP boxes and I am also using Red Hat 8.0 in box... I want to setup an internet connection sharing using RH8 as the gateway... What shall i do?

Mara 10-30-2003 02:26 AM

Ckeck is all machines have IP in the same subnet and the IPs are local (192.168.1.x, for example). Then download the masquerading script, for example from here: http://www.tldp.org/HOWTO/IP-Masquer...FIREWALL-2.4.X
You will need to fit it to your needs and modify
Code:

#IPTABLES=/sbin/iptables
IPTABLES=/usr/local/sbin/iptables

to
Code:

IPTABLES=/sbin/iptables
#IPTABLES=/usr/local/sbin/iptables

(because your iptbales is in /sbin, not in /usr/local/sbin).

Second thing, enter the right interfaces here:
Code:

EXTIF="eth0"
INTIF="eth1"

EXTIF is the interface connected to the Internet, INTIF is connected to your local network.

After the modificatins, start the script and your Internet connection sharing should work.

Note that it's only basic scripts. If you search the site for masquerading, you'll find many more compilicated ones, with firewalling (it's a good idea).

deft0nes12 10-31-2003 12:02 PM

Quote:

EXTIF="eth0" INTIF="eth1"
so are you sayin that you need to ethernet cards? what if you have a modem that dials up...what would u put for extif=??? Besides the external interface...would the fact that its a modem and not a ethernet card change anything else???

mahadeva 10-31-2003 12:59 PM

Put ppp0

Mara 10-31-2003 04:02 PM

ppp0 is created when you dial up. From the user point of view, it's used exactly the same way as eth0 or eth1. Your configuration is probably
Code:

EXTIF="ppp0"
INTIF="eth0"



All times are GMT -5. The time now is 03:42 PM.