All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Solvang <magnus@solvang.net>
To: netfilter@lists.netfilter.org
Subject: Re: lan users surfing on lan webserver
Date: Mon, 3 Mar 2003 15:47:33 +0100	[thread overview]
Message-ID: <20030303144733.GA1404@first.knowledge.no> (raw)
In-Reply-To: <200303030859.45430.netfilter@newkirk.us>

Quoting Joel Newkirk (netfilter@newkirk.us):
[...]
| It should be:
| 
| $IPTABLES -A FORWARD -p tcp -d $INTWEBSERVER1 --dport 80
| -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

Yes, I quoted the wrong part. Sorry about that. I had the line you
mention in my script.

| FORWARD because after DNAT has done its job this traffic is no longer 
| addressed to the firewall box.  $INTWEBSERVER1 for the same reason.

Yes...:

| And 
| skip the "-i $EXTIF" to ensure it matches connections from the LAN as 
| well as 'outside' clients.

Doh!!! :)

There I have for copying a line that would forward connections from
the internet to an internal webserver, and leaving it like that when
trying to forward traffic from the internal net as well. So obvious
(now).

| > PREROUTING:
| > $IPTABLES -t nat -A PREROUTING -i $EXTIF -d $EXTWEBSERVER1 -p tcp \
| > --dport 80 -j DNAT --to $INTWEBSERVER1
| 
| Again, you might want to drop the "-i $EXTIF" part...

:)

| > $IPTABLES -t nat -A POSTROUTING -d $INTWEBSERVER1 -s $INTRANET -p tcp
| > \ --dport 80 -j SNAT --to-source 192.168.1.20
| 
| This part looks fine as-is.

And now the rest looks fine too. Thank you, Joel for seeing what
I couldn't!  :)

And thanks to Pavan Gokarn, for helping me to debug my script!

- M


  reply	other threads:[~2003-03-03 14:47 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
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 [this message]
  -- 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=20030303144733.GA1404@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 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.