Posts

Showing posts from 2017

Generating Diffie Helman for OpenVPN or for Webserver on Raspberry Pi

If  openssl  uses a lot of CPU then it is not blocked waiting for "entropy". OpenSSL is actually sane in that respect, and uses a  cryptographically secure PRNG  to extend an initial seed into as many bits as it needs. When you use  dhparam , OpenSSL not only generates DH parameters; it also wants to assert his social status by taking care to use for the modulus a so-called "strong prime", which is useless for security but requires an awful lot more computational effort. A "strong prime" is a prime  p  such that ( p -1)/2 is also prime. The prime generation algorithm looks like this: Generate a random odd integer  p . Test whether  p  is prime. If not, loop. Test whether ( p -1)/2 is prime. If not, loop. Random odd 4096-bit integers are probability about 1/2000 to be prime, and since both  p  and ( p -1)/2 must be prime, this will need on average generating and testing for primality about  4 millions  of odd primes. This is bound to take some tim

Home Assistant

sudo systemctl restart home-assistant@homeassistant.service sudo journalctl -f -u home-assistant@homeassistant | grep -i 'error' sudo systemctl status home-assistant@homeassistant sudo systemctl restart home-assistant@homeassistant Backup copy of RPI image sudo dd if=/dev/ XXXX bs=4096 | gzip > /path/to/ sd_card_backup.img.gz sudo gzip -dc /path/to /sd_card_backup.img.gz | sudo dd of=/dev/ XXXX bs=4096

Raspberry Pi 3 NFS share/mount

Run from client directed at NFS server to discover shares from export showmount -e 192.166.XXX.YYY

Raspberry Pi 3 Kernel Update

To make sure your Pi is completely up to date run these from the CL. sudo apt-get update && sudo apt-get dist-upgrade -f sudo rpi-update The second updates firmware and could take a few minutes to complete.  If it updates, you will need to reboot your Pi.