Solució ufw
Solució Exercici UFW
1. sudo ufw enable 2. sudo ufw status verbose 3. sudo ufw allow 22 4. sudo ufw delete allow 22 5. sudo ufw allow form IP to any port 22 6. sudo ufw allow 80 7.1 sudo ufw deny allow 80 7.2 sudo ufw allow from 172.16.204.0/24 to any port 80 8. sudo ufw logging on / sudo ufw logging off 9. /etc/ufw/before.rules and remove the following lines:
- ok icmp codes
-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT -A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT -A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT -A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT -A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT
or change the "ACCEPT" to "DROP" .
10. sudo ufw deny from 172.16.204.0/24 11. sudo ufw deny from 172.16.204.254 to any port 80 12. sudo ufw status numered