成都创新互联网站制作重庆分公司

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

以查询873端口为例:

创新互联建站是专业的顺德网站建设公司,顺德接单;提供成都做网站、网站建设,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行顺德网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!

①      # 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 873(linux 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 ~]#


本文标题:如何查看服务器是否开放某个端口
网址分享:http://cxhlcq.com/article/ijhgpc.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部