ntpd diagnostics

ntpq -pn

ntpq> as

ind assID status conf reach auth condition last_event cnt
===========================================================
 1 29157 9614 yes yes none sys.peer reachable 1
 2 29158 9014 yes yes none reject reachable 1

ntpq> rv 29158
assID=29158 status=9014 reach, conf, 1 event, event_reach,
srcadr=time, srcport=123, dstadr=192.168.16.72, dstport=123, leap=00,
stratum=3, precision=-6, rootdelay=62.500, rootdispersion=10733.246,
refid=172.18.0.104, reach=377, unreach=0, hmode=3, pmode=4, hpoll=7,
ppoll=6, flash=400 peer_dist, keyid=0, ttl=0, offset=-76.051,
delay=5.202, dispersion=18.634, jitter=59.528,
reftime=dda1b0a9.ca84f3f0 Mon, Oct 30 2017 15:07:37.791,
org=dda1b37f.c253cd06 Mon, Oct 30 2017 15:19:43.759,
rec=dda1b37f.f06440f2 Mon, Oct 30 2017 15:19:43.939,
xmt=dda1b37f.d5a61c0a Mon, Oct 30 2017 15:19:43.834,
filtdelay= 104.46 243.56 5.58 5.20 125.15 6.32 5.97 111.05,
filtoffset= -127.71 -203.04 -69.73 -76.05 -132.87 -63.20 -76.46 -126.81,
filtdisp= 15.63 16.57 17.55 18.49 19.48 20.43 21.37 22.32

Here look for the flash id peer_dist are too many hops for ntp to work.

Add additional subdomains to a letsencrypt certificate

taken from: http://stackoverflow.com/questions/38302401/letsencrypt-add-domain-to-existing-certificate

I used the following command originally to register some certificates:

/opt/certbot/certbot-auto certonly --webroot --agree-tos -w /srv/www/letsencrypt/ \
--email me@example.com \
--expand -d example.com,www.example.com

… and just now I successfully used the following command to expand my registration to include a new subdomain as a SAN:

/opt/certbot/certbot-auto certonly --webroot --agree-tos -w /srv/www/letsencrypt/ \
--expand -d example.com,www.example.com,click.example.com

Remotely find Windows Version using cmd (and many other possible commands)

I quickly wanted to find the Windows Version of a lot of servers, this is the first solution I came up with:

psexec \\10.85.129.170 -u domain.example\Administrator /p whatever /e /accepteula cmd /c ver

The Version can be found at Wikipedia: https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions

if you need more information you could use the slower ‘systeminfo’

Next step will be to use a server list in a textfile

Docker Reverse Proxy with static and wordpress pages

version: '3'
services:
 nginx-proxy:
 image: 'jwilder/nginx-proxy'
 container_name: nginx-proxy
 ports:
 - "80:80"
 volumes:
 - /var/run/docker.sock:/tmp/docker.sock:ro
 environment:
 - DEFAULT_HOST=a.example.com

nginx-a:
 build: ./a/
 container_name: nginx-a
 environment:
 - VIRTUAL_HOST=a.example.com

nginx-b:
 build: ./b/
 container_name: nginx-b
 environment:
 - VIRTUAL_HOST=b.example.com

mysql-c:
 image: mariadb
 container_name: mysql-c
 environment:
 MYSQL_ROOT_PASSWORD: xxxxxxxxx
 MYSQL_DATABASE: wordpress
 MYSQL_USER: wordpress
 MYSQL_PASSWORD: wordpress
 volumes:
 - ./persistent-data/wordpress-mariadb/:/var/lib/mysql

 wordpress-c:
 image: wordpress
 container_name: wordpress-c
 environment:
# WORDPRESS_DB_HOST: mysql-mklug:3306
# WORDPRESS_DB_NAME: wordpress
# WORDPRESS_DB_USER: wordpress
# WORDPRESS_DB_PASSWORD: xxxxxxxx
 environment:
 - VIRTUAL_HOST=c.example.com