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

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *


Notice: Undefined index: bootstrap in /var/www/wordpress/wp-content/themes/hestia/inc/core/class-hestia-public.php on line 878

Notice: Trying to get property 'src' of non-object in /var/www/wordpress/wp-content/themes/hestia/inc/core/class-hestia-public.php on line 878