![]() Sudo ufw allow https or sudo ufw allow 443 Sudo ufw allow ftp or sudo ufw allow 21/tcp a) Allow application by name or port number/ range sudo ufw allow ssh or sudo ufw allow 22/tcp ![]() You can easily allow incoming connection on port/range, application name, ip address/ subnet in ufw. To see all service that can be allowed or denied by name, use this command ![]() As mentioned, ssh access can also be allowed by service name, so lets do that now: sudo ufw allow ssh If default rule have that port open, then delete rule will load default rule. This deletes the rule, but does not necessarily blocks the port. To remove the rule you type the following command: sudo ufw delete allow 22/tcp So to allow ssh by port we will use following command sudo ufw allow 22/tcp If you moved the ssh from 22 to any other port, you shouldn't allow ssh by name, you should open that port instead. ![]() In later case, it will only work if you didn't change ssh port. You can add ssh port 22 to list of open incoming ports, or you can add ssh service to list of allowed services. This will allow all outgoing traffic and deny incoming traffic.īefore we enable ufw, we normally want to allow ssh access. First lets setup default rules: sudo ufw default allow outgoing
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |