How Do I Enable and Disable a Port in Linux?
Contents How Do I Enable or Disable a Port in Linux? Execute the Following Command, Replacing the Port Placeholder with the Number of the Port to Be Opened...
Contents
How do I enable or disable a port in Linux?
Execute the following command, replacing the PORT placeholder with the number of the port to be opened:
- Debian: sudo ufw allow PORT.
- CentOS: sudo firewall-cmd –zone=public –permanent –add-port=PORT/tcp sudo firewall-cmd –reload.
How do I disable a specific firewall port in Linux?
Run the following command to disable the firewall based on the ECS OS:
- CentOS 6. service iptables stop.
- CentOS 7. systemctl stop firewalld.service.
- Ubuntu. ufw disable.
- Debian. /etc/init.d/iptables stop.