Firewall configuration / DONE

configuring and managing the firewall restricting access to ports

Important: Actions must be performed under the root user

  1. Connect to your server via SSH

  2. Install ufw using the package manager:

    apt install ufw

    UFW - firewall configuration utility is needed for simplified configuration of server network access rules

  3. Add your IP for SSH access to the server (SSH port 22 by default) open port 22 for SSH access if you have a different port, replace the number 22 with your value:

    ufw allow from any to any port 22

    or if you have a static IP address, it is better to restrict SSH access to your IP. see insturctions

  4. Allow http/s 80,443 port ( see instructions )

  5. Enable UFW

    ufw enable

Last updated