TransWikia.com

Firewall won't work on Ubuntu

Ask Ubuntu Asked by jack94 on December 29, 2021

I use Ubuntu 20.04 and firewall won’t work on my device.

I get this message when trying to start firewall with systemctl start firewall:

root@agent:/usr/bin# systemctl start firewall
Job for firewall.service failed because the control process exited with error code.
See "systemctl status firewall.service" and "journalctl -xe" for details.

root@agent:/usr/bin# systemctl status firewall
● firewall.service - apply firewall rules at startup
   Loaded: loaded (/etc/systemd/system/firewall.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2020-07-24 14:54:56 CEST; 39s ago
  Process: 816 ExecStart=/etc/firewall (code=exited, status=203/EXEC)

Jul 24 14:54:56 agent systemd[1]: Starting apply firewall rules at startup...
Jul 24 14:54:56 agent systemd[1]: firewall.service: Control process exited, code=exited status=203
Jul 24 14:54:56 agent systemd[1]: Failed to start apply firewall rules at startup.
Jul 24 14:54:56 agent systemd[1]: firewall.service: Unit entered failed state.
Jul 24 14:54:56 agent systemd[1]: firewall.service: Failed with result 'exit-code'.

One Answer

firewall is not the service name to handle for the 'firewall' - we also don't use firewalld by default in 20.04 either.

The default firewall service in Ubuntu 20.04 is ufw - Uncomplicated Firewall.

You control ufw by commands on the command line.

To enable ufw just run sudo ufw enable and it should default to a permit-outbound deny-unrelated-inbound type policy.

To configure ufw please read the manpage of ufw - man ufw - for details on the commands, etc. to manipulate the firewall rules.

Answered by Thomas Ward on December 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP