0

I have a application that binds to 127.0.0.1:9000. I can't access from other nodes on the network due to this. I want it to appear as my-machine-name:9000 instead.

How can I do this in Ubuntu. Iptables / forwarding maybe?

7
  • Can you tell us what application? There may be settings to change the IP address to something else like you private network (i.e. 192.168.0.0). iptables is used to forward packets from one machine to another, not to redirect a local server LISTEN to the world. Jul 25, 2016 at 0:38
  • Thanks, its Hadoop, HDFS. I already set the following in core-site.xml file: <property> <name>fs.defaultFS</name> <value>my-machine-name:9000/</value> </property>
    – nikk
    Jul 25, 2016 at 0:44
  • If my-machine-name resolves to 127.0.0.1 then you need to use a different name or directly an IP address. Jul 25, 2016 at 0:49
  • Used both my-machine-name and IP address in core-site.xml. Both show 127.0.0.1:9000 when run netstat -pln. Still not able to connect from another node. That was why I wanted to try IP tables as a fix, maybe?
    – nikk
    Jul 25, 2016 at 1:01
  • You need to use your private network IP address. You should see it when you do ifconfig. Usually the first entry, it has been called eth0, although now a day, that changes so much... That's the IP address you need to use. Jul 25, 2016 at 1:15

0

You must log in to answer this question.

Browse other questions tagged .