Skip to content

Instantly share code, notes, and snippets.

View ZeroDeth's full-sized avatar
🏠
Working from home

Sherif Abdalla ZeroDeth

🏠
Working from home
View GitHub Profile
@ZeroDeth
ZeroDeth / proton_opn_wg.md
Created December 17, 2023 17:56 — forked from morningreis/proton_opn_wg.md
OPNsense + ProtonVPN + Wireguard Configuration Guide

OPNsense + ProtonVPN + Wireguard

Published: 16 December 2022

Reference: https://docs.opnsense.org/manual/how-tos/wireguard-selective-routing.html

Goal: Set up one or more Wireguard connections from ProtonVPN on OPNsense, with policy based routing, and optional Killswitch.

I'm writing this guide first as a reference for my future self for when I inevitably forget how to do this, but also to help others out. I found there were not many guides on this specific configuration, particularly not with multiple concurrent connections, and these were some steps which were not at all obvious. I did begin with the guide in the official OPNsense documentation, but even that was missing info to make ProtonVPN work. If you are a pfSense user, it is very similar to OPNsense, and you should be able to follow along with some success, but I have not tested it myself.

Docker Swarm in LXC Containers

Part of collection: Hyper-converged Homelab with Proxmox

After struggling for some days, and since I really needed this to work (ignoring the it can't be done vibe everywhere), I managed to get Docker to work reliable in privileged Debian 12 LXC Containers on Proxmox 8

(Unfortunately, I couldn't get anything to work in unprivileged LXC Containers)

There are NO modifications required on the Proxmox host or the /etc/pve/lxc/xxx.conf file; everything is done on the Docker Swarm host. So the only obvious candidate who could break this setup, are future Docker Engine updates!

@NicklasMatzulla
NicklasMatzulla / Hetzner OPNsense network configuration.md
Created April 6, 2023 20:59
Hetzner network configuration for virtualization with Proxmox and OPNsense.

About

Warning
This network configuration is designed for the network infrastructure of Hetzner servers.

This network configuration is used to use Proxmox as a virtualization platform and OPNsense as a firewall. Both single addresses and subnets can be added without any problems.

Installation

auto lo
iface lo inet static
@morningreis
morningreis / proton_opn_wg.md
Created December 16, 2022 21:26
OPNsense + ProtonVPN + Wireguard Configuration Guide

OPNsense + ProtonVPN + Wireguard

Published: 16 December 2022

Reference: https://docs.opnsense.org/manual/how-tos/wireguard-selective-routing.html

Goal: Set up one or more Wireguard connections from ProtonVPN on OPNsense, with policy based routing, and optional Killswitch.

I'm writing this guide first as a reference for my future self for when I inevitably forget how to do this, but also to help others out. I found there were not many guides on this specific configuration, particularly not with multiple concurrent connections, and these were some steps which were not at all obvious. I did begin with the guide in the official OPNsense documentation, but even that was missing info to make ProtonVPN work. If you are a pfSense user, it is very similar to OPNsense, and you should be able to follow along with some success, but I have not tested it myself.

@alejandro-du
alejandro-du / armbian-setup.sh
Created December 12, 2022 13:49
A script that configures a Wi-Fi connection with static IP on Armbian for headless setups
#!/bin/bash
# find the mount point with sudo fdisk -l
mount /dev/mmcblk0p1 /media/sdcard/
rm /media/sdcard/boot/armbian_first_run.txt.template
touch /media/sdcard/boot/armbian_first_run.txt
echo "FR_general_delete_this_file_after_completion=1" >> /media/sdcard/boot/armbian_first_run.txt
echo "FR_net_change_defaults=1" >> /media/sdcard/boot/armbian_first_run.txt
@amunchet
amunchet / noVNCCopyPasteProxmox.user.js
Last active May 2, 2024 18:49
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
@s-a-c
s-a-c / starship.nix
Created August 11, 2022 16:07
Nix file to generate complete, mostly default, starship.toml, including equivalent of <format = "$all">
programs.starship = {
enable = true;
settings = {
# "$schema" = "https://starship.rs/config-schema.json";
add_newline = true;
command_timeout = 500;
continuation_prompt = "[∙](bright-black) ";
format = "[](0x9A348E)$username$hostname$localip$shlvl$singularity$kubernetes[](fg:0x9A348E bg:0xDA627D)$directory$vcsh[](fg:0xDA627D bg:0xFCA17D)$git_branch$git_commit$git_state$git_metrics$git_status$hg_branch[](fg:0x86BBD8 bg:0x06969A)$docker_context$package$buf[](fg:0xFCA17D bg:0x86BBD8)$c$cmake$cobol$container$daml$dart$deno$dotnet$elixir$elm$erlang$golang$haskell$helm$java$julia$kotlin$lua$nim$nodejs$ocaml$perl$php$pulumi$purescript$python$rlang$red$ruby$rust$scala$swift$terraform$vlang$vagrant$zig$nix_shell$conda$spack$memory_usage$aws$gcloud$openstack$azure$env_var$crystal$custom$sudo$cmd_duration$line_break$jobs$battery[](fg:0x06969A bg:0x33658A)$time$status$shell$character";
right_format = "";
scan_timeout = 30;
@JonhSHEPARD
JonhSHEPARD / install-copilot.sh
Last active August 20, 2023 00:45
Github Copilot on NixOS
#!/bin/sh
if [ "$EUID" -ne 0 ]
then echo "This script must be run as root"
exit
fi
if [ "$#" -ne 1 ]; then
echo "Usage: ./$0 <path-to-ide"
exit 1
@eisenreich
eisenreich / wait_for_http_200.sh
Last active February 6, 2024 19:03 — forked from rgl/wait_for_http_200.sh
Wait for HTTP endpoints to return 200 OK with bash, curl and timeout
#!/bin/bash
##############################################################################################
# Wait for URLs until return HTTP 200
#
# - Just pass as many urls as required to the script - the script will wait for each, one by one
#
# Example: ./wait_for_urls.sh "${MY_VARIABLE}" "http://192.168.56.101:8080"
##############################################################################################
@Mishco
Mishco / content.md
Last active April 25, 2024 14:29
Setup HashiCorp Vault on docker

Setup HashiCorp Vault on docker

Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. Vault is primarily used in production environments to manage secrets. Vault is a complex system that has many different pieces. There is a clear separation of components that are inside or outside of the security barrier. Only the storage backend and the HTTP API are outside, all other components are inside the barrier.

Vault_architecture

Figure 1: Architecture of Vault and Spring App (Click to enlarge)

The storage backend is untrusted and is used to durably store encrypted data. When the Vault server is started, it must be provided with a storage backend so that data is available across restarts. The HTTP API similarly must be started by the Vault server on start so that clients can interact with it.