Install the UFW

  • apt-get install ufw
  • ufw enable

Edit the UFW

  • vim /etc/ufw/before.rules
  • go to the bottom of the file (before COMMIT) and enter your exeptions:
  • #Custom rules
    For SSH:
    -A ufw-before-input -p tcp -s SOURCE-IP –dport 22 -j ACCEPT (minus-minus before dport)
    For HTTP:
    -A ufw-before-input -p tcp -s SOURCE-IP –dport 80 -j ACCEPT
    For HTTPS:
    -A ufw-before-input -p tcp -s SOURCE-IP –dport 443 -j ACCEPT
Categories: Security

Leave a Reply

avatar
  Subscribe  
Notify of