sudo ufw allow <PORT_NUMBER>
sudo lsof +M -i4
# Linux
ss -ltn
# windows
netstat -a -p -n tcp | findstr LISTENING
# SOURCE
https://solace.community/discussion/26/how-to-find-a-free-tcp-port-for-testing-pubsub-with-docker
dmesg | grep tty
# to kill port 80 simply use
sudo fuser 80/tcp -k
sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-65000