From: Guido Lorenzutti <guido@lorenzutti.com.ar>
To: Mohamed Nassih <nassih50@yahoo.com>, netfilter@lists.netfilter.org
Subject: Re: Firewall problem
Date: Wed, 15 Jun 2005 00:48:11 -0300 [thread overview]
Message-ID: <42AFA4FB.90408@lorenzutti.com.ar> (raw)
In-Reply-To: <20050615031424.30876.qmail@web30602.mail.mud.yahoo.com>
Mohamed Nassih wrote:
> Hi,
>
> I have this firewall script, the problem is that I can not connect to the webserver (123.45.67.2) from the local network (192.168.1.0).
>
> Please help.
maybe if you...
echo 1 > /proc/sys/net/ipv4/ip_forward
and not
echo 1 > /proc/sys/net(((( ))))/ipv4/ip_forward
>
> echo 1 > /proc/sys/net /ipv4/ip_forward
> IPTABLES -F INPUT
> IPTABLES -F OUTPUT
> IPTABLES -F FORWARD
you could...
iptables -F instead of the three rules from above...
> 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 -p tcp -d 123.45.67.2 --destination-port 80
> –m state --state NEW,ESTABLISHED -j ACCEPT
> iptables -A FORWARD –p tcp -i eth0 –-source-port 80 –m state --state
> ESTABLISHED -j ACCEPT
>
It would be more readable if you....
iptables -A FORWARD -i eth1 -o eth0 -p tcp --dport 80 -d 123.45.67.2 -m
state --state NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -p tcp --sport 80 -s 123.45.67.2 -m
state --state ESTABLISHED -j ACCEPT
Check if eth0 = wan and eth1 = lan.
PD: sorry for my english, i never study.
next prev parent reply other threads:[~2005-06-15 3:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-15 3:14 Firewall problem Mohamed Nassih
2005-06-15 3:48 ` Guido Lorenzutti [this message]
2005-06-15 13:01 ` Mohamed Nassih
2005-06-15 14:10 ` /dev/rob0
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=42AFA4FB.90408@lorenzutti.com.ar \
--to=guido@lorenzutti.com.ar \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.