Useful system commands
As a Unix-like system, OPNsense has a lot of useful commands. In the following, we will explore some of these commands.
Let's dive into a practical scenario.
Assume that you lost access to the webGUI and want to find which process is using Transmission Control Protocol (TCP) port 443
on OPNsense. We can find running processes with listening ports on FreeBSD using the sockstat
command:
root@bluebox:/usr/local/etc # sockstat -4l -p 443 USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root nginx 7065 5 tcp4 *:443 *:*
In this example, the nginx
process is using port 443
(just the IPv4 address...