Iptables remote port forwarding and dynamic remote ip
Posted
by
lbwtz2
on Server Fault
See other posts from Server Fault
or by lbwtz2
Published on 2011-02-13T14:49:26Z
Indexed on
2011/02/13
15:26 UTC
Read the original article
Hit count: 237
iptables
|port-forwarding
Hello,
I want to forward a port from my remote vps to my domestic server and I am quite a newbie with iptables.
The problem is that I am using a dynamic dns service to reach my home server from the internet so I don't have a fixed ip and iptables doesn't like urls.
The rules I am willing to use are these:
-t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx --dport 8888 -j DNAT --to myhome.tld:80
-A FORWARD -p tcp -i eth0 -d myhome.tld --dport 80 -j ACCEPT
Of course I recevie a Error BAD IP ADDRESS
because of myhome.tld
.
What can I do?
© Server Fault or respective owner