Firecfg - Linux


Firecfg is a command-line tool for configuring and managing firewall rules in a Linux system. It provides a simple and efficient way to define, modify, and manage firewall settings, offering greater control over network security.


firecfg [-hV] [-a] [-d] [-r] [-t] [-u] [-i <interface>] [-n <name>]


  • -h: Display usage help.
  • -V: Print version information.
  • -a: Add a new firewall rule.
  • -d: Delete an existing firewall rule by name.
  • -r: Replace an existing firewall rule by name.
  • -t: Print a table of current firewall rules.
  • -u: Update an existing firewall rule by name.
  • -i : Specify network interface to manage rules for.
  • -n : Specifies the name of the firewall rule.


Add a new rule

firecfg -a -n my-rule -t INPUT -p tcp --dport 80 -j ACCEPT

Delete a rule

firecfg -d -n my-rule

Modify a rule

firecfg -u -n my-rule -p udp --dport 53 -j ACCEPT

List all rules

firecfg -t

Common Issues

  • Ensure your user has root privileges to modify firewall rules.
  • Check that the specified interface name is correct.
  • Verify that the specified rule name is unique.
  • Make sure you understand the implications of modifying firewall rules before applying changes.


  • Firecfg can be used in conjunction with other network management commands, such as iptables.
  • It can be integrated into scripts or configuration files for automated firewall management.

Related Commands

  • iptables
  • firewall-cmd
  • ufw