Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Jörg Harmuth" <harmuth@mnemon.de>
To: netfilter@lists.netfilter.org
Subject: Re: connect to different port
Date: Thu, 08 Dec 2005 14:13:41 +0100	[thread overview]
Message-ID: <43983185.1060600@mnemon.de> (raw)
In-Reply-To: <43982D8E.9020308@eccotours.dyndns.org>

Brent Clark schrieb:
> Hi all
> 
> I would like to have it so that a connection (destined for port 8080)
> comes in on eth0 and jumps to port 3389
> 
> $IPT -t nat -A PREROUTING -i eth0 -p tcp --dport 8080 -j DNAT --to
> 192.168.111.248:3389
> $IPT -t filter -A FORWARD -i eth0 -p tcp --dport 8080 -d 192.168.111.248
> -j ACCEPT

Try "--dport 3389" in your FORWARD rule, as the destination port is
already rewritten in nat/PREROUTING.

If you don't have it already, you need a rule in FORWARD that allows the
traffic back. Something like:

-A FORWARD -s 192.168.111.248 -j ACCEPT

or something more restrictive.

HTH,

Joerg


  reply	other threads:[~2005-12-08 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08 12:56 connect to different port Brent Clark
2005-12-08 13:13 ` Jörg Harmuth [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-12-08 13:00 Eray Aslan
2005-12-08 14:48 ` Brent Clark

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=43983185.1060600@mnemon.de \
    --to=harmuth@mnemon.de \
    --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