Operating System - Linux
1820644 Members
2071 Online
109626 Solutions
New Discussion юеВ

How to stop loopback address from listening on TCp ports

 
Manoj_36
Advisor

How to stop loopback address from listening on TCp ports

We have an application running on Linux box.It should listen on IP Address:2471 port , but
its listening on Loopback address rather.How can i make the eth0 listen in place of loopback address.Thanks for all your advices.

p_ctsce 1348 ctsa 3u IPv4 107357401 TCP 127.0.0.1:ctsa_in_ctsa (LISTEN)
6 REPLIES 6
Ivan Ferreira
Honored Contributor

Re: How to stop loopback address from listening on TCp ports

You should ask to your application provider or developer. Without knowing the application is hard to say. Most network services, like SSH, DNS, SAMBA, HTTP, FTP have a configuration file where you can specify on which interfaces will listen.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
rick jones
Honored Contributor

Re: How to stop loopback address from listening on TCp ports

Using a verbose strace against the application while it is _starting_ (not after it is already running), you should be able to see the calls it is making to setup the listen endpoint. In particular, you should see it making a call to bind(). Going back in the strace you may see it making the system calls typical of a gethostbyname/getaddrinfo call, and then prior to that, perhaps opening a config file from which it has gotten the name/IP to which it will bind.
there is no rest for the wicked yet the virtuous have no pillows
Manoj_36
Advisor

Re: How to stop loopback address from listening on TCp ports

Hi All,

Thanks for all ur response I will do some more digging and update.Though I am still lost.
Bill Thorsteinson
Honored Contributor

Re: How to stop loopback address from listening on TCp ports

It appears you may be running SeaODBC from
a quick scan of the net. It is likely
that such a tool would install listening
on localhost only. Otherwise, your databases
are exposed to the world.

Check the man page for the tool to see if
they specify the configuration file.
Likely something like /etc/seaodbc.
The configuration file may have a line for
either interfaces (lo) or listen address
(127.0.0.1).

Consider the above security issue before
changing the listen address or interface.

Check to see if the daemon supports
tcpwrappers. This can be used to secure
the port.

Alternatively, you can uses SSH port
forwarding to forward local traffic on
port 2471 to the sever with the daemon.
Manoj_36
Advisor

Re: How to stop loopback address from listening on TCp ports

OK the solutiion is that
/etc/hosts was missing the entry for server resolution

it was having only
127.0.0.1
changed that to
127.0.0.1 localhost loopback

and added



That was all
Manoj_36
Advisor

Re: How to stop loopback address from listening on TCp ports

Solution given in last messg