9

I am performing a quick audit of services listening on external interfaces on a Ubuntu 14.04 machine, and tmux is binding TCP *:50994 and *:59147 as reported by netstat -l.

I can connect to this port from another computer on the network (barring any firewall settings), but I can't find any documentation about why it's binding an external port. What is the purpose of this and is there a way to stop it?

  • Does wireshark tell you anything about traffic going over those ports? – Parthian Shot Mar 8 '16 at 18:54
  • I shared this question on the tmux IRC channel and they are asking for you to post your tmux.conf – Aaron Mar 8 '16 at 19:06
  • Where is your netstat output? tmux only uses UNIX sockets... – ThiefMaster Mar 8 '16 at 20:00
  • 3
    Can't reproduce at all, and I can't remotely think of a way an inet socket would show up in lsof but not netstat. Tried with byobu too. Also looked through tmux source and there doesn't seem to be any function that includes usage of TCP. You might want to check your tmux install source.. ? – Fira Mar 9 '16 at 8:22
  • 1
    Looking at the output of netstat -l how are you sure that it is tmux, as the output of that command doesn't even shown the associated process name. You need the -p switch for that. – Fred Thomsen Mar 10 '16 at 14:28
1

It is tmux and it is a Unix socket. Tmux apparently uses server sockets to allow for independent tmux servers to be run. man tmux

Run tmux with no flags

tmux

$ ss -l |grep tmux
u_str  LISTEN     0      128    /tmp/tmux-1000/default 62749                 * 0

Then run tmux with -S /tmp/tmux.sock and see that the change in the socket path.

$ ss -l |grep tmux
u_str  LISTEN     0      128    /tmp/tmux.sock 62765                 * 0

Note, It is not TCP. This can be seen from using the flags -t (tcp) and -l (listening)

$ ss -tl
(returns no lines but the headers)
1

are you using tcsh? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204429 has a similar-ish problem where starting tmux on tcsh results in dns queries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.