Gentoo Archives: gentoo-user

From: Fabio A Correa <facorread@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] iptables configuration problem
Date: Sun, 13 May 2007 15:09:31
Message-Id: 464728CF.9070809@gmail.com
In Reply to: [gentoo-user] iptables configuration problem by Chuanwen Wu
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Hello Wu,
5
6 Instead of the commands you posted, you should use
7
8 echo 1 > /proc/sys/net/ipv4/ip_forward
9 iptables --table nat -A POSTROUTING -s 192.168.8.0/24 -j MASQUERADE
10
11 Long explanation:
12
13 The first command enables the kernel to _forward_ packets from eth0 to eth1 and vice versa. To
14 do the actual forwarding, the second command is used:
15
16 - --table nat : Network address translation table.
17 - -A POSTROUTING for altering packets as they are about to go out, after it is determined that
18 they are to be forwarded by means of the first instruction.
19 - -j MASQUERADE Masquerade the addresses of computer in the subnet with the address of the routing
20 computer.
21
22 The kernel takes care of the subtle details on masquerading.
23
24 I hope this helps!!!
25
26 - --
27 Fabio A. Correa D.
28
29 Physics Dept, Universidad Nacional, Bogota, Colombia
30 facorread@×××××.com
31 ffaaccdd@××××××××.uk facorread@××××××××.co
32 My webpage and OpenPGP key at http://facorread.150m.com
33 facorread@××××××××××.cc is not working anymore!!!
34 -----BEGIN PGP SIGNATURE-----
35 Version: GnuPG v1.4.6 (GNU/Linux)
36 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
37
38 iD8DBQFGRyjPYOZCB4zf2uQRAp2eAJwIYrXAQqldgZjRN0u+uDOW8t/aTgCeOQOb
39 RTmVGHOHQQWUzVxkZomHhHo=
40 =xvIZ
41 -----END PGP SIGNATURE-----
42 --
43 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] iptables configuration problem Chuanwen Wu <wcw8410@×××××.com>