Maybe works?

This commit is contained in:
jelly Tomas
2026-05-29 10:37:37 +01:00
parent 2b76e850a5
commit faa6e03d7b
30 changed files with 22 additions and 5254 deletions

View File

@@ -27,12 +27,23 @@ instalar httpd
instalar mod_security
instalar mod_security_crs
# Enable ModSecurity blocking engine (change DetectionOnly to On)
if [ -f /etc/httpd/conf.d/mod_security.conf ]; then
sudo sed -i 's/SecRuleEngine DetectionOnly/SecRuleEngine On/g' /etc/httpd/conf.d/mod_security.conf
fi
if [ -f /etc/httpd/modsecurity.d/modsecurity.conf ]; then
sudo sed -i 's/SecRuleEngine DetectionOnly/SecRuleEngine On/g' /etc/httpd/modsecurity.d/modsecurity.conf
fi
instalar iptables-services
s stop firewalld
s disable firewalld
s mask firewalld
s enable iptables
sudo iptables -F
sudo iptables -A INPUT -p tcp --dport 420 -j ACCEPT
sudo iptables -A INPUT -i lo -p tcp --dport 3000 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 3000 -j REJECT
# nat
sudo sysctl -w net.ipv4.ip_forward=1
@@ -54,9 +65,9 @@ if [[ ! -f "$jspath/package.json" ]]; then
sudo chown -R $USER:$USER "$jspath"
fi
# apache WAF (desativado por default)
s stop httpd
s disable httpd
# apache WAF (ativado por default)
s enable httpd
s start httpd
# correr juice shop via npm
cd "$jspath"