Hello Fucking mediawiki shit itself
When trying to open vi/vim the following message could appear:
"E437: terminal capability "cm" required"
To fix it type:
$ export TERM=xterm
PREV
[[fuck]]
fucking wireguard. for some fucking reason it rancher doesn't like it. only use regular docker. make sure to follow the instructions for centos 7, fucking docker doesn't like the kernel headers
$ sudo yum install epel-release elrepo-release
$ sudo yum install yum-plugin-elrepo
$ sudo yum install kmod-wireguard wireguard-tools
https://www.wireguard.com/install/
RANCHER DOES NOT FUCKING LET WIREGUARD WORK USE DOCKER GG
this is the rancher version that works
docker run -d --restart=unless-stopped
-p 80:80 -p 443:443
--privileged
rancher/rancher:v2.3.5
v2.4.5 also works
If you need proxmox cluster deletion
systemctl stop pve-cluster corosync
pmxcfs -l
rm /etc/corosync/*
rm /etc/pve/corosync.conf
killall pmxcfs
systemctl start pve-cluster
this nginx proxy config works perfectly for wordpress
this nginx config will redirect all incoming traffic to port 443
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
VIEW TERMINAL COLORS
#!/bin/bash
for ((i=16; i<256; i++)); do
printf "\e[48;5;${i}m%03d" $i;
printf '\e[0m';
[ ! i - 15) % 6)) -eq 0 ] && printf ' ' || printf '\n'
done
https://askubuntu.com/questions/558280/changing-colour-of-text-and-background-of-terminal
Maybe I should try it for all my services
https://serversforhackers.com/c/redirect-http-to-https-nginx
stupid ubuntu won't use allotted lvm space
root@util:~# vgdisplay
root@util:~# lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
root@util:~# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
when running a pihole container in ubuntu server, change this
[Resolve]
DNS=
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#Cache=no
DNSStubListener=no #CHANGE THIS TO NO
#ReadEtcHosts=yes
on a new install of arch linux, dns won't resolve local hosts.
This is the file that hast to be changed: cat /etc/nsswitch.conf
this is what needs to be added
hosts: files mdns4_minimal dns [NOTFOUND=return] mdns4
When running mylar behind an nginx reverse proxy, this is the configuration that works
location /mylar {
proxy_pass http://internal.server.local:8090;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect http:// https://;
auth_basic "Access Restricted";
auth_basic_user_file "/etc/nginx/.htpasswd";
access_log /var/log/nginx/mylar.access.log;
error_log /var/log/nginx/mylar.error.log;
}
my config is this:
include /etc/nginx/internal.conf;
proxy_ssl_certificate /etc/letsencrypt/live/moralestech.xyz-0001/fullchain.pem;
proxy_ssl_certificate_key /etc/letsencrypt/live/moralestech.xyz-0001/privkey.pem;
proxy_pass http://coop:8090;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect http:// https://;
There's a weird problem with an ncurses function, well not a problem but the way pywal works. When resizing or moving away from a window running ncmpcpp while a pywal theme is applied, the theme will reset and ncmpcpp will use its default theme. I found a workaround on github. I compiled the function again with the user's code to not have it to that. I changed the alias of ncmpcpp so every time it run, it will load my custom function.
https://github.com/ncmpcpp/ncmpcpp/issues/449
Here is the function:
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
#include <curses.h>
int endwin(void) {
int (*original_endwin)(void);
original_endwin = dlsym(RTLD_NEXT, "endwin");
int ret = (*original_endwin)();
char *filename = "/.cache/wal/sequences";
char *home_dir = getenv("HOME");
char *filepath = malloc(strlen(home_dir) + strlen(filename) + 1);
strncpy(filepath, home_dir, strlen(home_dir) + 1);
strncat(filepath, filename, strlen(filename) + 1);
FILE *sequences;
char s;
sequences = fopen(filepath,"r");
while((s = fgetc(sequences)) != EOF) {
printf("%c", s);
}
fclose(sequences);
return ret;
}
How to compile it:
gcc -Wall -fPIC -shared -o endwin.so endwin.c -ldl
My new alias
LD_PRELOAD=./endwin.so ncmpcpp
22 January 2022
arch split linux-firmware into smaller packages.
linux-firmware-bnx2x is the package i need to work with my 10gb nic.
Renew certificates with certbots
sudo certbot renew --dns-cloudflare-propagation-seconds 120
If proxmox fails to connect to a node or fails a migration it might be due to ssh keys. This should fix it.
ssh -o "HostKeyAlias=int103" [email protected]
FREEBSD
fix startx issues
https://muktadiur.wordpress.com/2021/01/30/freebsd-cannot-run-in-framebuffer-mode-please-specify-busids-for-all-framebuffer-devices/
SONARR/RADARR
If you have problems with files importing, make sure you set the downloads path in docker, also make sure the paths have the correct permissions
I'm using st now, but if kitty every freaks out with the font, you have to change it to nerd font in the settings, or one comparable. that's it, it's nothing else
ISCSI STUFF
https://wiki.archlinux.org/title/Open-iSCSI
on how to connect to iscsi
This is how you discovery the iscsi target
# iscsiadm --mode discovery --portal target_ip --type sendtargets
This is how to initiate to iscsi connection.
# iscsiadm -m node -L all
renew wildcard with certbot on alpine
certbot certonly --manual
--preferred-challenges=dns
--email [email protected]
--server https://acme-v02.api.letsencrypt.org/directory
--agree-tos
--manual-public-ip-logging-ok
-d “*.moralestech.xyz”
runlike is a python utility used to get the docker run command of a running container
runlike "container" > something.conf
You can then use this utility https://www.composerize.com/
to create a docker-compose file out of it.
Might have to play around with networks, although most of coop has to be on the same network.
How to set up wireguard
umask 077; wg genkey | tee privatekey | wg pubkey > publickey
This generates a key pair, use the public key on the server side and the server's public key on the conf file in the client
How to add wireguard conf file to steam deck
sudo nmcli connection import type wireguard file filename.conf
How to trust install certificate on arch/steamos
sudo trust anchor --store ~/my-ca-cert.crt
How to resize partition in alpine vm
apk add --no-cache cfdisk e2fsprogs-extra
choose partition then "Resize" > "Write" (to finalize)
cfdisk
replace * with partition you are resizing
resize2fs /dev/*
How to launch gui apps remotely through ssh
$ ssh whatever
$ export DISPLAY=:0
$ appname
managed switch pfsense vlan tagging bla bla
f anyone is following along and is trying to get traffic passing through a Cisco managed switch, in the switch settings you have to add the VLAN # in VLAN Settings. Then under Port to VLAN, change the filter to list VLAN # membership. Make sure whichever port you have the pfSense device plugged into is Tagged and then the device(s) that you want to be a member of that VLAN is Untagged. I spent hours troubleshooting because this was my first time setting up a VLAN. But what I didn't realize was that when I selected Tagged, it was tagging it as the Trunk which is what the pfSense device needs to be, and devices you want to add to that VLAN need to be Untagged so they are a member but not the Trunk and all other ports remain as Excluded.
get openvpn working in lxc conatiner
https://forum.proxmox.com/threads/pve-7-openvpn-lxc-problem-cannot-open-tun-tap-dev.103081/
mount local drivve to lxc container
mp0: /mnt/bindmounts/shared,mp=/shared
rewnew wildcard certifcates
sudo certbot certonly
--dns-digitalocean
--dns-digitalocean-credentials ~/certbot-creds.ini
-d '*.example.com'
command to optimize pacman download speeds:
sudo reflector --verbose --sort -rate -l 70 -c US --save /etc/pacman.d/mirrorlist
lightdm location <code>/usr/share/backgrounds</code>
refind location <code>/boot/EFI/refind/themes/refind-minimal/