SV-270754r1066751_rule
V-270754
SRG-OS-000420-GPOS-00186
UBTU-24-600200
CAT II
10
Configure the application firewall to protect against or limit the effects of DoS attacks by ensuring Ubuntu 24.04 LTS is implementing rate-limiting measures on impacted network interfaces.
To change the Status of ufw to "active" use the following command:
$ sudo ufw enable
Check all the services listening to the ports with the following command:
$ sudo ss -l46ut
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
tcp LISTEN 0 128 [::]:ssh [::]:*
For each service with a port listening to connections, run the following command, replacing "[service]" with the service that needs to be rate limited.
$ sudo ufw limit [service]
Rate-limiting can also be done on an interface. An example of adding a rate-limit on the eth0 interface follows:
$ sudo ufw limit in on eth0
Verify an application firewall is configured to rate limit any connection to the system.
Check all the services listening to the ports with the following command:
$ ss -l46ut
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
tcp LISTEN 0 511 *:http *:*
tcp LISTEN 0 128 [::]:ssh [::]:*
tcp LISTEN 0 128 [::]:ipp [::]:*
tcp LISTEN 0 128 [::]:smtp [::]:*
For each entry, verify the Uncomplicated Firewall (ufw) is configured to rate limit the service ports with the following command:
$ sudo ufw status
Status: active
To Action From
-- ------ ----
80/tcp LIMIT Anywhere
25/tcp LIMIT Anywhere
Anywhere DENY 177.60.7.4
443 LIMIT Anywhere
22/tcp LIMIT Anywhere
80/tcp (v6) LIMIT Anywhere
25/tcp (v6) LIMIT Anywhere
22/tcp (v6) LIMIT Anywhere (v6)
25 DENY OUT Anywhere
25 (v6) DENY OUT Anywhere (v6)
If any port with a state of "LISTEN" that does not have an action of "DENY", is not marked with the "LIMIT" action, this is a finding. If the Status is set to anything other than "active" this is a finding.
V-270754
False
UBTU-24-600200
Verify an application firewall is configured to rate limit any connection to the system.
Check all the services listening to the ports with the following command:
$ ss -l46ut
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
tcp LISTEN 0 511 *:http *:*
tcp LISTEN 0 128 [::]:ssh [::]:*
tcp LISTEN 0 128 [::]:ipp [::]:*
tcp LISTEN 0 128 [::]:smtp [::]:*
For each entry, verify the Uncomplicated Firewall (ufw) is configured to rate limit the service ports with the following command:
$ sudo ufw status
Status: active
To Action From
-- ------ ----
80/tcp LIMIT Anywhere
25/tcp LIMIT Anywhere
Anywhere DENY 177.60.7.4
443 LIMIT Anywhere
22/tcp LIMIT Anywhere
80/tcp (v6) LIMIT Anywhere
25/tcp (v6) LIMIT Anywhere
22/tcp (v6) LIMIT Anywhere (v6)
25 DENY OUT Anywhere
25 (v6) DENY OUT Anywhere (v6)
If any port with a state of "LISTEN" that does not have an action of "DENY", is not marked with the "LIMIT" action, this is a finding. If the Status is set to anything other than "active" this is a finding.
M
5673