/images/avatar.png

Bridge with nmcli and KVM

Quick links | Ubuntu 22.04 Get current network config: 1 2 nmcli con show nmcli connection show --active We musn’t use wireless interface? I’ve spend a lot of time to find solution, but wireless bridge always doesn’t work. This approach also doesn’t work: 1 2 3 4 5 6 7 8 # To bridge wifi interface you may use iw tool to enable 4addr likewise: # iw dev <wifiInterface> set 4addr on # brctl addif <bridgename> <wifiInterface> can't add <wifiInterface> to bridge <bridgename>: Operation not supported # iw dev <wifiInterface> set 4addr on # brctl addif <bridgename> <wifiInterface> Now it should work.

Installing OpenVPN server

Quick links | Ubuntu 22.04 | Openvpn 2.6 openvpn3 client openvpn Free | No time limit, no credit card Community Resources Create vpn server anywhere, I created on Hetzner. And make A-record to ip address. For example ovpn.dodcaf.ru A 5.161.48.201. Install openvpn: 1 2 sudo apt update \ && sudo apt install -y openvpn easy-rsa EasyRSA: 1 2 sudo cp -r /usr/share/easy-rsa /etc/openvpn \ && sudo ln -s /etc/openvpn/easy-rsa/openssl-easyrsa.cnf /etc/openvpn/easy-rsa/openssl.cnf Create vars and fill:

Get absolute path for a file

We need to install mlocate: 1 apt install mlocate Update the db: 1 sudo updatedb And find some file: 1 2 locate just-file-name.txt locate or-part-of-file-nam Example: 1 2 locate mcypr_lin___ovpn.ovpn /etc/openvpn/kz/mcypr_lin___ovpn.ovpn

xsel for buffer

Install package to save file context into clipboard buffers: 1 sudo apt install xsel To save in the primary (to paste: Shift + Insert, xsel -po): 1 cat /etc/hosts | xsel -ip To save in the secondary (to paste: xsel -so) 1 cat /etc/hosts | xsel -is xsel -x - Exchange the PRIMARY and SECONDARY selections To save in the clipboard (to paste: Ctrl + V, xsel -bo) 1 cat /etc/hosts | xsel -ib From man:

Put file in a folder on NextCloud

Go to NextCloud, open Settings -> Security -> fill “App name” -> click “Create new app password”, so we got login and pass. Create folder in your NextCloud. Fill varables with your own values: 1 2 3 4 5 6 USER=96EEDA25-C3DA-XXXX-XXXX-XXXXXXXXXXXX PASS=3XabR-rygAb-XXXXX-XXXXX-XXXXX NEXTCLOUD_FOLDER=gitlab-backups PATH_TO_BACKUP=gitlab-backups BACKUP_NAME=1691665722_2023_08_10_14.9.2_gitlab_backup.tar NEXT_CLOUD_URL=https://your.cloud.tld Run the script: 1 curl -k -u "$USER:$PASS" -T "$PATH_TO_BACKUP/$BACKUP_NAME" "$NEXT_CLOUD_URL/remote.php/webdav/$NEXTCLOUD_FOLDER/$BACKUP_NAME"

Install, backup and restore Neo4j database

Quick links | Ubuntu 22.04 | Installation | Some activities with neo4j database | Backup neo4j database | Restore neo4j database Before install you have to check your OpenJDK version, for example for neo4j 5.8.0 you should have openjdk 17.0.7 2023-04-18. Installation: Some article who helps install it. Get gpg.key and add neo4j repository: 1 2 3 curl -fsSL https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/neo4j.gpg echo "deb [signed-by=/usr/share/keyrings/neo4j.gpg] https://debian.neo4j.com stable latest" | sudo tee -a /etc/apt/sources.