republican-creole
site Search:


 
    «« DSL Hurdles Share Tool






how-to block ads



Search for: in all FAQs
To share an Internet connection with multiple computers on the LAN first look at this picture taken from Sharing Tips.

Notice you will require two NICs (Network Interface Cards) for the computer acting as a NAT (Network Address Translation) router. The first NIC will connect your Cable/DSL modem to your Linux box, and the second would connect to a HUB or another computer on your LAN.

On your Linux computer, you will need to set up the two NICs, that is, load the drivers/modules, configure the IP address if necessary.

First, enable IP forwarding. This can be done when compiling the kernel or through sysctl. To do so through sysctl type:
echo 1 > /proc/sys/net/ipv4/ip_forward
Now for those using Linux 2.0.x kernels or ipfwadm use:
/sbin/ipfwadm -F -p deny
/sbin/ipfwadm -F -a m -W eth0 -S 192.168.0.0/24 -D 0.0.0.0/0
For those using Linux 2.2.x kernels or ipchains use:
/sbin/ipchains -P forward DENY
/sbin/ipchains -A forward -i eth0 -s 192.168.0.0/24 -j MASQ
Additional information about IPFWADM or IPChains can be found here.

For those using 2.4.x or Netfilter/iptables use:
/sbin/iptables -P FORWARD DROP
/sbin/iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
/sbin/iptables -A FORWARD -i eth0 -d 192.168.0.0/24 -j ACCEPT
/sbin/iptables -A FORWARD -o eth0 -s 192.168.0.0/24 -j ACCEPT
More information about Netfilter/IPTables can be found here.


got feedback?

by howe81 See Profile
last modified: 2002-06-12 11:09:25


Thursday, 23-May 10:26:05 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 13.5 years online © 1999-2013 dslreports.com.