I am using following code to bind a SocketChannel to a port.
private ServerSocketChannel channel;
channel = ServerSocketChannel.open();
channel.bind(new InetSocketAddress(<MachinesPublicNameAsString>,<portBeyond1024>));
channel.configureBlocking(false);
At one machine this same code executed with same privilege level binds socket to public IP of the machine. Whereas on other it binds it on 127.0.1.1. MachinesPublicNameAsString is the one with which I am able to ssh from other machines.
Please suggest me what could be wrong? What all system settings I should check for?