上QQ阅读APP看书,第一时间看更新
Checking active connections in Kali
Network statistics (netstat) is a command-line tool that displays the active network connections on your Kali. It is used for finding problems (like Malware that are listening to incoming connections, for example, or malware that are trying to contact external (outgoing) servers). netstat can be used for many reasons. Most of the time, netstat is combined with the grep command, to filter the output results:
netstat -antp
- -a: Shows both the listening and non-listening sockets.
- -n: Shows numerical addresses, instead of trying to determine symbolic hosts, ports, or usernames.
- -t: Shows TCP connections.
- -p: Shows the process identifier (PID) and the name of the program to which each socket belongs:
As you can see in the preceding screenshot, my Kali host is listening on port 80, because I already started the Apache web server service.
To start the Apache web server on Kali, execute the command service apache2 start.