Sunday, November 11, 2018

Configure ufw

/* Installation: */
# apt-get update
# apt-get install ufw gufw

/* Enable ufw */
# ufw enable

/* Disable ufw */
# ufw disable

/* Add rules */
# ufw allow from 192.168.0.251
# ufw deny 80/tcp

/* Delete rules */
# ufw delete allow from 192.168.0.251

/* Reload ufw */
# ufw reload

/* Delet rules and disable ufw */
# ufw reset

/* Check current status */
# ufw status verbose

/* Check ufw logs */
# tail -n 30 -f /var/log/messages

/* Start on boot */
# vi /etc/rc.local
/usr/sbin/ufw enable
/usr/sbin/ufw allow from 192.168.0.251
/usr/sbin/ufw deny 80/tcp
/usr/sbin/ufw allow 79:81/tcp
/usr/sbin/ufw deny in on eth0
/usr/sbin/ufw allow out on eth0
[ESC]:ZZ


No comments:

Post a Comment