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
0 0 vote
Article Rating
Categories: Security

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x