| 1 |
[[feature-firewall]] |
| 2 |
= Firewall |
| 3 |
|
| 4 |
Cockpit uses https://www.firewalld.org[firewalld] to interact with the |
| 5 |
system's firewall. No firewall configuration UI will be shown if |
| 6 |
firewalld is not installed. |
| 7 |
|
| 8 |
Firewalld controls access to its APIs via PolicyKit. The user logged |
| 9 |
into Cockpit needs to have the appropriate permissions to view or modify |
| 10 |
the settings. |
| 11 |
|
| 12 |
Cockpit can currently only show, add, and remove predefined firewalld |
| 13 |
services in the default zone. |
| 14 |
|
| 15 |
To perform similar tasks from the command line, use |
| 16 |
https://www.firewalld.org/documentation/man-pages/firewall-cmd.html[firewall-cmd]. |
| 17 |
For example, to get the same list of allowed services that Cockpit |
| 18 |
displays: |
| 19 |
|
| 20 |
.... |
| 21 |
$ sudo firewall-cmd --list-services |
| 22 |
dhcpv6-client samba-client mdns ssh cockpit |
| 23 |
.... |
| 24 |
|
| 25 |
To enable an additional service, use: |
| 26 |
|
| 27 |
.... |
| 28 |
$ firewall-cmd --add-service pop3 |
| 29 |
success |
| 30 |
.... |