1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-26 02:57:04 +00:00

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

This commit is contained in:
Joshua Tauberer 2016-07-29 09:23:36 -04:00
parent f66f39b61d
commit b044dda28f
2 changed files with 4 additions and 2 deletions

View File

@ -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:

View File

@ -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):
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):
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.