Re: [gentoo-user] iptables configuration problem

2007-05-14 Thread Chuanwen Wu
2007/5/15, Dan Farrell <[EMAIL PROTECTED]>: On Tue, 15 May 2007 10:35:38 +0800 "Chuanwen Wu" <[EMAIL PROTECTED]> wrote: > Does it mean that eth1(the interface in my subnet) receive the request > but don't post forward it? Perhaps you should attach the output of "iptables -t nat -L -v; iptables

Re: [gentoo-user] iptables configuration problem

2007-05-14 Thread Dan Farrell
On Tue, 15 May 2007 10:35:38 +0800 "Chuanwen Wu" <[EMAIL PROTECTED]> wrote: > Does it mean that eth1(the interface in my subnet) receive the request > but don't post forward it? Perhaps you should attach the output of "iptables -t nat -L -v; iptables -L -v;" so I can see the rules... while you're

Re: [gentoo-user] iptables configuration problem

2007-05-14 Thread Chuanwen Wu
Thank Norberto and Dan Farrell!I think i had a misunderstand and made some mistakes.I hope I have correct it now. /etc/conf.d/net in the server config_eth0=( "202.114.10.134 netmask 255.255.255.0 brd 202.114.10.255" ) routes_eth0=( "default gw 202.114.10.129" ) config_eth1=( "192.168.1.1 netmask

Re: [gentoo-user] iptables configuration problem

2007-05-14 Thread Dan Farrell
Greetings all. Hope the weather in bejing is pleasant, Mr Wu. On Mon, 14 May 2007 11:58:34 -0300 (ART) "Norberto Bensa" <[EMAIL PROTECTED]> wrote: > On Mon, May 14, 2007 8:23 am, Chuanwen Wu wrote: > > Thank you!I think i have done what you meant. > > Here is the information: > > > > > > /etc/

Re: [gentoo-user] iptables configuration problem

2007-05-14 Thread Norberto Bensa
On Mon, May 14, 2007 8:23 am, Chuanwen Wu wrote: > Thank you!I think i have done what you meant. > Here is the information: > > > /etc/conf.d/net in the server > config_eth0=( "202.114.10.134 netmask 255.255.255.0 brd 202.114.10.255" ) > routes_eth0=( "default gw 202.114.10.129" ) OK > > config_e

Re: [gentoo-user] iptables configuration problem

2007-05-14 Thread Chuanwen Wu
2007/5/14, Norberto Bensa <[EMAIL PROTECTED]>: Chuanwen Wu wrote: > I have tried set all the gw in my subnet to 192.168.1.254 or 192.168.1.1. > Is't all right? I don't know, it depends on what's your gw's IP is. Let's say you have this setup: GW: 192.168.1.1 Other PCs are: 192.168.1.2... 192

Re: [gentoo-user] iptables configuration problem

2007-05-14 Thread Norberto Bensa
Chuanwen Wu wrote: > I have tried set all the gw in my subnet to 192.168.1.254 or 192.168.1.1. > Is't all right? I don't know, it depends on what's your gw's IP is. Let's say you have this setup: GW: 192.168.1.1 Other PCs are: 192.168.1.2... 192.168.1.3... and so on. On the GW you need: ec

Re: [gentoo-user] iptables configuration problem

2007-05-13 Thread Norberto Bensa
Chuanwen Wu wrote: > Chain POSTROUTING (policy ACCEPT) > target prot opt source destination > MASQUERADE all -- 192.168.1.0/24 anywhere > > Chain OUTPUT (policy ACCEPT) > target prot opt source destination > >

Re: [gentoo-user] iptables configuration problem

2007-05-13 Thread Chuanwen Wu
2007/5/13, Fabio A Correa <[EMAIL PROTECTED]>: -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 I have tried.But still not work

Re: [gentoo-user] iptables configuration problem

2007-05-13 Thread Fabio A Correa
-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

[gentoo-user] iptables configuration problem

2007-05-13 Thread Chuanwen Wu
Hi,guys! I use iptables to let the PCs in the subnet to connect the internet outside. And i write a simple script,but it doesn't work: #!/bin/sh iptables -F #Define packets from Internet server to Intranet iptables -A FORWARD -d 198.168.1.0/24 -i eth0 -j ACCEPT #Define packets from Intranet to I