Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Michele Petrazzo - Unipex <michele.petrazzo@unipex.it>
To: Aaron Clausen <mightymartianca@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Port Forwarding Question
Date: Fri, 08 May 2009 17:57:20 +0200	[thread overview]
Message-ID: <4A045660.3070605@unipex.it> (raw)
In-Reply-To: <8ec0428d0905061125n7aad6c74nc3b63bfedf890fa8@mail.gmail.com>

Aaron Clausen wrote:
>  With the 3Com router, I can, from another internal computer,
> access that server via the external interface (ie, by going
> http://publicaddress).  When I throw in my Linux router, it does not
> do that, and user's have to use the internal IP or host name to access
> the device.
>

What rules have you wrote?
an
iptables -t nat -A PREROUTING -s local_addrs/mask -d ip_addrs \
	 -p tcp --dport http -j DNAT --to-destionation internal_web
and the respective
iptables -t nat -A POSTROUTING -d internal_web -p tcp --dport http -j 
SNAT --to-source gw_ip

must to the trick.

So the request stay inside the lan and there is no "loops"

Michele

  reply	other threads:[~2009-05-08 15:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06 18:25 Port Forwarding Question Aaron Clausen
2009-05-08 15:57 ` Michele Petrazzo - Unipex [this message]
     [not found]   ` <8ec0428d0905171444q4e8a75dj6e60bfbab93bc75d@mail.gmail.com>
2009-05-17 21:54     ` Aaron Clausen
2009-05-18  7:03       ` Покотиленко Костик
  -- strict thread matches above, loose matches on Subject: below --
2008-03-17 16:26 port forwarding question Phil Sutter
2008-03-17 18:13 ` Jan Engelhardt
2008-03-17 18:32   ` Cloves Pereira Costa Jr
2008-03-17 20:01     ` Andrew Schulman
2008-03-18 16:36       ` Jan Engelhardt
2007-04-30 17:37 Port " David
2007-05-02 12:00 ` Elvir Kuric
2006-09-21 19:55 Dimitri Yioulos
2006-09-21 20:23 ` Martijn Lievaart
2006-09-21 20:25 ` Mr Ritter
2006-09-21 20:32   ` Mr. Ritter
2006-09-21 20:53   ` Dimitri Yioulos
2006-09-21 21:14     ` Martijn Lievaart
2006-09-21 21:23       ` Dimitri Yioulos

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=4A045660.3070605@unipex.it \
    --to=michele.petrazzo@unipex.it \
    --cc=mightymartianca@gmail.com \
    --cc=netfilter@vger.kernel.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