-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Wu,

Instead of the commands you posted, you should use

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables --table nat -A POSTROUTING -s 192.168.8.0/24 -j MASQUERADE

Long explanation:

The first command enables the kernel to _forward_ packets from eth0 to eth1 and 
vice versa. To
do the actual forwarding, the second command is used:

- --table nat : Network address translation table.
- -A POSTROUTING for altering packets as they are about to go out, after it is 
determined that
they are to be forwarded by means of the first instruction.
- -j MASQUERADE Masquerade the addresses of computer in the subnet with the 
address of the routing
computer.

The kernel takes care of the subtle details on masquerading.

I hope this helps!!!

- --
Fabio A. Correa D.

Physics Dept, Universidad Nacional, Bogota, Colombia
[EMAIL PROTECTED]
[EMAIL PROTECTED]         [EMAIL PROTECTED]
My webpage and OpenPGP key at http://facorread.150m.com
[EMAIL PROTECTED] is not working anymore!!!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGRyjPYOZCB4zf2uQRAp2eAJwIYrXAQqldgZjRN0u+uDOW8t/aTgCeOQOb
RTmVGHOHQQWUzVxkZomHhHo=
=xvIZ
-----END PGP SIGNATURE-----
-- 
[EMAIL PROTECTED] mailing list

Reply via email to