当前位置: 首页 > wzjs >正文

宁波育才建设教育集团网站赣州新闻最新消息

宁波育才建设教育集团网站,赣州新闻最新消息,备份wordpress的文章,济南正规的网站制作目录 Linux 使用 nc(netcat)临时监听端口 使用 socat 监听端口 Windows telnet ssh curl wget tcping 在 Linux 服务端启动一个端口,本质上是让某个服务监听指定的端口,以便接收外部的网络请求 Linux 使用 nc(ne…

目录

Linux

使用 nc(netcat)临时监听端口

使用 socat 监听端口

 Windows

telnet

 ssh

 curl

 wget

 tcping


在 Linux 服务端启动一个端口,本质上是让某个服务监听指定的端口,以便接收外部的网络请求

Linux

使用 nc(netcat)临时监听端口

nc 是一个简单且强大的网络工具,可用于创建 TCP 或 UDP 连接,也能用来临时监听端口。

  • 监听 TCP 端口:如果要监听 TCP 协议的 8080 端口,在终端输入以下命令:
nc -l -p 8080

参数解释:

  • -l:开启监听模式。
  • -p:指定要监听的端口号。

  • 监听 UDP 端口:若要监听 UDP 协议的 9090 端口,使用如下命令:
nc -ul -p 9090

其中 -u 选项表示使用 UDP 协议。

使用 socat 监听端口

socat 是一个多功能的网络工具,能够处理各种网络连接场景。

  • 监听 TCP 端口:要监听 TCP 协议的 8888 端口,可执行以下命令:

socat TCP-LISTEN:8888,fork STDOUT

参数解释:

  • TCP-LISTEN:8888:表示监听 TCP 协议的 8888 端口。
  • fork:当有新的连接请求时,socat 会创建一个子进程来处理该连接,这样可以同时处理多个连接。
  • STDOUT:将接收到的数据输出到标准输出。

  • 监听 UDP 端口:若要监听 UDP 协议的 7777 端口,使用命令:

socat UDP-LISTEN:7777,fork STDOUT

 Windows

telnet


这个命令在windows/linux上通用,要是在windows上,首先要看这个服务是不是开启的。

控制面板 -> 程序 -> 启用或关闭 Windows功能 -> Telnet客户端


用法:(注意中间是空格,不是冒号了)

telnet ip port

 开放的端口

[appuser&dp-core-bat ~]$ telnet 10.172.123.253 28080
Trying 10.172.123.253...
Connected to 10.172.123.253


不开放的端口

[appuser&dp-core-bat ~]$ telnet 10.172.123.253 28081
Trying 10.172.123.253...
telnet: connect to address 10.172.123.253: Connection refused

 ssh

用法

        ssh -v -p port ip

说明:

        v 调试模式(会打印日志)
        p 指定端口
        username:远程主机的登录用户
        ip:远程主机
 

 开放的端口

C:\Users\Z1561>ssh  -v -p  28031 192.168.96.62
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Connecting to 192.168.96.62 [192.168.96.62] port 28031.
debug1: Connection established.  建立
debug1: identity file C:\\Users\\Z1561/.ssh/id_rsa type 0
debug1: identity file C:\\Users\\Z1561/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_ed25519_sk type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_xmss-cert type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\Z1561/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5

未开放的端口


C:\Users\Z1561>ssh  -v -p  28031 192.168.96.62
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Connecting to 192.168.96.62 [192.168.96.62] port 28031.
debug1: connect to address 192.168.96.62 port 28031: Connection refused
ssh: connect to host 192.168.96.62 port 28031: Connection refused  拒绝

curl


url 是常用的命令行工具,用来请求 Web 服务器。它的名字就是客户端(client)的 URL 工具的意思。

用法

curl ip:port
 

开放的端口

[appuser&dp-core-bat ~]$ curl 10.172.123.253 28080
<HTML>
<HEAD>
<TITLE>Error 404 - Not Found<TITLE>
<BODY>
</BODY>
</HTML>


未开放的端口

[appuser&dp-core-bat ~]$ curl 10.172.123.253 28081
curl: (7)Failed connect to 10.172.123.253:28081; Connection refused
 

wget


wget 是一个从网络上自动下载文件的自由工具,支持通过 HTTP、HTTPS、FTP 三个最常见的 TCP/IP协议 下载。

用法

wget ip:port

 

开放的端口

wget 10.172.123.253:28080
Connecting to 1.1.1.1:8000... connected.



未开放的端口

wget 10.172.123.253:28081 
failed: Connection timed out. Retrying.


tcping


这是个第三方工具,下载地址 tcping.exe - ping over a tcp connection。这个工具还可以用来测试TCP的延迟。在官网下载下载 tcping.exe, 复制到 ‘C:\Windows\System32’ 就可以在cmd里面用了。

用法

        tcping ip port

总结 :用telnet、ssh 就可以,其他了接即可

                        
参考:https://blog.csdn.net/qq_43842093/article/details/121914310

http://www.dtcms.com/wzjs/789628.html

相关文章:

  • 各类最牛网站建设wordpress 搭建个人博客
  • 江西省建设网站网站建设公司代理商
  • 洛阳做网站公司地址网站鼠标移上去显示层
  • 江苏商城网站制作公司门户一号wordpress 主题下载
  • 衡阳市网站建设网站如果不备案
  • 河南有名的做网站公司有哪些网站建设中 动态图片
  • 营销型网站建设区别自己怎样建立网站
  • 崇州网站建站个人网站可以做淘宝推广
  • 成都网站设计备案中心查网站
  • 商务网站建设pptwordpress 做成app
  • 电子网站建设策划模板网站关键词怎么填写
  • 网站建设全流程 知乎网站seo优化推广教程
  • 网站开发前端是什么网页制作大宝库
  • 电商网站开发主要设计内容做旅游海报的软件或是网站
  • 可以做兼职的网站有哪些工作青岛网站建设青岛
  • 中牟建设局网站广告设计公司制作
  • 佛山 两学一做 网站商旅通官网app
  • seo网站优化论文wordpress页面发布不
  • 网站内部资源推广方法西宁市精神文明建设网站
  • 瓜果蔬菜做的好的电商网站手机 写wordpress
  • 个人电子邮件注册网站申请wordpress可视化模板编辑器
  • 建站之星授权宾馆的网站回款如何做分录
  • 进一步加强门户网站建设的通知网站虚拟服务器
  • 网站建设与维护报告总结国际消息新闻
  • 网站设计原理网络运营托管
  • 企业网站制作找什么人扬子市建设局网站
  • python做网站 教育营销推广型网站
  • 国际空间站vs中国空间站如何增加网站关键词密度
  • 做网站前端用什么关键词排名优化网站
  • 做盗版小说网站犯法吗小型微利企业所得税优惠政策