1.ssh端口 22
curl -v 10.10.10.205:22
curl -v 10.10.10.205:22 * trying 10.10.10.205:22... * connected to 10.10.10.205 (10.10.10.205) port 22 > get / http/1.1 > host: 10.10.10.205:22 > user-agent: curl/8.4.0 > accept: */* > * received http/0.9 when not allowed * closing connection curl: (1) received http/0.9 when not allowed
2.mysql数据库端口 3306
curl -v 10.10.10.205:3306
curl -v 10.10.10.205:3306 * trying 10.10.10.205:3306... * connected to 10.10.10.205 (10.10.10.205) port 3306 > get / http/1.1 > host: 10.10.10.205:3306 > user-agent: curl/8.4.0 > accept: */* > * received http/0.9 when not allowed * closing connection curl: (1) received http/0.9 when not allowed
3.web应用端口 (jellyfin 8082)
curl -v 10.10.10.205:8082
curl -v 10.10.10.205:8082 * trying 10.10.10.205:8082... * connected to 10.10.10.205 (10.10.10.205) port 8082 > get / http/1.1 > host: 10.10.10.205:8082 > user-agent: curl/8.4.0 > accept: */* > < http/1.1 302 found < content-length: 0 < date: tue, 07 may 2024 13:22:55 gmt < server: kestrel < location: /web/index.html < * connection #0 to host 10.10.10.205 left intact
(wordpress 8088)
curl -v 10.10.10.205:8088
curl -v 10.10.10.205:8088 * trying 10.10.10.205:8088... * connected to 10.10.10.205 (10.10.10.205) port 8088 > get / http/1.1 > host: 10.10.10.205:8088 > user-agent: curl/8.4.0 > accept: */* > < http/1.1 200 ok < date: tue, 07 may 2024 13:20:40 gmt < server: apache/2.4.57 (debian) < x-powered-by: php/8.2.18 < link: <http://10.10.10.205:8088/wp-json/>; rel="https://api.w.org/" < vary: accept-encoding < transfer-encoding: chunked < content-type: text/html; charset=utf-8 < <!doctype html> 。。。 。。。
(tomcat 8080)
curl -v 10.10.10.205:8080
curl -v 10.10.10.205:6666 * trying 10.10.10.205:6666... * connect to 10.10.10.205 port 6666 failed: connection refused * failed to connect to 10.10.10.205 port 6666 after 2051 ms: couldn't connect to server * closing connection curl: (7) failed to connect to 10.10.10.205 port 6666 after 2051 ms: couldn't connect to server c:\users>curl -v 10.10.10.205:8080 * trying 10.10.10.205:8080... * connected to 10.10.10.205 (10.10.10.205) port 8080 > get / http/1.1 > host: 10.10.10.205:8080 > user-agent: curl/8.4.0 > accept: */* > < http/1.1 200 < content-type: text/html;charset=utf-8 < transfer-encoding: chunked < date: tue, 07 may 2024 13:19:25 gmt < <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>apache tomcat/9.0.30</title> 。。。 。。。
4.不存在的端口
curl -v 10.10.10.205:6666
curl -v 10.10.10.205:6666 * trying 10.10.10.205:6666... * connect to 10.10.10.205 port 6666 failed: connection refused * failed to connect to 10.10.10.205 port 6666 after 2051 ms: couldn't connect to server * closing connection curl: (7) failed to connect to 10.10.10.205 port 6666 after 2051 ms: couldn't connect to server
5.被防火墙阻挡的端口
连接一段时间后,提示timeout
以上就是使用curl命令查看服务器端口开放情况的方法的详细内容,更多关于curl查看端口开放情况的资料请关注代码网其它相关文章!
发表评论