Forward public port to localhost
Posted
by
Dan
on Server Fault
See other posts from Server Fault
or by Dan
Published on 2012-12-15T08:50:56Z
Indexed on
2012/12/15
11:07 UTC
Read the original article
Hit count: 207
I have a process running on my Ubuntu 12.04 server that insists on binding to a public IP address. I only want it accessible from localhost, and NOT the outside world. I've been trying to work out a way to forward 1.2.3.4:8888 to 127.0.0.1:8888. I saw something about iptables not wanting to forward connections to loopback, and I haven't been able to make it work with xinetd either. It's also important that the connection not only be available on localhost, but be inaccessible on the interface it's trying to run on. Is this even possible?
© Server Fault or respective owner