Click here to view code image
matthew@seymour~:$ sudo ufw enable
To disable UFW, replace enable with disable.
Table 20.1 Useful Commands for UFW
Command Actions PerformedUsage: sudo ufw
commandenable Enables the firewalldisable Disables the firewallreload Reloads the firewall to ensure changes are applieddefault
allow|deny|rejectSets default policylogging on|off Toggles logging (can also be used to set the level of
logging; see the man page)allow ARGS Adds an allow ruledeny ARGS Adds a deny rulereject ARGS Adds a reject rulelimit ARGS Adds a limit ruledelete RULE Deletes the rulestatus shows Shows the firewall statusstatus numbered Shows the firewall status as a numbered list of rulesUsage: ufw
commandstatus verbose Shows verbose firewall status