我最近安装了两台 Ubuntu Server 机器,我想在机器中找到开放的端口。
当我nmap从我的机器(Ubuntu 11.10)运行时,我观察到两台服务器都有
135/tcp filtered msrpc
4444/tcp filtered krb524
4662/tcp filtered edonkey
5000/tcp filtered upnp
5631/tcp filtered pcanywheredata
Run Code Online (Sandbox Code Playgroud)
我从来没有打开过这些端口。我只安装了 LAMP 和 SAMBA。为什么这些端口是开放的?
开放端口的完整列表是:
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
110/tcp open pop3
135/tcp filtered msrpc
139/tcp open netbios-ssn
143/tcp open imap
445/tcp open microsoft-ds
993/tcp open imaps
995/tcp open pop3s
4444/tcp filtered krb524
4662/tcp filtered edonkey
5000/tcp filtered upnp
5631/tcp filtered pcanywheredata
Run Code Online (Sandbox Code Playgroud)
问题是为什么这些端口是开放的:135/tcp filtered msrpc, 4444/tcp filtered krb524, 4662/tcp filtered edonkey. 5000/tcp filtered upnp, 5631/tcp filtered pcanywheredata. 我从来没有打开过这些端口。我只安装了 LAMP 和 SAMBA。
该列表看起来安全吗?
您可以从名为 /etc/services 的文件中获取端口列表
cat /etc/services | grep 137 (example)
Run Code Online (Sandbox Code Playgroud)
例子
Samba 通信需要打开哪些端口
netbios-ns - 137 # NETBIOS Name Service
netbios-dgm - 138 # NETBIOS Datagram Service
netbios-ssn - 139 # NETBIOS session service
microsoft-ds - 445 # if you are using Active Directory
Run Code Online (Sandbox Code Playgroud)
运行这个命令
netstat -anltp | grep "LISTEN"
运行 FTP、SSH 和 MySQL 的典型 Web 服务器将具有如下输出:
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 21432/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4090/apache2
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 7213/sshd
tcp6 0 0 :::21 :::* LISTEN 19023/proftpd
tcp6 0 0 :::22 :::* LISTEN 7234/sshd
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
51878 次 |
| 最近记录: |