Share an Internet Connection With Multiple Computers

Share an Internet Connection With Multiple Computers
Linux offers the ability to act as both firewall and router for 
multiple computers. You can easily set this up using iptables. 

Execute the following commands on your Linux box. This example assumes 
that eth0 is the network interface connected to the cable or DSL modem. 

# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 
# modprobe ip_conntrack_ftp 
# echo 1 > /proc/sys/net/ipv4/ip_forward 
# iptables -P INPUT DROP 

Of course, this is greatly simplified; it's just the basics to get you 
up and running quickly. 

Keep in mind that it doesn't matter what systems you're running on your 
network, be it Windows, Macs, or other Linux systems. All you need to 
do is tell those clients to use this Linux machine as the gateway.

0 comments: