Difference between revisions of "SELinux,Fail2ban,Security Configurations"
Jump to navigation
Jump to search
| (One intermediate revision by the same user not shown) | |||
| Line 88: | Line 88: | ||
openssl req -newkey rsa:4096 -nodes -keyout /etc/pki/nginx/private/server.key -x509 -days 365 -out /etc/pki/nginx/server.crt -subj "/C=GH/ST=Greater Accra/L=Accra/O=Rhomicom Demo/OU=IT/CN=*.rhomicom.com/[email protected]" | openssl req -newkey rsa:4096 -nodes -keyout /etc/pki/nginx/private/server.key -x509 -days 365 -out /etc/pki/nginx/server.crt -subj "/C=GH/ST=Greater Accra/L=Accra/O=Rhomicom Demo/OU=IT/CN=*.rhomicom.com/[email protected]" | ||
| − | </syntaxhighlight><span> </span> | + | </syntaxhighlight> |
| + | <syntaxhighlight lang="shell"> | ||
| + | openssl req -newkey rsa:4096 -nodes -keyout /etc/ssl/private/nginx-selfsigned.key -x509 -days 365 -out /etc/ssl/certs/nginx-selfsigned.crt -subj "/C=GH/ST=Greater Accra/L=Accra/O=Rhomicom Demo/OU=IT/CN=*.rhomicom.com/[email protected]" | ||
| + | |||
| + | </syntaxhighlight> | ||
| + | <span> </span> | ||
openssl dhparam -out /etc/pki/nginx/dhparam.pem 4096 | openssl dhparam -out /etc/pki/nginx/dhparam.pem 4096 | ||
nano /etc/nginx/nginx.conf #(# Add DH parameters | nano /etc/nginx/nginx.conf #(# Add DH parameters | ||
Latest revision as of 21:46, 29 January 2024
Install firewalld
sudo yum install firewalld sudo systemctl start firewalld sudo systemctl enable firewalld sudo systemctl status firewalld
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --permanent --list-all sudo firewall-cmd --reload
nano /etc/firewalld/firewalld.conf # AllowZoneDrifting=no
Follow this link for Additional Firewall-Cmd Commands
SELinux Permissions
setsebool -P httpd_can_network_connect 1 setsebool -P httpd_execmem 1 setsebool -P httpd_setrlimit 1 setsebool -P httpd_can_sendmail 1 setsebool -P allow_httpd_mod_auth_pam 1 setsebool -P httpd_mod_auth_pam 1 setsebool -P