加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – 为什么我无法在Ubuntu上ping端口443?

发布时间:2020-12-14 02:54:09 所属栏目:Linux 来源:网络整理
导读:我通过iptables打开了端口443: pkts bytes target prot opt in out source destination 45 2428 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0 6 1009 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 141 10788 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp d
我通过iptables打开了端口443:
pkts bytes target prot opt in  out source     destination
  45  2428 ACCEPT all  --  lo  *   0.0.0.0/0  0.0.0.0/0
   6  1009 ACCEPT tcp  --  *   *   0.0.0.0/0  0.0.0.0/0 tcp dpt:80
 141 10788 ACCEPT tcp  --  *   *   0.0.0.0/0  0.0.0.0/0 tcp dpt:22
   0     0 ACCEPT tcp  --  *   *   0.0.0.0/0  0.0.0.0/0 tcp dpt:80
   0     0 ACCEPT tcp  --  *   *   0.0.0.0/0  0.0.0.0/0 tcp dpt:443
   7  1140 ACCEPT all  --  *   *   0.0.0.0/0  0.0.0.0/0 state RELATED,ESTABLISHED
   6   360 DROP   all  --  *   *   0.0.0.0/0  0.0.0.0/0

它正在监听netstat -a表示:

Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 *:6311                  *:*                     LISTEN     
tcp        0      0 *:ssh                   *:*                     LISTEN     
tcp        0      0 gauss:ssh               ommited                 ESTABLISHED
tcp        0      0 gauss:ssh               ommited                 ESTABLISHED
tcp6       0      0 localhost:8005          [::]:*                  LISTEN     
tcp6       0      0 [::]:8009               [::]:*                  LISTEN     
tcp6       0      0 [::]:www                [::]:*                  LISTEN     
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
tcp6       0      0 [::]:https              [::]:*                  LISTEN     
udp        0      0 *:mdns                  *:*                                
udp        0      0 *:52703                 *:*                                
udp6       0      0 [::]:42168              [::]:*                             
udp6       0      0 [::]:mdns               [::]:*

但是我不能ping端口443:

PING 443 (0.0.1.187) 56(124) bytes of data.
^C
--- 443 ping statistics ---
7 packets transmitted,0 received,100% packet loss,time 6006ms

这是怎么回事?

解决方法

ping实用程序执行它应该的操作,使用ICMP命中ping接口,您不能只使用它ping任何端口.我确信有一百万种方法可以做到,但大多数人只是使用’telnet IP端口’,即’telnet 1.2.3.4 25’来测试连接.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读