mirror of
https://github.com/yuriskinfo/cheat-sheets.git
synced 2025-12-21 13:23:11 +01:00
Added to firewall-cmd for RHEL firewall cmds
This commit is contained in:
@@ -65,6 +65,25 @@ else helps.
|
||||
|
||||
|===
|
||||
|
||||
=== Open, close ports
|
||||
|
||||
[cols=2, options="header"]
|
||||
|===
|
||||
|Command
|
||||
|Description
|
||||
|
||||
|*firewall-cmd --add-port=_port-number_/_protocol_*
|
||||
|Open incoming _port-number_ of the _protocol_. E.g. opem incoming TCP port
|
||||
5900: `firewall-cmd --add-port=5900/tcp`
|
||||
|
||||
|
||||
|*firewall-cmd --remove-port=_port-number_/_protocol_*
|
||||
|Close the open _port-number_. E.g. close the open port 5900/tcp: `firewall-cmd --remove-port=5900/tcp`
|
||||
|
||||
|*firewall-cmd --runtime-to-permanent*
|
||||
|Make the changed rules permanent to survive reboot.
|
||||
|
||||
|===
|
||||
|
||||
== Ubuntu Uncomplicated Firewall (ufw)
|
||||
.ufw management commands
|
||||
|
||||
Reference in New Issue
Block a user