From: Magnus Solvang <magnus@solvang.net>
To: netfilter@lists.netfilter.org
Subject: Re: lan users surfing on lan webserver
Date: Thu, 27 Feb 2003 13:35:31 +0100 [thread overview]
Message-ID: <20030227123531.GA26259@first.knowledge.no> (raw)
In-Reply-To: <20030225215326.GA30804@first.knowledge.no>
Quoting Magnus Solvang (magnus@solvang.net):
| I'm configuring a firewall on a network where we have put
| the webserver on the inside of the firewall and given it
| a reserved ip-address.
| I have done the appropriate forwarding so that the webserver
| can be reached from the internett. Trouble is, users on the
| LAN have to use its internal ip-address to reach the web-
| pages.
I've been reading the docs, but still haven't figured this
one out.
According to NAT-HOWTO-10.html, I've set up these rules:
$IPTABLES -t nat -A PREROUTING -i $EXTIF -d $EXTWEBSERVER1 -p tcp \
--dport 80 -j DNAT --to $INTWEBSERVER1
$IPTABLES -t nat -A POSTROUTING -d $INTWEBSERVER1 -s $INTNET -p tcp \
--dport 80 -j SNAT --to 192.168.1.20
192.168.1.20 is the internal ip-address on the firewall.
The first line is working fine (I can reach the server from the
internet).
But, the second line isn't doing what I hoped it would - the users
on the LAN cannot use the outside URL to get to the internal webserver.
tcpdump shows traffic going from the internal client -> external
webserver-address and back, but nothing reaches the interal webserver.
I noticed that the OUTPUT chain logged dropped packages from the
internal client to the webserver, and this rule cleared that up:
$IPTABLES -A OUTPUT -p tcp -o $INTIF -s $EXTWEBSERVER1 \
--sport 80 -d $INTNET -j ACCEPT
But now, no packets are logged, and it's still not working.
I'm guessing the POSTROUTING line need an appropriate FORWARD-rule...
If so, what would it look like?
- M
next prev parent reply other threads:[~2003-02-27 12:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-25 21:53 lan users surfing on lan webserver Magnus Solvang
2003-02-27 12:35 ` Magnus Solvang [this message]
2003-02-27 13:51 ` Problem with string hare ram
2003-02-27 13:48 ` Problem with string (remove References-line in mailhead) Magnus Solvang
2003-02-27 14:37 ` Joel Newkirk
2003-02-27 15:01 ` Magnus Solvang
2003-02-27 14:36 ` Problem with string Raymond Leach
2003-03-03 13:37 ` lan users surfing on lan webserver Magnus Solvang
2003-03-03 13:59 ` Joel Newkirk
2003-03-03 14:47 ` Magnus Solvang
-- strict thread matches above, loose matches on Subject: below --
2003-02-26 1:37 Andrej Ricnik
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=20030227123531.GA26259@first.knowledge.no \
--to=magnus@solvang.net \
--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