最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Linux測(cè)試端口連通性的5種方法

 更新時(shí)間:2024年06月17日 11:19:02   作者:wacpguo  
在Linux系統(tǒng)中,測(cè)試端口通不通是非常常見(jiàn)的情況之一,比如我們進(jìn)行網(wǎng)絡(luò)調(diào)試的時(shí)候就需要測(cè)試驗(yàn)證對(duì)應(yīng)的端口是否正常,那么Linux中測(cè)試端口通不通的方法是什么?以下是詳細(xì)內(nèi)容介紹

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: */*
>
< HTTP/1.1 404
< Connection:close
< Content-Length:22
< Content-Type:text/html
< X-Frame-Options:sameorigin
<
* Closing connection 0
<html>not found</html>

2、nc

(1)nc -nv    ip  port

[root@localhost ~]# nc -nv 192.168.12.15 3789
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to 192.168.12.15:3789.
^C

(2)nc -nvv  ip  port

?
[root@localhost ~]# nc -nvv 192.168.12.15 3789
Ncat: Version 7.50 ( https://nmap.org/ncat )
NCAT DEBUG: Using system default trusted CA certificates and those in /usr/share/ncat/ca-bundle.crt.
NCAT DEBUG: Unable to load trusted CA certificates from /usr/share/ncat/ca-bundle.crt: error:02001002:system library:fopen:No such file or directory
libnsock nsi_new2(): nsi_new (IOD #1)
libnsock nsock_connect_tcp(): TCP connection requested to 192.168.12.15:3789 (IOD #1) EID 8
libnsock nsock_trace_handler_callback(): Callback: CONNECT SUCCESS for EID 8 [192.168.12.15:3789]
Ncat: Connected to 192.168.12.15:3789.
libnsock nsi_new2(): nsi_new (IOD #2)
libnsock nsock_read(): Read request from IOD #1 [192.168.12.15:3789] (timeout: -1ms) EID 18
libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 26
^C

3、ssh

(1)ssh  -v  -p  port  username@ip      // username任意

[root@localhost ~]# ssh -v -p 3789 root@192.168.12.15
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to 192.168.120.15 [192.168.12.15] port 3789.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
^C

4、wget

(1)wget   ip:port

[root@localhost ~]# wget 192.168.12.15:3789
--2023-03-25 17:05:20--  http://192.168.12.15:3789/
正在連接 192.168.120.15:37777... 已連接。
已發(fā)出 HTTP 請(qǐng)求,正在等待回應(yīng)... ^C?

5、telnet

(1)telnet   ip   port

[root@localhost ~]# telnet 192.168.12.15 3789
Trying 192.168.12.15...
Connected to 192.168.12.15.
Escape character is '^]'.
^CConnection closed by foreign host.

端口通 != 業(yè)務(wù)通

tcp端口通,上面跑的http業(yè)務(wù)可能不通(代理限制)。

tcp層:nc,ssh,telnet

http層:curl,wget

到此這篇關(guān)于Linux測(cè)試端口連通性的5種方法的文章就介紹到這了,更多相關(guān)Linux測(cè)試端口內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • linux系統(tǒng)文件共享samba配置教程

    linux系統(tǒng)文件共享samba配置教程

    大家好,本篇文章主要講的是linux系統(tǒng)文件共享samba配置教程,感興趣的同學(xué)趕快來(lái)看一看吧,對(duì)你有幫助的話記得收藏一下,方便下次瀏覽
    2021-12-12
  • 在Linux中安裝Git的詳細(xì)流程

    在Linux中安裝Git的詳細(xì)流程

    本文介紹在Linux操作系統(tǒng)的Ubuntu版本中,配置分布式開(kāi)源版本控制系統(tǒng)Git,隨后基于Git克隆GitHub中項(xiàng)目的代碼的詳細(xì)方法,需要的朋友可以參考下
    2024-04-04
  • Linux實(shí)現(xiàn)科學(xué)上網(wǎng)

    Linux實(shí)現(xiàn)科學(xué)上網(wǎng)

    本文給大家介紹的是Linux下使用plink ssh + privoxy 實(shí)現(xiàn)局域網(wǎng)共享代理,非常的全面細(xì)致,這里推薦給大家。
    2015-03-03
  • 詳解Linux下掛載新硬盤(pán)方法

    詳解Linux下掛載新硬盤(pán)方法

    這篇文章主要介紹了詳解Linux下掛載新硬盤(pán)方法,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-05-05
  • linux如何編寫(xiě)同步文件的腳本

    linux如何編寫(xiě)同步文件的腳本

    這篇文章主要介紹了linux如何編寫(xiě)同步文件的腳本問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2024-06-06
  • 你知道一臺(tái)Linux服務(wù)器可以負(fù)載多少個(gè)連接嗎

    你知道一臺(tái)Linux服務(wù)器可以負(fù)載多少個(gè)連接嗎

    這篇文章主要給大家介紹了關(guān)于一臺(tái)Linux服務(wù)器可以負(fù)載多少個(gè)連接的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用Linux服務(wù)器具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-09-09
  • Linux中Crontab(定時(shí)任務(wù))命令的用法

    Linux中Crontab(定時(shí)任務(wù))命令的用法

    這篇文章主要介紹了Linux中Crontab(定時(shí)任務(wù))命令的用法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2025-06-06
  • linux No space left on device由索引節(jié)點(diǎn)(inode)爆滿引發(fā)500問(wèn)題

    linux No space left on device由索引節(jié)點(diǎn)(inode)爆滿引發(fā)500問(wèn)題

    這篇文章主要介紹了linux No space left on device由索引節(jié)點(diǎn)(inode)爆滿引發(fā)500問(wèn)題,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-11-11
  • Linux線程之線程的創(chuàng)建、屬性、回收、退出、取消方式

    Linux線程之線程的創(chuàng)建、屬性、回收、退出、取消方式

    文章總結(jié)了線程管理核心知識(shí):線程號(hào)唯一、創(chuàng)建方式、屬性設(shè)置(如分離狀態(tài)與棧大?。?、回收機(jī)制(join/detach)、退出方法(返回/pthread_exit/取消)及注意事項(xiàng),如避免僵尸線程、內(nèi)存釋放、信號(hào)機(jī)制使用限制等
    2025-07-07
  • 讓Apache支持Rewrite靜態(tài)頁(yè)面重寫(xiě)的方法

    讓Apache支持Rewrite靜態(tài)頁(yè)面重寫(xiě)的方法

    Apache下Rewrite靜態(tài)頁(yè)面重寫(xiě)的方法,需要的朋友可以參考下。
    2010-07-07

最新評(píng)論

英吉沙县| 沙河市| 南江县| 公主岭市| 阿克陶县| 东乡族自治县| 绍兴市| 台中县| 临夏市| 秦安县| 诸暨市| 锡林郭勒盟| 泗阳县| 岳池县| 永定县| 松溪县| 达日县| 宜章县| 东安县| 本溪市| 彰化县| 平顶山市| 西城区| 北海市| 淅川县| 黑龙江省| 林芝县| 鲁山县| 临安市| 正阳县| 屏东县| 九龙县| 四子王旗| 沾益县| 黔东| 万山特区| 大余县| 辉县市| 施甸县| 仪征市| 寿阳县|