Skip to content

Instantly share code, notes, and snippets.

@NrI3
Created December 15, 2019 14:54
Show Gist options
  • Save NrI3/7ac98b225629245a910dae4be51b8362 to your computer and use it in GitHub Desktop.
Save NrI3/7ac98b225629245a910dae4be51b8362 to your computer and use it in GitHub Desktop.
Firewall-cmd informacion
# Listar todas las zonas
firewall-cmd --list-all-zones |more
# Listar servicios
firewall-cmd --list-services
# Mostrar informacion de un servicio
firewall-cmd --info-service=[name_service]
firewall-cmd --info-service=ssh
# Modificar el puerto de un servicio permanentemente
firewall-cmd --service=[name_service] --remove-port=[previus_port/protocol] --permanent
firewall-cmd --service=[name_service] --add-port=[previus_port/protocol] --permanent
firewall-cmd --reload
# example
firewall-cmd --service=[name_service] --remove-port=22/tcp --permanent
firewall-cmd --service=[name_service] --add-port=4444/tcp --permanent
firewall-cmd --reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment