Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Mohamed Nassih <nassih50@yahoo.com>
To: netfilter@lists.netfilter.org
Subject: Script verification
Date: Tue, 21 Jun 2005 21:11:15 -0700 (PDT)	[thread overview]
Message-ID: <20050622041115.96034.qmail@web30615.mail.mud.yahoo.com> (raw)

I'am a new be..
 
I want to configure a firewall between my local network and internet, I want to permet 123.45.67.2 to see a http web server.
I write this script, please correct to me if there is some error. is this enough?
 
Thanks
 
echo 1 > /proc/sys/net /ipv4/ip_forward
IPTABLES -F INPUT 
IPTABLES -F OUTPUT 
IPTABLES -F FORWARD
IPTABLES -P INPUT DROP 
IPTABLES -P OUTPUT DROP 
IPTABLES -P FORWARD DROP 
Iptables –A INPUT  -i lo –j ACCEPT
Iptables –A OUTPUT  -o lo –j ACCEPT

iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE

iptables -A FORWARD -i eth1 –o eth0 -p tcp -d 123.45.67.2 --destination-port 80 

–m state --state NEW,ESTABLISHED  -j ACCEPT

 iptables -A FORWARD –p tcp -i eth0 –o eth0 –-source-port 80 –m state --state ESTABLISHED -j ACCEPT 



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

             reply	other threads:[~2005-06-22  4:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-22  4:11 Mohamed Nassih [this message]
2005-06-22 10:40 ` Script verification Marius Mertens

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=20050622041115.96034.qmail@web30615.mail.mud.yahoo.com \
    --to=nassih50@yahoo.com \
    --cc=netfilter@lists.netfilter.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