Swap Firewalld for UFW

  • by

Disable Firewalld:

sudo systemctl status firewalld
sudo systemctl stop firewalld
sudo systemctl disable firewalld
sudo systemctl status firewalld

Basic UFW setup
sudo yum install epel-release
sudo yum -y install ufw
sudo ufw status
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow https
ufw allow mysql
sudo ufw status numbered
sudo ufw enable
sudo systemctl enable ufw

Check you have the required ports working
sudo yum install net-tools
sudo netstat -tunlp

References:

setup firewal UFW:
https://www.netweaver.uk/add-epel-repo-centos-7/
https://www.netweaver.uk/ufw-centos-7/

check ports in use.
https://linuxize.com/post/check-listening-ports-linux/

disable firewalld:
https://linoxide.com/firewall/stop-and-disable-firewall-on-centos/

Leave a Reply

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