From: "Alexander W. Janssen" <yalla@ynfonatic.de>
To: Dan Egli <dan@shortcircuit.dyndns.org>
Cc: netfilter@lists.netfilter.org
Subject: Re: Dynamic IP port forwarding
Date: Wed, 19 Feb 2003 20:41:39 +0100 [thread overview]
Message-ID: <20030219194139.GA12955@ynfonatic.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0302191125260.15269-100000@shortcircuit.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
On Wed, Feb 19, 2003 at 11:30:55AM -0700, Dan Egli wrote:
> I have a dynamic IP generated by my ISP. How do I forward a port from the
> outsite to a machine inside when I have a dynamic IP?
Example: You like to forward all http (80/tcp) traffic to your internal
machine 192.168.4.99 and to port 918/tcp (because your Apache listens to that
port):
OUT_DEV=ppp0 # Adapt to the name of your interface, not the IP!
iptables -t nat -A PREROUTING -i $OUT_DEV -p tcp --dport 80 -j DNAT \
--to-destination 192.168.4.99:918
That's all. No more magic. You just have to know your device. Not the IP.
That's the real magic.
If you want to use UDP you have to change the -p statement, but you almost
know that, because you are going to read a tutorial, aren't you? :-) I suggest
you reading that HOWTO:
http://www.netfilter.org/documentation/tutorials/blueflux/
But anyway, you can write to the list again if you need further help :)
Good luck and have fun, Alex.
--
"Mr Data, when I said 'Fire at Will', I didn't mean for you to be so literal."
Instructions for use of this post: Insert tounge in cheek. Read as normal.
[-- Attachment #2: Type: application/pgp-signature, Size: 248 bytes --]
prev parent reply other threads:[~2003-02-19 19:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-19 18:30 Dynamic IP port forwarding Dan Egli
2003-02-19 19:41 ` Alexander W. Janssen [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=20030219194139.GA12955@ynfonatic.de \
--to=yalla@ynfonatic.de \
--cc=dan@shortcircuit.dyndns.org \
--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