我安装了Bash on Ubuntu on Windows
,输入时出现以下内容netstat -atn
。我现在知道为什么它没有输出任何内容。
mona@DESKTOP-37GGNHL:~$ netstat -atn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
我需要确保我的机器遵循本文档中有关开放端口的规则:
对于在机器上打开的每个新程序,RenderDoc 连续使用 TCP 和 UDP 端口 38920-38927 进行远程访问和控制(即远程捕获)。请注意,即使您在本地启动捕获,这些端口仍会打开以进行监听。这些是远程主机上探测的端口,用于查看是否存在连接。
RenderDoc 还使用 TCP 和 UDP 端口 39920 进行远程重放连接,用于使用远程主机重放和分析日志。
netstat -atn
我在 cmd 中获得以下结果:
C:\Users\mona>netstat -atn
Active Connections
Proto Local Address Foreign Address State Offload State
TCP 0.0.0.0:22 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:1536 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:1537 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:1538 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:1539 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:1540 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:1546 0.0.0.0:0 LISTENING InHost
TCP 0.0.0.0:57621 0.0.0.0:0 LISTENING InHost
TCP 10.140.235.155:139 0.0.0.0:0 LISTENING InHost
TCP 10.140.235.155:1550 65.52.108.191:443 ESTABLISHED InHost
TCP 10.140.235.155:1568 65.52.108.203:443 ESTABLISHED InHost
TCP 10.140.235.155:1579 205.213.108.151:443 ESTABLISHED InHost
TCP 10.140.235.155:1580 205.213.108.157:443 ESTABLISHED InHost
TCP 10.140.235.155:1593 209.85.147.188:5228 ESTABLISHED InHost
TCP 10.140.235.155:1600 205.213.108.147:443 ESTABLISHED InHost
TCP 10.140.235.155:1624 157.56.52.17:40015 CLOSE_WAIT InHost
TCP 10.140.235.155:1628 91.190.218.66:12350 CLOSE_WAIT InHost
TCP 10.140.235.155:1649 193.235.32.146:4070 ESTABLISHED InHost
TCP 10.140.235.155:1770 205.213.108.151:443 ESTABLISHED InHost
TCP 10.140.235.155:1847 192.30.253.124:443 ESTABLISHED InHost
TCP 10.140.235.155:1917 205.213.114.185:80 ESTABLISHED InHost
TCP 10.140.235.155:1945 151.101.65.69:443 ESTABLISHED InHost
TCP 10.140.235.155:1987 198.252.206.25:443 ESTABLISHED InHost
TCP 10.140.235.155:1994 198.252.206.25:443 ESTABLISHED InHost
TCP 10.140.235.155:2100 192.186.157.43:6667 ESTABLISHED InHost
TCP 10.140.235.155:2125 104.20.111.39:443 ESTABLISHED InHost
TCP 10.140.235.155:2162 104.20.7.245:443 ESTABLISHED InHost
TCP 10.140.235.155:2207 104.16.97.40:443 ESTABLISHED InHost
TCP 10.140.235.155:2208 151.101.45.140:443 ESTABLISHED InHost
TCP 10.140.235.155:2245 151.101.65.69:80 ESTABLISHED InHost
TCP 10.140.235.155:2265 216.58.216.202:443 ESTABLISHED InHost
TCP 10.140.235.155:2288 151.101.1.69:80 ESTABLISHED InHost
TCP 10.140.235.155:2292 151.101.1.69:80 ESTABLISHED InHost
TCP 10.140.235.155:2310 172.217.4.102:443 ESTABLISHED InHost
TCP 10.140.235.155:2311 151.101.65.69:80 ESTABLISHED InHost
TCP 10.140.235.155:2313 23.222.196.138:443 ESTABLISHED InHost
TCP 10.140.235.155:2321 198.252.206.25:443 ESTABLISHED InHost
TCP 10.140.235.155:2322 151.101.65.69:80 ESTABLISHED InHost
TCP 10.140.235.155:2325 23.222.193.111:443 ESTABLISHED InHost
TCP 10.140.235.155:2326 64.4.54.253:443 ESTABLISHED InHost
TCP 10.140.235.155:2330 209.95.38.214:443 TIME_WAIT InHost
TCP 10.140.235.155:2333 204.79.197.200:443 ESTABLISHED InHost
TCP 10.140.235.155:2334 204.79.197.200:443 ESTABLISHED InHost
TCP 10.140.235.155:2335 216.58.193.131:443 ESTABLISHED InHost
TCP 10.140.235.155:2336 204.79.197.200:443 ESTABLISHED InHost
TCP 10.140.235.155:33659 0.0.0.0:0 LISTENING InHost
TCP 127.0.0.1:4370 0.0.0.0:0 LISTENING InHost
TCP 127.0.0.1:4371 0.0.0.0:0 LISTENING InHost
TCP 127.0.0.1:4380 0.0.0.0:0 LISTENING InHost
TCP 127.0.0.1:4381 0.0.0.0:0 LISTENING InHost
TCP 127.0.0.1:5354 0.0.0.0:0 LISTENING InHost
TCP 127.0.0.1:9990 0.0.0.0:0 LISTENING InHost
TCP 127.0.0.1:65000 0.0.0.0:0 LISTENING InHost
TCP [::]:22 [::]:0 LISTENING InHost
TCP [::]:135 [::]:0 LISTENING InHost
TCP [::]:445 [::]:0 LISTENING InHost
TCP [::]:1536 [::]:0 LISTENING InHost
TCP [::]:1537 [::]:0 LISTENING InHost
TCP [::]:1538 [::]:0 LISTENING InHost
TCP [::]:1539 [::]:0 LISTENING InHost
TCP [::]:1540 [::]:0 LISTENING InHost
TCP [::]:1546 [::]:0 LISTENING InHost
TCP [::1]:1721 [::]:0 LISTENING InHost
UDP 0.0.0.0:3544 *:*
UDP 0.0.0.0:5050 *:*
UDP 0.0.0.0:5353 *:*
UDP 0.0.0.0:5353 *:*
UDP 0.0.0.0:5353 *:*
UDP 0.0.0.0:5353 *:*
UDP 0.0.0.0:5355 *:*
UDP 0.0.0.0:49664 *:*
UDP 0.0.0.0:49678 *:*
UDP 0.0.0.0:49679 *:*
UDP 0.0.0.0:52881 *:*
UDP 0.0.0.0:54931 *:*
UDP 0.0.0.0:57621 *:*
UDP 0.0.0.0:58254 *:*
UDP 0.0.0.0:61946 *:*
UDP 0.0.0.0:61947 *:*
UDP 10.140.235.155:137 *:*
UDP 10.140.235.155:138 *:*
UDP 10.140.235.155:1900 *:*
UDP 10.140.235.155:5353 *:*
UDP 10.140.235.155:33659 *:*
UDP 10.140.235.155:49675 *:*
UDP 10.140.235.155:52882 *:*
UDP 10.140.235.155:64166 *:*
UDP 127.0.0.1:1900 *:*
UDP 127.0.0.1:48200 *:*
UDP 127.0.0.1:48201 *:*
UDP 127.0.0.1:49666 *:*
UDP 127.0.0.1:49667 *:*
UDP 127.0.0.1:49668 *:*
UDP 127.0.0.1:49669 *:*
UDP 127.0.0.1:49670 *:*
UDP 127.0.0.1:49676 *:*
UDP 127.0.0.1:59881 *:*
UDP 127.0.0.1:59882 *:*
UDP 127.0.0.1:59883 *:*
UDP 127.0.0.1:59884 *:*
UDP 127.0.0.1:59885 *:*
UDP 127.0.0.1:59886 *:*
UDP 127.0.0.1:59887 *:*
UDP 127.0.0.1:59888 *:*
UDP 127.0.0.1:62712 *:*
UDP 127.0.0.1:63911 *:*
UDP 127.0.0.1:63912 *:*
UDP 127.0.0.1:65000 *:*
UDP [::]:5353 *:*
UDP [::]:5353 *:*
UDP [::]:5353 *:*
UDP [::]:5355 *:*
UDP [::]:49665 *:*
UDP [::]:52881 *:*
UDP [::]:61947 *:*
UDP [::1]:1900 *:*
UDP [::1]:5353 *:*
UDP [::1]:49674 *:*
UDP [fe80::7449:2c48:9a7b:e1ab%7]:1900 *:*
UDP [fe80::7449:2c48:9a7b:e1ab%7]:49673 *:*
基本上,检查两个整数之间的端口范围的命令是什么?
如何连续打开TCP和UDP端口38920-38927?
答案1
查看此链接,了解在 Bash 下打开 tcp 和 udp 套接字的指南: