Skip to content

Instantly share code, notes, and snippets.

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

Yolier Galan Tasse gallegogt

🏠
Working from home
View GitHub Profile
extern crate rust_sodium;
use rust_sodium::crypto::auth::hmacsha256;
pub mod crypto {
#[derive(Debug)]
pub enum ErrType {
BadKey,
}
@gallegogt
gallegogt / A Hypriot K8S install.md
Created May 21, 2018 02:23 — forked from elafargue/A Hypriot K8S install.md
K8s (v1.10.2) on Hypriot (May 2018)
@gallegogt
gallegogt / rpi3_iot_server.md
Created July 19, 2018 19:19 — forked from xoseperez/rpi3_iot_server.md
Raspberry Pi 3 with Mosquitto, Node-RED, InfluxDB, Grafana and Nginx (as a reverse proxy)
@gallegogt
gallegogt / wg0.conf
Last active May 27, 2021 20:51
VPN WireGuard Server Config
[Interface]
Address = 10.5.0.1/24
PrivateKey = <SERVER_PRIVATE_KEY>
ListenPort = 54321
SaveConfig = false
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; iptables -A INPUT -s 10.5.0.0/24 -p udp -m udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; iptables -D INPUT -s 10.5.0.0/24 -p udp -m udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT
# C-1
[Peer]
@gallegogt
gallegogt / wg-client-n.conf
Created May 27, 2021 20:58
WireGuard Client Config
[Interface]
Address = 10.5.0.3/24
DNS = 10.5.0.1
ListenPort = 16200
MTU = 1280
PrivateKey = <CLIENT_N-PRIVATE_KEY>
[Peer]
AllowedIPs = 0.0.0.0/0
Endpoint = <PUBLIC_SERVER_ADDRESS>:54321
@gallegogt
gallegogt / unbound.conf
Created May 28, 2021 13:59
Unbound DNS Config
include: "/etc/unbound/unbound.conf.d/*.conf"
server:
num-threads: 2
verbosity: 1
root-hints: /etc/unbound/root.hints
# auto-trust-anchor-file: /var/lib/unbound/root.key
interface: 0.0.0.0
interface: ::0
max-udp-size: 3072
access-control: 0.0.0.0/0 refuse