From 5afc414a52a9404699e08e1053d5bbda4702de0a Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Wed, 12 Feb 2025 23:01:40 +0100 Subject: [PATCH] small edits --- data/pdf-to-txt.md | 4 ++-- networking/wireguard.md | 40 ++++++++++++++++++++---------------- networking/wpa_supplicant.md | 7 +++++-- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/data/pdf-to-txt.md b/data/pdf-to-txt.md index 47cebf5..ecdfb04 100644 --- a/data/pdf-to-txt.md +++ b/data/pdf-to-txt.md @@ -18,8 +18,8 @@ pdftoppm -png *file*.pdf test ``` ```bash -for x in \*png; do - tesseract -l eng "$x" - >> *out*.txt +for x in *png; do + tesseract -l eng "$x" - >> out.txt done ``` diff --git a/networking/wireguard.md b/networking/wireguard.md index 6cca495..ef87eb0 100644 --- a/networking/wireguard.md +++ b/networking/wireguard.md @@ -43,20 +43,20 @@ wg genkey | tee client_private_key | wg pubkey > client_public_key " > /etc/wireguard/wg0.conf ``` -```bash +```sh echo 'net.ipv4.ip_forward=1' > /etc/sysctl.d/wg.conf ``` -```bash +```sh systemctl enable --now wg-quiqck@wg0 ``` -```bash +```sh chown -R root:root /etc/wireguard/ ``` -```bash -chmod -R og-rwx /etc/wireguard/\* +```sh +chmod -R og-rwx /etc/wireguard/* ``` Forward traffic from port 51900 to the server. @@ -69,21 +69,25 @@ Install `wireguard-tools` on the client. Copy the client private key and server public key to the server (or just fill in the variables). -> server_ip=*your server's public ip* - echo " - [Interface] - Address = 10.0.0.2/32 - PrivateKey = $(cat client_private_key) - DNS = 9.9.9.9 - - [Peer] - PublicKey = $(cat server_public_key) - Endpoint = $(echo $server_ip:51900) - AllowedIPs = 0.0.0.0/0, ::/0 - " > /etc/wireguard/wg0-client.conf +```sh +server_ip=$PUBLIC_IP -> wg-quick up wg0-client +echo " +[Interface] +Address = 10.0.0.2/32 +PrivateKey = $(cat client_private_key) +DNS = 9.9.9.9 + +[Peer] +PublicKey = $(cat server_public_key) +Endpoint = $(echo $server_ip:51900) +AllowedIPs = 0.0.0.0/0, ::/0 +" > /etc/wireguard/wg0-client.conf + +wg-quick up wg0-client + +``` ## Extras diff --git a/networking/wpa_supplicant.md b/networking/wpa_supplicant.md index 360c860..8aa2681 100644 --- a/networking/wpa_supplicant.md +++ b/networking/wpa_supplicant.md @@ -95,8 +95,11 @@ If you encounter problems, you will probably need to delete the old device pid i Next up, start wpa_supplicant: -```bash +```sh wpa_supplicant -B -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0 ``` -The -B flag runs this as a background process. Remove this to see real-time output in order to solve problems. The -i flag denotes the physical device used for the wifi. The -c flag points to the configuration file for use. +The `-B` flag runs this as a background process. +Remove this to see real-time output in order to solve problems. +The `-i` flag denotes the physical device used for the wifi. +The `-c` flag points to the configuration file for use.