public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] iptables configuration problem
@ 2007-05-13 14:41 Chuanwen Wu
  2007-05-13 15:03 ` Fabio A Correa
  0 siblings, 1 reply; 11+ messages in thread
From: Chuanwen Wu @ 2007-05-13 14:41 UTC (permalink / raw
  To: gentoo-user

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 Internet
iptables -A FORWARD -s 198.168.1.0/24 -i eth1 -j ACCEPT


Here is the result of iptables -L:

# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             198.168.1.0/24
ACCEPT     all  --  198.168.1.0/24       anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination


The eth0 here has the real ip,and the eth1 have a subnet ip:192.168.1.21.
How to fix this problem?All I need now is just to let my office
machine to use the internet!
Thanks in advanced!!
-- 
wcw
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-05-15  3:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-13 14:41 [gentoo-user] iptables configuration problem Chuanwen Wu
2007-05-13 15:03 ` Fabio A Correa
2007-05-14  3:31   ` Chuanwen Wu
2007-05-14  3:56     ` Norberto Bensa
     [not found]       ` <7797aa370705140218s1ee9b7b4yea52a7140b031b05@mail.gmail.com>
2007-05-14 10:48         ` Norberto Bensa
2007-05-14 11:23           ` Chuanwen Wu
2007-05-14 14:58             ` Norberto Bensa
2007-05-14 21:36               ` Dan Farrell
2007-05-15  2:35                 ` Chuanwen Wu
2007-05-15  2:49                   ` Dan Farrell
2007-05-15  3:10                     ` Chuanwen Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox