UFW example
To allow all incoming SSH connections run this command:
sudo ufw allow ssh
An alternative syntax is to specify the port number of the SSH service:
sudo ufw allow 22
Allow Incoming SSH from Specific IP Address or Subnet
To allow incoming SSH connections from a specific IP address or subnet, specify the source. For example, if you want to allow the entire 18.18.18.0/24 subnet, run this command:
sudo ufw allow from 18.18.18.0/24 to any port 22
Allow Incoming Rsync from Specific IP Address or Subnet
Rsync, which runs on port 873, can be used to transfer files from one computer to another.
To allow incoming rsync connections from a specific IP address or subnet, specify the source IP address and the destination port. For example, if you want to allow the entire 18.18.18.0/24 subnet to be able to rsync to your server, run this command:
sudo ufw allow from 18.18.18.0/24 to any port 873
sudo ufw allow ssh
An alternative syntax is to specify the port number of the SSH service:
sudo ufw allow 22
Allow Incoming SSH from Specific IP Address or Subnet
To allow incoming SSH connections from a specific IP address or subnet, specify the source. For example, if you want to allow the entire 18.18.18.0/24 subnet, run this command:
sudo ufw allow from 18.18.18.0/24 to any port 22
Allow Incoming Rsync from Specific IP Address or Subnet
Rsync, which runs on port 873, can be used to transfer files from one computer to another.
To allow incoming rsync connections from a specific IP address or subnet, specify the source IP address and the destination port. For example, if you want to allow the entire 18.18.18.0/24 subnet to be able to rsync to your server, run this command:
sudo ufw allow from 18.18.18.0/24 to any port 873
Comments
Post a Comment