Notatki Administratora

ufw - simple firewall

https://www.digitalocean.com/community/tutorials/how-to-setup-a-firewall-with-ufw-on-an-ubuntu-and-debian-cloud-server

ufw status
ufw allow ssh
ufw allow 80/tcp
ufw deny 80/tcp
 
ufw enable
 
ufw status verbose
ufw status 
Kategoria: 

locale

dpkg-reconfigure locales

Kategoria: 

linux df -i

df -i
 
find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n
 
 
ls -1 | grep "sess_*" | xargs -L 50 rm -f
 
 
 
find /path/to/file -name "*.PNG" -delete \;
find /path/to/file -name "*.PNG" -exec rm \; (runs rm once for each file)
find /path/to/file -name "*.PNG" -delete + (groups them into chunks just small enough to pass to rm)
Kategoria: 

debian9 php5-mysql rasberry problem

Solved!
Download from here https://packages.debian.org/wheezy/armh ... 8/download the package

then install it via

sudo dpkg --install libmysqlclient18
and then reinstall php5-mysql via apt-get
apt-get install php5-mysql

now misqli is installed
cheers
Kategoria: 

certbot

https://certbot.eff.org/#debianstretch-nginx

certbot certonly

certbot certonly --standalone -d example.com -d www.example.com

certbot renew

Kategoria: 

SSL - Updating Diffie-Hellman Parameters

Updating Diffie-Hellman Parameters

If you test your server using the SSL Labs Server Test now, it will only get a B grade due to weak Diffie-Hellman parameters. This effects the security of the initial key exchange between our server and its users. We can fix this by creating a new dhparam.pem file and adding it to our server block.

Create the file using openssl:

sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048

Kategoria: 

systemctl

systemctl start kestrel-hellomvc.service
systemctl stop kestrel-hellomvc.service
systemctl status kestrel-hellomvc.service

journalctl -fu kestrel-hellomvc.service

Kategoria: 

SSL

https://www.namecheap.com/support/knowledgebase/article.aspx/9419/0/nginx

cat certificate.crt ca_bundle.crt >> cert_chain.crt

ssl_certificate_key /etc/ssl/free/private.key;
ssl_certificate     /etc/ssl/free/cert_chain.crt;
 
ssl_protocols TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
 
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
Kategoria: 

netstat -nlp

netstat -nlp

Kategoria: 

Strony

Subskrybuj Notatki Administratora