Maybe works?
This commit is contained in:
17
SERVER.sh
17
SERVER.sh
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user