Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This must be very simple but I can't find an answer
I need to change the results of 'netstat -ta' local address to a network ip e.g.
$netstat -ta
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
..
tcp 0 0 localhost:6543 *:* LISTEN
..
*to*
$ netstat -ta
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
..
tcp 0 0 192.168.1.214:6543 *:* LISTEN
..
This needs to be done so that port 6543 is not blocked to outside traffic.
--numeric , -n
Show numerical addresses instead of trying to determine symbolic host, port or user
names.
--numeric-hosts
shows numerical host addresses but does not affect the resolution of port or user
names.
--numeric-ports
shows numerical port numbers but does not affect the resolution of host or user names.
--numeric-users
shows numerical user IDs but does not affect the resolution of host or port names.
I suspect the OP wants to change where it is LISTENing not just see it in numeric format.
For that he'd need to run with the "-p" flag to identify the PID then look at that process to see how it gets configured to change where it LISTENs. Probably would also have to open the port in the firewall (iptables, firewalld or other) to be able to connect from other systems once he has it LISTENing on the correct interface.
I'd written more detail but LQ logged me out rather than posting it because of some odd timeout happening since yesterday.
The -p option enabled me to find out the application (i.e. mythtv) so now all I have to do is find out where it is being set! Thanks.
However if this proves difficult to discover, is there a hack which can override the initial port allocation from 'localhost' to the desired ip address?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.