Multi-Rule UFW Firewall Rule Generator
Create multiple UFW rules and export them as a ready-to-run bash script.
Rules Added:
# Generated UFW Rules Script
How to Use This UFW Firewall Rule Generator
- Select Allow, Deny, or Limit for your firewall rule.
- Choose a predefined service or manually enter the Port/Protocol (e.g.,
80/tcp
). - Optionally, enter an Application Name (e.g., OpenSSH) instead of a port.
- Specify IP/Subnet if you want to limit the rule to a certain source.
- Add a comment for clarity (optional).
- Select IPv4 and/or IPv6 as needed.
- Click Add Rule to save it to the list.
- When done, click Copy Script or Download as .sh to get your ready-to-run bash script.
- On your Linux server, run:
bash ufw_rules.sh
- Check rules with:
sudo ufw status verbose