【问题标题】:Network port open, but no process attached?网络端口打开,但没有附加进程?
【发布时间】:2015-07-21 06:52:04
【问题描述】:

当我检查我的服务器时,我发现了一些奇怪的端口:

[root@server ~]# netstat -tulnp |grep "-"
Proto Recv-Q Send-Q Local Address    Foreign Address    State       PID/Program name   
tcp        0      0 0.0.0.0:2049     0.0.0.0:*          LISTEN      -                   
tcp        0      0 0.0.0.0:33181    0.0.0.0:*          LISTEN      -                   
udp        0      0 0.0.0.0:2049     0.0.0.0:*                      -                   
udp        0      0 0.0.0.0:33252    0.0.0.0:*                      -  

netstat -tulnp(with root privilege)的输出中找不到程序。

如何找到这些端口的使用情况?我如何判断它是否安全?

操作系统:CentOS 5.6 x86_64

内核:2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

更新:

# rpcinfo -p
program vers proto   port
100000    2   tcp    111  portmapper
100000    2   udp    111  portmapper
100011    1   udp    824  rquotad
100011    2   udp    824  rquotad
100011    1   tcp    827  rquotad
100011    2   tcp    827  rquotad
100003    2   udp   2049  nfs
100003    3   udp   2049  nfs
100003    4   udp   2049  nfs
100021    1   udp  33252  nlockmgr
100021    3   udp  33252  nlockmgr
100021    4   udp  33252  nlockmgr
100003    2   tcp   2049  nfs
100003    3   tcp   2049  nfs
100003    4   tcp   2049  nfs
100021    1   tcp  33181  nlockmgr
100021    3   tcp  33181  nlockmgr
100021    4   tcp  33181  nlockmgr
100005    1   udp    839  mountd
100005    1   tcp    842  mountd
100005    2   udp    839  mountd
100005    2   tcp    842  mountd
100005    3   udp    839  mountd
100005    3   tcp    842  mountd

【问题讨论】:

  • lsof没有输出
  • 试试lsof -n -i | grep -i 2049

标签: linux


【解决方案1】:

这些可能是portmapper 保留的RPC 端口。 2049 是 NFS 使用的众所周知的端口。您的其他端口可能是其他 RPC 服务。要查询端口映射器以获取服务及其端口的完整列表,请使用rpcinfo -p

【讨论】:

  • 谢谢你,@Andy Brown。正如我在上面显示的rpcinfo -p,不必担心,对吧?
  • 如果您不需要 NFS,那么它应该 be disabled。如果您确实需要它,请确保您已保护它或使用安全的替代方案,例如sshfs.
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-12
  • 2012-10-17
  • 2021-09-24
相关资源
最近更新 更多