bitcrafting laboratory

KB

Install rclone with this one-liner

One easy way to have a rclone in the current folder (adapt with your distribution):

curl https://downloads.rclone.org/rclone-current-windows-amd64.zip -o rclone.zip && 7z e -y rclone.zip && del rclone.zip
[Read more]

How to unbrick Somu

Recently, I accidentally put the wrong firmware on a Somu, thereby bricking it.

In order to unbrick it, it is necessary to link it with a STLink.

See the following schema to have the correct pinout (taken from here).

somu-layout_png_project-body

Don’t forget it may be mirrored from what you are seeing. Use the the clues and asymmetries in order to figure out which pin is which.

The following correspondance must be made:

[Read more]

Create Client Cert Ubiquiti

Instead of using the CA.pl script, it’s easier to create the certificates by hand.

Create CA then server key:

sudo -s
openssl req -new -keyout server.key -out server.csr -subj "/C=FR/ST=Paris/CN=vpn.example.org"
openssl x509 -days 1095 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt 
mv server.crt /config/auth/server.crt
mv server.key /config/auth/server.key

 

[Read more]

Setup Debian

Half automated steps in order to have a proper debian installed with AWS, Azure, Scaleway, etc.

Prerequisites

  • A ssh account with root on the target.
  • A way to either connect with user,pass to the instance or the proper ssh key from the host put inside authorized_keys at the target.
  • Ansible with debops scripts. Works properly only in linux now.
  • A hostname pointing to the instance.

Steps

Create a host.yml file with contents:

[Read more]