This script is designed to help configure and manage firewalls on a Linux system, using two firewall management tools: firewalld(Firewall-CMD) and UFW(Uncomplicated Firewall). It allows you to open and close ports, enable or disable the firewall, list active rules, and show the status of the firewalls.
Additionally, this script offers the functionality to specify interfaces (e.g., eth0, enp1s0) when enabling or disabling ports, allowing more control over the firewall rules especially if you're a newbie.
- firewalld and UFW:
- Enable or disable ports with interface restrictions.
- List active firewall rules.
- Enable or disable firewall.
- Show the status of firewall.
- firewalld or UFW installed and configured on your system.
sudo
privileges to modify firewall settings.
- Download the script using curl:
curl -sSL https://github.com/cfunkz/linux-firewall-autoconfig/raw/main/firewall_config.sh -o firewall_config.sh chmod +x firewall_config.sh ./firewall_config.sh