From: Joel Newkirk <netfilter@newkirk.us>
To: Rasmus Reinholdt Nielsen <rasmus@narani.dk>,
netfilter@lists.netfilter.org
Subject: Re: portfw on iptables 2.4 kernel problem.
Date: Thu, 12 Dec 2002 09:25:43 -0500 [thread overview]
Message-ID: <200212120925.43434.netfilter@newkirk.us> (raw)
In-Reply-To: <5.1.0.14.2.20021212094109.02d83370@of23sm3>
On Thursday 12 December 2002 03:51 am, Rasmus Reinholdt Nielsen wrote:
> Hi
>
> I have the same problem here. Using kernel 2.4.19-pre9, where I just
> can't forward port 80. Port 8080 works for instace fine. I have also
> tried to redirect all requests on port 80 to port 8080, but without
> any luck. When connecting to port 80 the browser just hangs. I can see
> in the apache log on the webserver that it gets the request, so I
> think it is a problem of the packets not getting back through the
> firewall and to the browser.
>
> I just can't see what is wrong. I even tried the following rules to
> see it that would help, but it didn't
>
> iptables -A INPUT -j ACCEPT
> iptables -A FORWARD -j ACCEPT
> iptables -t nat -A POSTROUTING -j MASQUERADE
> iptables -t nat -A PREROUTING -p tcp -i eth1 --dport 80 -j DNAT --to
> <http_ip>:80
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> This is not my usual firewall script, but I can't think of a more open
> one :)
Just a few observations. I assume eth1 is your internet connection, so
you should probably be using:
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
Otherwise it will constantly be checking the IP of every interface and
masquerading packets outbound on every interface.
and you also need (did you just not list it?)
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
for the MASQ target to work.
> Anybody knows of this might be a problem with the 2.4.19 kernels, I
> have a 2.4.18 firewall as well on which forwarding IS working, with
> the same ruleset.
Is this just DNAT that fails, or all forwarding? And just to be sure,
since you didn't say, are you testing it from outside the LAN, or from a
local machine (or the firewall box itself)?
j
next prev parent reply other threads:[~2002-12-12 14:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <96C102324EF9D411A49500306E06C8D1021AE462@eketsv02.cubis.de >
2002-12-12 8:51 ` portfw on iptables 2.4 kernel problem Rasmus Reinholdt Nielsen
2002-12-12 14:25 ` Joel Newkirk [this message]
2002-12-12 8:09 Reckhard, Tobias
-- strict thread matches above, loose matches on Subject: below --
2002-12-12 7:33 Reckhard, Tobias
2002-12-12 7:31 Reckhard, Tobias
2002-12-11 9:00 Reckhard, Tobias
2002-12-11 14:25 ` Joel Newkirk
2002-12-11 7:32 Reckhard, Tobias
2002-12-11 8:05 ` Joel Newkirk
[not found] <FD8F124A387AD6119F7900A0D218B321561982@hslex01.hslbz.local>
2002-12-10 9:43 ` Rob Sterenborg
2002-12-10 11:00 ` Raymond Leach
2002-12-10 11:22 ` Jozsef Kadlecsik
2002-12-10 11:32 ` Raymond Leach
2002-12-10 11:52 ` Jozsef Kadlecsik
2002-12-10 12:12 ` Raymond Leach
2002-12-11 6:08 ` louie miranda
2002-12-11 6:20 ` Raymond Leach
2002-12-10 8:56 louie miranda
2002-12-10 9:01 ` Raymond Leach
2002-12-10 9:11 ` louie miranda
2002-12-10 9:01 ` Paulo Andre
2002-12-10 9:12 ` louie miranda
2002-12-11 11:26 ` Andrea Rossato
2002-12-12 3:11 ` louie miranda
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=200212120925.43434.netfilter@newkirk.us \
--to=netfilter@newkirk.us \
--cc=netfilter@lists.netfilter.org \
--cc=rasmus@narani.dk \
/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.