kali linux如何打开端口,Kali-Linux Netstat命令未显示端口

我一直在运行kali的远程桌面中使用netstat命令,但未得到任何结果。

这是我使用netstat后得到的全部

Active Internet connections (w/o servers)

Proto Recv-Q Send-Q Local Address Foreign Address State

Active UNIX domain sockets (w/o servers)

Proto RefCnt Flags Type State I-Node Path

最佳答案

您正在运行的Kali Linux OS实例在任何网络端口上都没有侦听任何进程,或者没有可用于侦听任何协议的网络适配器/ NIC。

检查网络适配器状态

You can check the "status" of any network interface by running the nmicli device status command and view the STATE of the interface.

A connected state listed on an interface means that interface (e.g. eth0) is capable of being used to listen for traffic coming in on specific ports.

An unavailable state listed on an interface (e.g. eth0) means that interface is not capable of being used to listen for traffic coming in on specific ports.

You can also check the state of any network interface by running the ip link show command and viewing the state of the adapter.

state UP means "connected" (same as #1 above)

state DOWN means "unavailable" (same as #1 above)

检查所有端口

If you have network interfaces that are available and capable of accepting incoming traffic, then be extra thorough with checking the ports listening on the system by running nmap -sT -sU -p- localhost and scan all ports.

“关闭了本地主机(127.0.0.1)上的所有131010扫描端口”的结果或表示某种意义的结果。 。 。

服务器没有进程监听任何端口。要么

服务器上的网络接口不可用于传入的TCP或UDP通信

Using netstat -lpntu Command

Use the -lpntu parameters with the netstat command to list the ports that are listening or opened for both TCP and UDP connections on the server.

netstat -lpntu

输出量

注意:如果服务器上有任何进程正在侦听任何端口,那么您将在输出中看到它们(以下示例)。如果

您在运行此命令时未获得任何记录,然后

就是说,没有任何内容在监听任何TCP端口,也没有接受任何UDP流量。

服务器。

[root@Test123 ~]# netstat -lpntu

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2617/sshd

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2724/master

tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 3043/syslog-ng

tcp6 0 0 :::22 :::* LISTEN 2617/sshd

tcp6 0 0 ::1:25 :::* LISTEN 2724/master

udp 0 0 0.0.0.0:514 0.0.0.0:* 3043/syslog-ng

udp 0 0 0.0.0.0:68 0.0.0.0:* 2437/dhclient

更多资源

-l, --listening

Show only listening sockets. (These are omitted by default.)

-p, --program

Show the PID and name of the program to which each socket belongs.

TCP

[--tcp|-t]

UDP

[--udp|-u]

Local Address

Address and port number of the local end of the socket. Unless the

--numeric (-n) option is specified, the socket address is

resolved to its canonical host name (FQDN), and the port number is

translated into the corresponding service name.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值