Allow HTTPS permanently and apply it to the current runtime configuration.
Which command sequence is appropriate?
Add the service with --permanent, then reload so runtime state reads the permanent configuration.
Detailed explanation
firewall-cmd --permanent --add-service=https; firewall-cmd --reloadCorrect. It writes the permanent rule and then reloads runtime state.
firewall-cmd --remove-service=https; firewall-cmd --stateIncorrect. It removes HTTPS and only checks state.
firewall-cmd --reload --add-service=httpsIncorrect. The options do not form a valid combined operation in that order.
systemctl enable https.serviceIncorrect. systemd service enablement is separate from firewall permission.
Try it yourself
An example you can run in a temporary verification environment.
firewall-cmd --help 2>&1 | grep -E -- '--permanent|--add-service|--reload' | head -n 4Expected result
permanent、add-service、reloadの説明行Key points
- --permanent
- --add-service
- --reload
Notes
- Environment: firewalld firewall-cmd help / ルール変更なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Protected account data
Sensitive authentication data stored separately from ordinary account records.
Service availability
Whether a service can start automatically or be activated on demand.
Packet filter
A host firewall rule set that permits or rejects network packets.