On Sun, 14 Dec 2003, Maor Meir wrote:

> On Sat, 13 Dec 2003, Amir Yalon wrote:
>
> > I'm currently migrating my windows machine to dual boot with gentoo (the
> > final goal is to abandon windows). The machine has two network cards:
> > one for local network (eth0 in linux) and one for Internet (eth1).
> > Currently the machine in question is set up as firewall, NAT and DNS
> > forwarder using commercial software (Winroute Firewall) and the other
> > machine on the network is surfing the WWW through the gateway machine.
>
> seems to me you need to set up IP masqurade for internet conection
> sharing, try adding the rule:
>
> iptables -t NAT -A POSTROUTING -o eth1 -j MASQURADE

in addition to that, make sure that 'ip forwarding' is enabled on your
machine. to check if it is enabled:

cat /proc/sys/net/ipv4/ip_forward

if it shows '1', you're ok. if it shows '0', then ip_forwarding is not
enabled. to enable it temporarily, just type:

echo 1 > /proc/sys/net/ipv4/ip_forward

and then check the 'cat /proc/sys/net/ipv4/ip_forward' command again - it
should display '1'.

to make sure ip forwarding is enabled after the next reboot, you need to
get this operation done every boot. if you have a file '/etc/sysctl.conf',
edit this file (VERY carefully, and after making a backup copy first),
locate the line stating 'net.ipv4.ip_forward = 0', and cange the '0' to
'1'. if there is no such line, add it, like this:

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

(the first line with the '#', is a comment).

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy

--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]


Reply via email to