Commit b044dda2 authored by Joshua Tauberer's avatar Joshua Tauberer

put the ufw status checks in the network section, add a punctuation mark, add changelog entry

parent f66f39b6
...@@ -13,6 +13,7 @@ Control panel: ...@@ -13,6 +13,7 @@ Control panel:
* The users and aliases APIs are now documented on their control panel pages. * The users and aliases APIs are now documented on their control panel pages.
* The HSTS header was missing. * The HSTS header was missing.
* New status checks were added for the ufw firewall.
System: System:
......
...@@ -167,7 +167,6 @@ def run_system_checks(rounded_values, env, output): ...@@ -167,7 +167,6 @@ def run_system_checks(rounded_values, env, output):
check_system_aliases(env, output) check_system_aliases(env, output)
check_free_disk_space(rounded_values, env, output) check_free_disk_space(rounded_values, env, output)
check_free_memory(rounded_values, env, output) check_free_memory(rounded_values, env, output)
check_ufw(env, output)
def check_ufw(env, output): def check_ufw(env, output):
ufw = shell('check_output', ['ufw', 'status']).splitlines() ufw = shell('check_output', ['ufw', 'status']).splitlines()
...@@ -180,7 +179,7 @@ def check_ufw(env, output): ...@@ -180,7 +179,7 @@ def check_ufw(env, output):
output.print_error("Port %s (%s) should be allowed in the firewall, please re-run the setup." % (service["port"], service["name"])) output.print_error("Port %s (%s) should be allowed in the firewall, please re-run the setup." % (service["port"], service["name"]))
if not_allowed_ports == 0: if not_allowed_ports == 0:
output.print_ok("Firewall is active") output.print_ok("Firewall is active.")
else: else:
output.print_warning("""The firewall is disabled on this machine. This might be because the system output.print_warning("""The firewall is disabled on this machine. This might be because the system
is protected by an external firewall. We can't protect the system against bruteforce attacks is protected by an external firewall. We can't protect the system against bruteforce attacks
...@@ -260,6 +259,8 @@ def run_network_checks(env, output): ...@@ -260,6 +259,8 @@ def run_network_checks(env, output):
output.add_heading("Network") output.add_heading("Network")
check_ufw(env, output)
# Stop if we cannot make an outbound connection on port 25. Many residential # Stop if we cannot make an outbound connection on port 25. Many residential
# networks block outbound port 25 to prevent their network from sending spam. # networks block outbound port 25 to prevent their network from sending spam.
# See if we can reach one of Google's MTAs with a 5-second timeout. # See if we can reach one of Google's MTAs with a 5-second timeout.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment