Skip to content

Instantly share code, notes, and snippets.

Nordine Ben Bachir nordineb

Block or report user

Report or block nordineb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nordineb / readme.MD
Created Aug 16, 2019
OpenSSL Commands
View readme.MD

Generate a new private key and Certificate Signing Request

openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key

Generate a self-signed certificate (see How to Create and Install an Apache Self Signed Certificate for more info)

openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt

Generate a certificate signing request (CSR) for an existing private key

nordineb / readme.MD
Last active Sep 9, 2019
Nginx configuration
View readme.MD

Nginx configuration on centos


sudo yum install epel-release
sudo yum update
sudo yum install nginx
nginx -v
sudo systemctl enable nginx 
sudo systemctl start nginx
nordineb / readme.MD
Created Jul 31, 2019
Use Raspberry Pi Zero to store dashcam footage
View readme.MD

how to

Instead of Raspbian, flash the latest image release using balenaEtcher

Once flashed, mount the sd card, and in the boot directory create a file named teslausb_setup_variables.conf with the config:

export ARCHIVE_SYSTEM=cifs
export archiveserver=Nautilus
export sharename=SailfishCam
View readme.MD

docker run --rm -it alpine:edge ...

apk --update --no-cache add nmap nmap-scripts

# checking ciphers
nmap --script ssl-enum-ciphers -p 443
nordineb / intermediate-config.txt
Created Jul 26, 2019
Custom certificate authority with OpenSSL #2
View intermediate-config.txt
# OpenSSL configuration for the Root Certification Authority.
# This definition doesn't work if HOME isn't defined.
RANDFILE = $ENV::CA_HOME/private/.rnd
nordineb / config.txt
Last active Oct 7, 2019
Custom certificate authority with OpenSSL
View config.txt
[ intermediate_ca_ext ]
basicConstraints = critical, CA:true, pathlen:0
keyUsage = critical, cRLSign, digitalSignature, keyCertSign
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always, issuer:always
[ server_ext ]
basicConstraints = CA:FALSE
keyUsage = critical, digitalSignature, keyEncipherment
extendedKeyUsage = critical, serverAuth, clientAuth
nordineb / readme.MD
Last active Jun 13, 2019
Mandatory TLS
View readme.MD

Mandatory TLS

Internet email, like the Internet itself, is designed to be robust and to work around problems. With email that means sending email in plain text if anything goes wrong with encryption. Today, unfortunately, that can be against policy, contract obligations, and might be illegal. Email systems have responded with "Mandatory" (also called "Forced" or "Required") TLS. These systems let you maintain a list of domains that HAVE TO use encryption. If anything goes wrong with encryption, the email message will either wait and retry later or bounce back to the sender. There are also in-line hardware devices and on-line services through which you can route your email to make sure everything is secure. These all cost money and increase the complexity of your email system.

Mandatory TLS Is Not Commonly Used

Almost no one uses Mandatory TLS for their regular email. Use the free CheckTLS Mandat

nordineb / readme.MD
Last active Mar 19, 2019
Freeze Your Credit Report at Each Credit Bureau
View readme.MD

Having your identity stolen is no stroll along the beach. Getting your name cleared takes a lot of time and effort and sometimes money. Victims of identity theft often suffer months and even years after it occurs. It can seem like you’re the one doing time even though you weren’t the one who committed the crime. To prevent your identity from being stolen, or to prevent further identity theft after your identity has already been stolen, you should consider freezing your credit report.




You can’t perform that action at this time.