LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-24-2020, 10:23 AM   #1
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Rep: Reputation: 18
mpd listening on any ipv6


Hi-

my postgres listens on 127.0.0.1:5432 but mpd is like this in netstat:

tcp6 :::6600 :::* LISTEN -

lsof -i TCP:6600
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
cantata 16346 myusername 19u IPv4 1053330 0t0 TCP localhost:44386->localhost:6600 (ESTABLISHED)

The lsof command shows what I want it to do correctly.

I read that the OS will drop packets on a port if nothing is listening in netstat.

How come that port 6600 is showing open in TCP6?
Not shown: 65535 closed ports
PORT STATE SERVICE VERSION
6600/tcp open mpd Music Player Daemon 0.20.0

Is anyone out there using mpd, and were you able to get that port closed in nmap? I did an nmap scan on my private IP address.

Edit: systemctl stop mpd
Warning: Stopping mpd.service, but it can still be activated by:
mpd.socket

I figured something else out. It is auto restarting.

I tried systemctl stop mpd.
Then I tried systemctl disable mpd.

Jun 24 16:40:33 mylaptop systemd[1]: Started Music Player Daemon.
Jun 24 16:40:33 mylaptop libsmbclient[21618]: client: [0] opened from myip

It just restarts after a minute or two. When I do :
systemctl status mpd it lists it as active after i stopped and disabled it.

Short of uninstalling it, I don't know how to keep it from reactivating itself and showing up in the list of open ports on nmap -p 6600 myip scan.

Have a cool day.

thanks,
roboloki

Last edited by mtdew3q; 06-24-2020 at 11:53 AM.
 
Old 06-24-2020, 03:34 PM   #2
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Original Poster
Rep: Reputation: 18
Hi all-

I had to disable like this:

# systemctl stop mpd

# systemctl disable mpd

# systemctl mask mpd

# systemctl stop mpd.socket

# systemctl disable mpd.socket

I re-enabled the socket after disabling everything.

(edit) Also, I commented out the bind_to_address that is found in
the mpd.conf file.

The socket is now listening for a connection. The port won't show up as open anymore.

Now all my ports are closed in nmap.
Host is up (0.000056s latency).
All 65536 scanned ports on computer name and my ip address are closed when I stop playing music.

Some other port opens up when the music is on, but when I shut pulseaudio and rhythmbox and rescan with nmap it closes.

That is kind of what I wanted. I didn't know why that port is open even if I didn't listen to music .

PS I also learned today that :: is all 0's which is like 0.0.0.0.
It is still cool to close the open port that is listed when running nmap

thanks.

Last edited by mtdew3q; 06-24-2020 at 05:53 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Listening to IPV6 BernardLinux Linux - Networking 3 09-02-2011 04:45 AM
IPv6 mail server - not listening on 110 giorgio7 Linux - Server 6 05-20-2011 04:24 PM
LXer: Another IPv6 Crash Course For Linux: Real IPv6 Addresses, Routing, Name Services LXer Syndicated Linux News 0 04-21-2011 07:40 AM
BIND9 as forwarder, IPv6 queries from IPv6 forwarders Nonoo Linux - Server 1 11-23-2009 01:57 PM
How to set IPv6 address on IPv6 router tlemons Linux - Networking 3 09-17-2007 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration