All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: locally access server behind firewall
Date: Wed, 01 Sep 2004 14:08:02 -0400	[thread overview]
Message-ID: <1094062082.1824.49.camel@wolfpack.ljm.dom> (raw)
In-Reply-To: <41360CA0.6090109@tomdp.com>

On Wed, 2004-09-01 at 13:53, Tom wrote:
> This works really well when I try to connect from the outside to my 
> webserver. But, if I try to connect to http://myserver.com:8888 from the 
> internal network (or from my server itself), I always get 'connection 
> refused'. I'm pretty sure I need some other rules, but can someone 
> please help me in the good direction here? Thanks a lot!!

because your server doesn't listen on port 8888--it listens on port 80. 
that's why you had to create the DNAT rule.

as far as trying to connect "from the internal network"--these packets
will go directly from LAN client to WWW server and never traverse your
firewall, so no DNAT can take place.  if you must be able to do
this--configure your WWW server to listen on port 8888 ("Listen 8888" in
apache).

NAT-ing of locally-generated packets on your firewall would require a
rule in the OUTPUT chain of the nat table:

        iptables -t nat -A OUTPUT -p tcp -d $EXTIP --dport 8888 \
          -j DNAT --to-destination $SERVER:8888
        
note:  i don't even know if that will work, as it requires the output
interface to change from external to internal and i vaguely recall that
this doesn't work cleanly without a patch.

-j

-- 
Jason Opperisano <opie@817west.com>



  parent reply	other threads:[~2004-09-01 18:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-01 17:53 locally access server behind firewall Tom
2004-09-01 18:05 ` John A. Sullivan III
2004-09-01 18:11   ` Tom
2004-09-01 18:08 ` Jason Opperisano [this message]
2004-09-01 18:13 ` Deepak Seshadri
2004-09-01 18:17 ` Alistair Tonner
2004-09-01 18:30   ` Tom
  -- strict thread matches above, loose matches on Subject: below --
2004-09-01 18:20 Daniel Chemko

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=1094062082.1824.49.camel@wolfpack.ljm.dom \
    --to=opie@817west.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.