--- title: "Add a Firewall rule" slug: "add-a-firewall-rule-5" tags: ["Product Usage", "ENS 10.7.x"] updated: 2026-10-07T16:55:45Z published: 2026-10-07T16:55:45Z canonical: "docs.trellix.com/add-a-firewall-rule-5" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Add a Firewall rule Adds a rule to the client-side rule group by specifying a number to the rule. ## Task 1. Log on to the system as a user with administrator rights. 2. Change the directory to the Firewall bin directory: /opt/McAfee/ens/fw/bin 3. Run the command: ./mfefwcli --fw-rule-add - --name — Specify the name of the rule. This is a mandatory option. - --action — Specify the value of the action as allow or deny. This is a mandatory option. - --log — Enable logging for a specified rule when a new packet matches the rule. The subsequent packets within the same connection are not logged. - --direction — Specify the direction (in, out or either) of the traffic to match in a rule. You can specify only one argument. - --state — Specify the status of the rule as either enable or disable. The default value is enable. - --notes — Add a description for the rule for reference. ## Add a rule to deny a traffic on either direction with logging enabled Add a rule to deny a traffic on either direction with logging enabled: ./mfefwcli --fw-rule-add --index 1--name rule_name --action deny --log enable --direction either --state enable --proto any