Solució ufw
De wikiserver
La revisió el 17:06, 23 març 2017 per Jnoguera (Discussió | contribucions)
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 from IP to any port 22 6. sudo ufw allow 80 7.1 sudo ufw deny 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" . hay que reiniciar el servicio para que el cambio tenga efecto. sudo service ufw restart 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 numbered 13. sudo ufw delete 1