mirror of
https://github.com/imthenachoman/How-To-Secure-A-Linux-Server.git
synced 2025-12-06 09:12:47 +01:00
18
README.md
18
README.md
@@ -1449,10 +1449,10 @@ You can create rules by explicitly specifying the ports or with application conf
|
|||||||
1. Allow additional traffic as per your needs. Some common use-cases:
|
1. Allow additional traffic as per your needs. Some common use-cases:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
# allow traffic out on port 53 -- DNS
|
# allow traffic out to port 53 -- DNS
|
||||||
sudo ufw allow out 53 comment 'allow DNS calls out'
|
sudo ufw allow out 53 comment 'allow DNS calls out'
|
||||||
|
|
||||||
# allow traffic out on port 123 -- NTP
|
# allow traffic out to port 123 -- NTP
|
||||||
sudo ufw allow out 123 comment 'allow NTP out'
|
sudo ufw allow out 123 comment 'allow NTP out'
|
||||||
|
|
||||||
# allow traffic out for HTTP, HTTPS, or FTP
|
# allow traffic out for HTTP, HTTPS, or FTP
|
||||||
@@ -1464,7 +1464,11 @@ You can create rules by explicitly specifying the ports or with application conf
|
|||||||
# allow whois
|
# allow whois
|
||||||
sudo ufw allow out whois comment 'allow whois'
|
sudo ufw allow out whois comment 'allow whois'
|
||||||
|
|
||||||
# allow traffic out on port 68 -- the DHCP client
|
# allow mails for status notifications -- choose port according to your provider
|
||||||
|
sudo ufw allow out 25 comment 'allow SMTP out'
|
||||||
|
sudo ufw allow out 587 comment 'allow SMTP out'
|
||||||
|
|
||||||
|
# allow traffic out to port 68 -- the DHCP client
|
||||||
# you only need this if you're using DHCP
|
# you only need this if you're using DHCP
|
||||||
sudo ufw allow out 67 comment 'allow the DHCP client to update'
|
sudo ufw allow out 67 comment 'allow the DHCP client to update'
|
||||||
sudo ufw allow out 68 comment 'allow the DHCP client to update'
|
sudo ufw allow out 68 comment 'allow the DHCP client to update'
|
||||||
@@ -1546,6 +1550,14 @@ You can create rules by explicitly specifying the ports or with application conf
|
|||||||
> 43/tcp (v6) ALLOW OUT Anywhere (v6) # allow whois
|
> 43/tcp (v6) ALLOW OUT Anywhere (v6) # allow whois
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
|
7. If you need to delete a rule
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
sudo ufw status numbered
|
||||||
|
[...]
|
||||||
|
sudo ufw delete 3 #line number of the rule you want to delete
|
||||||
|
```
|
||||||
|
|
||||||
#### Default Applications
|
#### Default Applications
|
||||||
|
|
||||||
ufw ships with some default applications. You can see them with:
|
ufw ships with some default applications. You can see them with:
|
||||||
|
|||||||
Reference in New Issue
Block a user