Simple Net Sharing
Igor Maciel Macaubas
igor.maciel@mailbr.com.br
Tue, 23 Oct 2001 17:41:14 -0300
Hi,
Yes, you have to change your gateway and DNS configuration on your windows
machines.
Put the IP adress of your linux machine as the gateway in windows machines,
and add this line in your rc.local file (in your linux machine):
echo 1 > /proc/sys/net/ipv4/ip_forward
You can run a DNS-caching-only server in your linuxserver too, and configure
your windows machine to use your dns.
And that's all.
Best regards,
Igor
--
igor.maciel@mailbr.com.br
----- Original Message -----
From: "Paulo J. Matos aka PDestroy" <pocm@rnl.ist.utl.pt>
To: <netfilter@lists.samba.org>
Sent: Tuesday, October 23, 2001 4:25 PM
Subject: Simple Net Sharing
> I have a simple network I'm trying to share. I have a cable modem
> that's connected to the net through eth0 (dynamic IP) and connected to a
> LAN of 2 computers using windows through eth0.
> I just want them to access the net without any restriction...
> A person gave me the following solution:
> ------------
> #!/bin/sh
> #
> iptables -t nat -F
> iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE
>
> #Do connection tracking
>
> insmod ip_conntrack_ftp
> insmod ip_conntrack_irc
> insmod ip_nat_ftp
> insmod ip_nat_irc
> iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT
> iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT
> iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
>
> #Done!!!!!
> ---------------
>
> But it is not working... Is this really correct, do I have to do any
> setup on the LAN (windows) machines?
>
> Best regards,
>
> --
> Paulo J. Matos aka PDestroy : pocm@rnl.ist.utl.pt
> Instituto Superior Tecnico - Lisbon
> Software & Computer Engineering - A.I.
> - > http://www.rnl.ist.utl.pt/~pocm
>