的结果ufw status
是
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
30333 ALLOW Anywhere
8200 ALLOW Anywhere
443/tcp ALLOW Anywhere
8200/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
30333 (v6) ALLOW Anywhere (v6)
8200 (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
8200/tcp (v6) ALLOW Anywhere (v6)
然而netstat -an | grep "LISTEN "
回报
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 127.0.1.10:8080 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.10:8080 0.0.0.0:* LISTEN
tcp 0 0 127.0.100.1:8080 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
我期望监听 0.0.0.0:8200...我该如何实现?我显然在这里遗漏了一些东西...
答案1
因为你想检查 8200 端口,你可以使用这个命令sudo netstat -ano -p tcp |grep "8200"
或者使用你正在寻找的端口号进行 grep sudo netstat -an | grep "8200 "