How do I add a port to firewall in Linux?

Giang Phạm

New member
How do I add a port to firewall in Linux?
Answer
Open or close server ports
  1. Log in to the server console.
  2. 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.
17 сент. 2018 г.
 

Tìm kiếm

Back
Top