How to Configure Your Firewall

February 17, 2023 / Security and Backups

This article will guide you on how to configure Firewall. The basic function of a firewall is to let safe traffic in while blocking harmful traffic.

  1. Let us first check whether the chosen port is open and not blocked. All ports must be open by default if the VPS configuration is new.
  2. You must upgrade your firewall settings to permit received networks to the newest port.
  3. Execute the following command:
    sudo (firewall name) allow 1026/tcp
    e.g.
    sudo ufw allow 1026/tcp
  4. Now, let us restart the SSH service using the following commands:
    1. On Debian and Ubuntu:
      sudo service ssh restart
    2. On Debian and Ubuntu with systemd:
      sudo systemctl restart ssh
    3. On CentOS and Fedora:
      sudo service sshd restart
    4. On CentOS and Fedora with systemd:
      sudo systemctl restart sshd

This way, you can configure your firewall. Wasn’t it easy? For more information on firewalls, do check our WHUK’s KB section on a regular basis.

Dominos Search