rihad wrote:
>
> How to enable Internet connection sharing? I've two Linux boxes
> connected with the "null hub" thing, one of which acts as a gateway
> and is used to dial out to an ISP thru ppp0. Here's what I'm trying to
> do:
>
> on the gateway:
> ifconfig eth0 192.168.0.9
> iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
> iptables -A FORWARD -i eth0 -j ACCEPT
> sysctl -w net.ipv4.ip_forward=1
add
iptables -A FORWARD -i ppp0 -o eth0 -m state --state ESTABLISHED,RELATED
-j ACCEPT
(all one line). This allows responses to the masqueraded packets back
in.
Regards, Ian
|