small edits

This commit is contained in:
Malin Freeborn 2025-02-12 23:01:40 +01:00
parent d8b4a9d00b
commit 5afc414a52
Signed by: andonome
GPG Key ID: 52295D2377F4D70F
3 changed files with 29 additions and 22 deletions

View File

@ -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
```

View File

@ -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

View File

@ -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.