温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

如何查看服务器是否开放某个端口

发布时间:2020-06-26 19:02:02 来源:网络 阅读:1375 作者:菜鸟东哥 栏目:建站服务器

以查询873端口为例:

      # ss -lntup|grep 873

[root@backup nfsbackup]# ss-lnutp|grep 873

tcp   LISTEN     0      64                    :::873                  :::*      users:(("xinetd",1810,5))

[root@backup nfsbackup]#

 

      # netstat -lntup|grep 873

[root@backup nfsbackup]# netstat-lnutp|grep 873

tcp        0     0 :::873                     :::*                        LISTEN      1810/xinetd        

[root@backup nfsbackup]#

 

      # lsof -i :873

[root@backup nfsbackup]# lsof -i:873

COMMAND  PID USER  FD   TYPE DEVICE SIZE/OFF NODENAME

xinetd  1810 root   5u  IPv6  12433     0t0  TCP *:rsync (LISTEN)

[root@backup nfsbackup]#

 

      # telnet 10.0.0.41 873linux yuminstall telnet

[root@web02 ~]# telnet 172.16.1.41873

Trying 172.16.1.41...

Connected to 172.16.1.41.

Escape character is '^]'.

@RSYNCD: 30.0

 

      # nc 10.0.0.41 873

[root@web02 ~]# nc 172.16.1.41 873

@RSYNCD: 30.0

 

   # nmap -p 873 10.0.0.41

[root@web02 ~]#nmap -p 873 172.16.1.41          ##扫描主机

 

Starting Nmap 5.51 ( http://nmap.org) at 2017-05-13 13:41 CST

Nmap scan report for backup (172.16.1.41)

Host is up (0.00069s latency).

PORT    STATE SERVICE

873/tcp open  rsync

MAC Address: 00:0C:29:01:17:0F(VMware)

 

Nmap done: 1 IP address (1 host up)scanned in 0.20 seconds

[root@web02 ~]# nmap-p 873 172.16.1.0/24           ###扫描网段

 

Starting Nmap 5.51 ( http://nmap.org) at 2017-05-13 13:41 CST

Nmap scan report for web01(172.16.1.7)

Host is up (0.00018s latency).

PORT    STATE SERVICE

873/tcp closed rsync

 

Nmap scan report for web02(172.16.1.8)

Host is up (0.00072s latency).

PORT    STATE SERVICE

873/tcp closed rsync

MAC Address: 00:0C:29:B1:33:AE(VMware)

 

Nmap scan report for nfs01(172.16.1.31)

Host is up (0.00039s latency).

PORT    STATE SERVICE

873/tcp closed rsync

MAC Address: 00:0C:29:86:08:29(VMware)

 

Nmap scan report for backup(172.16.1.41)

Host is up (0.00057s latency).

PORT    STATE SERVICE

873/tcp open  rsync

MAC Address: 00:0C:29:01:17:0F(VMware)

 

Nmap done: 256 IP addresses (4 hostsup) scanned in 2.02 seconds

[root@web02 ~]#


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI