All New

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Register

Login

All New Register Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 def fw_events(file, filter_ip, filter_type, clients_dir, net_file, limit):
2 """
3 Format firewall drop events with dedup, counts, and service annotation.
4 Output per line: ts|client|dest_ip|dest_port|proto|service_name|count
5 """
6 import glob
7 from datetime import datetime
8 proto_map = {1: 'icmp', 6: 'tcp', 17: 'udp'}
9
10 # Build ip->name map

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 ────────────────────────────────────────────────
2 WireGuard Activity Log
3 ────────────────────────────────────────────────
4
5 WireGuard Events
6 ──────────────────────────────────────────
7 23/05 04:49 phone-nuno 94.63.0.129 attempt (x3)
8 23/05 04:54 phone-nuno 94.63.0.129 attempt (x3)
9 23/05 05:00 phone-nuno 94.63.0.129 attempt (x3)
10 23/05 05:06 phone-nuno 94.63.0.129 attempt (x5)

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Lifecycle
5 # ============================================
6
7 function cmd::group::on_load() {
8 flag::register --name
9 flag::register --desc
10 flag::register --peer

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 #!/usr/bin/env bash
2
3 function cmd::net::on_load() {
4 flag::register --name
5 flag::register --ip
6 flag::register --port
7 flag::register --desc
8 flag::register --tag
9 flag::register --detailed
10 flag::register --force

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 sed -n '295,315p' /etc/wireguard/wgctl/modules/identity.module.sh
2 result=$(json::get_nested "$id_file" "rule_flags" "$flag" 2>/dev/null) || true
3
4 if [[ -n "$result" ]]; then
5 echo "$result"
6 return 0
7 fi
8
9 # Fall back to policy value
10 local policy_name

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 ────────────────────────────────────────────────
2 Inspect: phone-helena
3 ────────────────────────────────────────────────
4
5 ── Client ──────────────────────────────────────
6
7 Name: phone-helena
8 IP: 10.1.3.4
9 Type: phone
10 Rule: user ↳ (no-proxmox, dns-restricted)

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 grep -rn "printf.*%-.*s.*%-.*s" /etc/wireguard/wgctl/commands/ | grep -v "\.module\." | grep -v "table"~
2 /etc/wireguard/wgctl/commands/net.command.sh:99: printf "\n %-20s %-16s %-6s %s\n" "NAME" "IP" "PORTS" "DESCRIPTION"
3 /etc/wireguard/wgctl/commands/net.command.sh:117: printf " %-20s %-16s %-6s %s%b\n" \
4 /etc/wireguard/wgctl/commands/list.command.sh:546: printf " %-28s %-15s %-13s %-12s %-12s %s %s\n" \
5 /etc/wireguard/wgctl/commands/list.command.sh:550: printf " %-28s %-15s %-13s %-12s %s %s\n" \
6 /etc/wireguard/wgctl/commands/hosts.command.sh:165: printf "\n %-6s %-18s %-16s %-30s %s\n" \
7 /etc/wireguard/wgctl/commands/hosts.command.sh:171: printf " %-6s %-18s %-16s %-30s %s\n" \
8 /etc/wireguard/wgctl/commands/audit.command.sh:109: test::pass "$(printf "%-28s rule=%-15s blocked (no fw rules)" \
9 /etc/wireguard/wgctl/commands/audit.command.sh:112: test::warn "$(printf "%-28s rule=%-15s blocked but has %s fw rules" \
10 /etc/wireguard/wgctl/commands/audit.command.sh:135: test::pass "$(printf "%-28s rule=%-15s fw: %s/%s" \

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Lifecycle
5 # ============================================
6
7 function cmd::watch::on_load() {
8 flag::register --type
9 flag::register --name
10 flag::register --peers

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 root@wireguard:/etc/wireguard/wgctl# wgctl hosts add --ip 148.69.46.73 --name helena-wan --desc "Helena WAN" --tags isp,wan,helena
2 Traceback (most recent call last):
3 File "/etc/wireguard/wgctl/core/json_helper.py", line 2949, in <module>
4 commands[cmd](args)
5 File "/etc/wireguard/wgctl/core/json_helper.py", line 2929, in <lambda>
6 'hosts_add': lambda args: hosts_add(args[0], args[1], args[2], args[3],
7 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8 File "/etc/wireguard/wgctl/core/json_helper.py", line 2747, in hosts_add
9 _hosts_write(file, data)
10 File "/etc/wireguard/wgctl/core/json_helper.py", line 2674, in _hosts_write

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 3 months ago
1 #!/usr/bin/env bash
2
3 function cmd::net::on_load() {
4 flag::register --name
5 flag::register --ip
6 flag::register --port
7 flag::register --desc
8 flag::register --tag
9 flag::register --detailed
10 flag::register --force
Newer Older

Powered by Opengist ⋅ Load: 104ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ KrilHub