Skip to content

Instantly share code, notes, and snippets.

View mariotpc's full-sized avatar
🎯
Focusing

Mario Enrique Lopez Guzman mariotpc

🎯
Focusing
View GitHub Profile
@mariotpc
mariotpc / wg-speedy.sh
Created February 8, 2023 14:38 — forked from juddgaddie/wg-speedy.sh
Setting up wireguard in a specific VRF and adding a route. Works with Cumulus Linux
#!/bin/bash
#to enable debugging
#echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control
ip rule add fwmark 1001 iif lo priority 4999 table mgmt
ip link add dev wg0 type wireguard
ip -4 address add 10.1.50.43/16 dev wg0
wg setconf wg0 <(wg-quick strip /etc/wireguard/wg0.conf)
wg set wg0 fwmark 1001
@mariotpc
mariotpc / create-hotspot.md
Created February 23, 2022 22:15 — forked from narate/create-hotspot.md
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
@mariotpc
mariotpc / gist:c9eb675a954b41f388afb73833fb783b
Created June 25, 2021 14:33 — forked from mralexgray/gist:2959642
ipv6 tunnelbroker / he.net dyndns setup / update
echo `curl -k --trace -s https://domain.com:[email protected]/nic/update?hostname=domain.com`
// XXXXXXXXXXXXXXXXX = dns.he.net key
-ERROR: Missing parameter(s).
Usage: https://ipv4.tunnelbroker.net/ipv4_end.php?ip=IPV4ADDR&pass=MD5PASS&apikey=USERID&tid=TUNNELID
-or-: https://USERNAME:[email protected]/ipv4_end.php?tid=TUNNELID (auto-detect IP)
https://USERNAME:[email protected]/ipv4_end.php?tid=TUNNELID&ip=IPV4ADDR
IPV4ADDR: Your IPv4 endpoint. Set to AUTO to determine your IP based on the IP you requested this page from. Previously passed as ipv4b.