Linux Netfilter discussions
 help / color / mirror / Atom feed
* Script verification
@ 2005-06-22  4:11 Mohamed Nassih
  2005-06-22 10:40 ` Marius Mertens
  0 siblings, 1 reply; 2+ messages in thread
From: Mohamed Nassih @ 2005-06-22  4:11 UTC (permalink / raw)
  To: netfilter

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 

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

end of thread, other threads:[~2005-06-22 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-22  4:11 Script verification Mohamed Nassih
2005-06-22 10:40 ` Marius Mertens

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