Skip to content

Instantly share code, notes, and snippets.

View ihor-lev's full-sized avatar
😎

Ihor Kysylevych ihor-lev

😎
View GitHub Profile
@ihor-lev
ihor-lev / generate-mongo-tls.md
Last active November 2, 2022 12:27 — forked from achesco/generate-mongo-ssl.md
Generate self-signed SSL certificates for MongoDb server and client

Notes

  • CNs are important
  • -days 3650
  • SSL is deprecated in MongoDB in favour of TLS

Make PEM containig a public key certificate and its associated private key

openssl req -newkey rsa:2048 -new -x509 -days 3650 -nodes -subj '/C=US/ST=Massachusetts/L=Bedford/O=Personal/OU=Personal/[email protected]/CN=localhost' -out mongodb-cert.crt -keyout mongodb-cert.key
@ihor-lev
ihor-lev / network-tuning.conf
Created November 7, 2022 12:39 — forked from pensierinmusica/network-tuning.conf
Linux sysctl configuration file for NginX
## Place this file in "/etc/sysctl.d/network-tuning.conf" and
## run "sysctl -p" to have the kernel pick the new settings up
# Avoid a smurf attack
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Turn on protection for bad icmp error messages
net.ipv4.icmp_ignore_bogus_error_responses = 1
# Turn on syncookies for SYN flood attack protection
@ihor-lev
ihor-lev / Dockerfile
Created December 14, 2022 10:02 — forked from feltnerm/Dockerfile
Docker + MySQL + `lower_case_table_names=1`
FROM mysql
ADD my.cnf /etc/mysql/my.cnf
CMD ["mysqld", "--datadir=/var/lib/mysql", "--user=mysql"]