This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for H in $(ls /etc/apache2/sites-enabled/*) | |
do | |
PORT=80 | |
IP=$(ifconfig | grep 212.239 | sed "s:.*addr\:::" | sed "s: .*::") | |
ROOT=$(cat $H | grep DocumentRoot | sed "s:.* ::") | |
for A in $(cat $H | grep "ServerName\|ServerAlias" | sed "s:^.* ::" | grep -v Server |sort -u) | |
do | |
echo $IP:$PORT:$A:$H:$(basename $H) | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_mime.c> | |
# DEFAULTS | |
DefaultLanguage en | |
AddLanguage en-US .html .css .js | |
AddCharset utf-8 .html .css .js .xml .json .rss .atom | |
# JAVASCRIPT | |
AddType application/javascript js jsonp | |
AddType application/json json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LogFormat "%h %{x-forwarded-for}i %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" combined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install snapd | |
sudo snap install core; sudo snap refresh core | |
# test | |
sudo snap install hello-world | |
hello-world | |
# certbot | |
sudo apt-get remove certbot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>Native Meter samples</p> | |
<meter value="5" min="0" max="10"></meter> | |
<p>Close to optimum</p> | |
<meter value="7" min="0" max="10" optimum="8" low="4" high="6"></meter> | |
<p>Kind of ok</p> | |
<meter value="4" min="0" max="10" optimum="8" low="4" high="6"></meter> | |
<p>Far from optimum</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./easyrsa gen-req <username> nopass | |
./easyrsa sign-req client <username> | |
# in pki/issued il file <username>.crt | |
# in pki/private il file <username>.key | |
# modificare il file client.conf in righe 42, 89, 90 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Verify TLS certificate | |
# See: https://www.mailgun.com/blog/tls-version-1-0-and-1-1-deprecation/ | |
nmap --script ssl-enum-ciphers -p 443 <website> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/bin/bash | |
iptables-save > /etc/iptables/rules.v4 | |
# OR | |
iptables-save > /etc/iptables/rules.v6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check configuration | |
clamconf | |
# manual scan | |
clamscan | |
# visual activity | |
clamdtop | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt install collectd | |
cd /opt/aws/amazon-cloudwatch-agent/etc | |
cp /opt/aws/amazon-cloudwatch-agent/bin/config.json . | |
vim /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml | |
amazon-cloudwatch-agent-ctl -a start -m onPremise -c file:config.json -s | |
amazon-cloudwatch-agent-ctl -a status -m onPremise -c file:config.json -s |