IT俱乐部 Linux Linux测试端口连通性的5种方法

Linux测试端口连通性的5种方法

1、curl

(1)curl   -v  ip:port

[root@localhost ~]# curl -v 192.168.120.15:37777
* About to connect() to 192.168.120.15 port 37777 (#0)
*   Trying 192.168.120.15...
* Connected to 192.168.120.15 (192.168.120.15) port 37777 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 192.168.120.15:37777
> Accept: */*
>

(2)curl  -kv https://ip:port

​
[root@localhost ~]# curl -kv https://192.168.12.15:3789
 
* About to connect() to 192.168.12.15 port 3789 (#0)
*   Trying 192.168.12.15...
* Connected to 192.168.12.15 (192.168.12.15) port 3789 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
*       subject: CN=cn.com.ca.d6.agent
*       start date: 4月 26 03:51:05 2021 GMT
*       expire date: 4月 26 03:51:05 2041 GMT
*       common name: cn.com.ca.d6.agent
*       issuer: CN=cn.com.ca.d6.agent
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 192.168.12.15:3789
> Accept: */*
>
not found
本文收集自网络,不代表IT俱乐部立场,转载请注明出处。https://www.2it.club/server/linux/12675.html
上一篇
下一篇
联系我们

联系我们

在线咨询: QQ交谈

邮箱: 1120393934@qq.com

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部