* Dynamic IP port forwarding
@ 2003-02-19 18:30 Dan Egli
2003-02-19 19:41 ` Alexander W. Janssen
0 siblings, 1 reply; 2+ messages in thread
From: Dan Egli @ 2003-02-19 18:30 UTC (permalink / raw)
To: netfilter
I've been browsing the list archives and the one thing that I need I
cannot seem to find.
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? All information I
have seen uses the source address, which is going to change at unknown
intervals. So using -d <outside IP> is not going to work since I have no
way of knowing what <outside IP> really is. What I need is a way to say
"forward all traffic we recieve to port X to IP a.b.c.d, port X".
How does one accomplish this? And please copy me directly as I am not
subscribed to the list.
Thanks!!
--- Dan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Dynamic IP port forwarding
2003-02-19 18:30 Dynamic IP port forwarding Dan Egli
@ 2003-02-19 19:41 ` Alexander W. Janssen
0 siblings, 0 replies; 2+ messages in thread
From: Alexander W. Janssen @ 2003-02-19 19:41 UTC (permalink / raw)
To: Dan Egli; +Cc: netfilter
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-19 19:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-19 18:30 Dynamic IP port forwarding Dan Egli
2003-02-19 19:41 ` Alexander W. Janssen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox