Skip to content

Instantly share code, notes, and snippets.

@GeekVisit
GeekVisit / wireguard.conf
Created March 26, 2021 16:23 — forked from nealfennimore/wireguard.conf
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@MartinBrugnara
MartinBrugnara / doc.txt
Last active March 26, 2024 03:50
DigitalOcean, assign public ipv6 to wireguard clients
# /etc/sysctl.d/wireguard.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.eth0.proxy_ndp=1
#/etc/wireguard/wg0.conf (DO virtual machine)
[Interface]
# The server interface does not actually need an ipv6.
# The 2 following must be repeated for each used addres [0, 1]
@aggarwalsushant
aggarwalsushant / ublockStaticCustomFilters.txt
Last active May 19, 2024 00:25
uBlock Origin Custom filters | Ad block | Adblock list | Pure Youtube experience - Purest 0 Ads in Video
! Custom static filter list - Sushant Aggarwal
!__________________________ Google & Youtube Ads __________________________
# Zero Ads in Youtube Videos | No watermarks, Cards, Info. Nothing! Zilch! Nada!
||youtube.com/annotations_
youtube.com##.ytp-ce-element-show
youtube.com##.ytp-ce-element
youtube.com##.ytp-cards-teaser-text
youtube.com##.ytp-cards-button-icon-default
youtube.com##.annotation-type-text.annotation
@mikeslattery
mikeslattery / clone_to_docker.sh
Last active February 23, 2022 17:24
Convert local Linux distro into a container.
#!/bin/bash
# Usage - clone_to_docker.sh <image-name>
# This will convert the local distro to a container image and run it.
# Also works for WSL.
# The container will run as the user that created the image.
# If using WSL, you should mount (or symlink) /c to /mnt/c
image="wsl"