public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Chuanwen Wu" <wcw8410@gmail.com>
To: gentoo-user <gentoo-user@lists.gentoo.org>
Subject: [gentoo-user] iptables configuration problem
Date: Sun, 13 May 2007 22:41:56 +0800	[thread overview]
Message-ID: <7797aa370705130741m381555b2qf64fc3a96c271769@mail.gmail.com> (raw)

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



             reply	other threads:[~2007-05-13 14:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-13 14:41 Chuanwen Wu [this message]
2007-05-13 15:03 ` [gentoo-user] iptables configuration problem 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7797aa370705130741m381555b2qf64fc3a96c271769@mail.gmail.com \
    --to=wcw8410@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox