Tools to scan and secure your website

SSL server test: https://www.ssllabs.com/ssltest/

Mozilla Observatory: https://observatory.mozilla.org/analyze/


Firefox plugin to generate content-security-policy (simply browse your website for it to work): https://addons.mozilla.org/en-US/firefox/addon/laboratory-by-mozilla/

Sample nginx configuration for good security https://gist.github.com/plentz/6737338

How to fix “Host ‘172.x.0.1’ is not allowed to connect” with MySQL Docker

Using the official MariaDB docker image from Docker Hub, I got this error

Host '172.18.0.1' is not allowed to connect to this MySQL serverI 

I tried adding a shared volume after some google search, but that didn’t work

  volumes:
    # Use this option to persist the MySQL DBs in a shared volume.
    - ./mysqldata:/var/lib/mysql:rw,delegated

Turns out it’s an authentication problem, not a connection problem. By default the maria DB doesn’t give the root use permission to connect from everywhere, just localhost, so you’ll need to do

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;FLUSH PRIVILEGES;

By going into the container and execute the mysql command line tool

Alternatively, you can do

environment:
- MYSQL_ROOT_HOST='%'
- MYSQL_USER='youruser'
- MYSQL_PASSWORD='yourpassword'
- MYSQL_DATABASE='yourdb'

The entry point script only disallow root from any host, so if you create a new user you won’t get this limitation

 

Google Scripting Engine

Just found out Google has scripting built into its apps, which is used to manipulate Email and Drive. It’s called AppsScript