Skip to content

Instantly share code, notes, and snippets.

@eduavila
Last active September 24, 2020 22:19
Show Gist options
  • Save eduavila/9ac33973177b15c7b8a44cdd5ae41c2f to your computer and use it in GitHub Desktop.
Save eduavila/9ac33973177b15c7b8a44cdd5ae41c2f to your computer and use it in GitHub Desktop.
Liberar porta Selinux Centos7

Liberar porta SELinux

Status do SELinux

getenforce

Lista porta liberada

sudo semanage port -l | grep http_port_t

Libera porta no selinux

sudo semanage port -a -t http_port_t -p tcp 8090

Verifica porta no firewall

sudo firewall-cmd --list-all

Torna porta liberada permanente.

sudo firewall-cmd --zone=public --add-port=9443/tcp --permanent

Restart no firewall

sudo firewall-cmd --reload

Libera acesso para escrita pasta

chcon -R -t httpd_sys_rw_content_t /minha_pasta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment