Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Philip Pemberton <usenet06@philpem.me.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Port forwarding fun (was NATing on a single interface?)
Date: Fri, 27 Oct 2006 21:26:11 +0100	[thread overview]
Message-ID: <ehtq0l$2sm$1@sea.gmane.org> (raw)
In-Reply-To: <ehtmuq$nf9$1@sea.gmane.org>

> # Forward some ports
> echo "Forwarding port 99 to 10.0.0.8:80"
> $IPT -t nat -A PREROUTING -p tcp -m tcp --dport 99 -j DNAT 
> --to-destination 10.0.0.8:80

Oh $CURSE. Forgot the FORWARD rule:

$IPT -A FORWARD -p tcp -d 10.0.0.8 --dport 80 -j ACCEPT

Now it works, and I'm a happy bunny once more. I would appreciate some 
constructive criticism relating to my iptables script though - possible 
security/style improvements, etc.

Spotted that on <http://www.hackorama.com/network/portfwd.shtml>. Found on the 
second page of results from a Google search for 'iptables DNAT port-forward'.

Thanks.
-- 
Phil.                         |  (\_/)  This is Bunny. Copy and paste Bunny
usenet06@philpem.me.uk        | (='.'=) into your signature to help him gain
http://www.philpem.me.uk/     | (")_(") world domination.
If mail bounces, replace "06" with the last two digits of the current year.



      reply	other threads:[~2006-10-27 20:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26  9:08 NATing on a single interface? Philip Pemberton
2006-10-26 15:45 ` Robert Nichols
2006-10-26 20:44   ` Philip Pemberton
2006-10-26 23:52     ` Robert Nichols
2006-10-27  9:09       ` Philip Pemberton
2006-10-27 14:40         ` Robert Nichols
2006-10-27 19:33           ` Port forwarding fun (was NATing on a single interface?) Philip Pemberton
2006-10-27 20:26             ` Philip Pemberton [this message]

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='ehtq0l$2sm$1@sea.gmane.org' \
    --to=usenet06@philpem.me.uk \
    --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