On Thursday 18 September 2003 5:30 am, Adrian Berardi wrote:
> Hi, i'm a new debian user, and without too much experience in linux.
> I'm trying to install a Debian here at home to use it as internet access
> for a couple windows PCs. Someone told me that i had to install first the
> two eth, then configure the networkcards, then install dhcp3 (for the PCs
> to get a dinamic ip), and then do NAT (iptables) Everything worked OK, but
> it is not the case of the NAT: i can access internet from de debian, but i
> dont know how to configure or what to install for access internet from the
> windows PCs through the Debian. Any comment will be kindly accepted.!
> Best regards, Adrian
>
> Adrian

Hi Adrian,

The easiest way is to give your Debian box a static ip on the "inward" NIC, 
then set the gateway in the Windoze boxes to that IP.

Then you need to use iptables for the actual NAT-ing, here is a very simple 
recipe that should make it work. Keep in mind this is not a complete 
firewall, this is just the bit you need to enable sharing the Internet 
connection:

# modprobe iptable_nat
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# echo "1" > /proc/sys/net/ipv4/ip_forward

This should work exactly as it's written, except make sure you specify the 
correct eth0 or eth1, whichever one is the "inward" card.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~
Carla Schroder
www.tuxcomputing.com
this message brought to you
by Libranet 2.8 and Kmail
~~~~~~~~~~~~~~~~~~~~~~~~~


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to