close all ports on linux code example
Example 1: debian kill open port
fuser -k 3000/tcp //will kill that process.
Example 2: open firewall port in linux
Debian: sudo ufw allow PORT. CentOS: sudo firewall-cmd --zone=public --permanent --add-port=PORT/tcp sudo firewall-cmd --reload