firewalld
configuration
I installed Fedora Server on an old laptop and ran into some issues when I tried accessing an application running on it.
It ended up being a firewall issue, so Fedora uses firewalld
as the firewall, which I haven’t used before, and it blocks most ports be default.
So below is the steps for exposing a MQTT broker on port 1883
firewall-cmd --add-port=1883/tcp --permanent
firewall-cmd --reload
The first command adds the port (1883) and protocol (tcp) as an exception to the firewall, the --permanent
flag will apply this rule permanently (otherwise it will reset when the firewall is reloaded)
The second command just reloads the firewall