gistfile1.txt
· 4.6 KiB · Text
Originalformat
root@wireguard:/# wgctl group add --name family --desc "Family"
=> SUCCESS: ✅ 🔒 Group created: family
root@wireguard:/# wgctl group list
────────────────────────────────────────────────
Groups
────────────────────────────────────────────────
NAME DESCRIPTION PEERS STATUS
───────────────────────────────────────────────────────────────────────────
/etc/wireguard/wgctl/commands/group.command.sh: line 122: peers_list[0]: unbound variable
root@wireguard:/# wgctl group peer add --name family --peer phone-nuno
=> SUCCESS: ✅ 🔒 Added 'phone-nuno' to group 'family'
root@wireguard:/# wgctl group peer add --name family --peer tablet-nuno
=> SUCCESS: ✅ 🔒 Added 'tablet-nuno' to group 'family'
root@wireguard:/# wgctl group show --name family
────────────────────────────────────────────────
Group: family
────────────────────────────────────────────────
Description: Family
Peers: 2
──────────────────────────────────────────────────
NAME IP RULE STATUS
phone-nuno 10.1.3.1 admin active
tablet-nuno 10.1.4.1 user active
root@wireguard:/# wgctl group list
────────────────────────────────────────────────
Groups
────────────────────────────────────────────────
NAME DESCRIPTION PEERS STATUS
───────────────────────────────────────────────────────────────────────────
family Family 2 active
root@wireguard:/# wgctl group block --name family
────────────────────────────────────────────────
Blocking group: family
────────────────────────────────────────────────
/etc/wireguard/wgctl/commands/group.command.sh: line 477: cmd::block::run: command not found
root@wireguard:/# wgctl group block --name family
────────────────────────────────────────────────
Blocking group: family
────────────────────────────────────────────────
=> ERROR: ❌ Unknown flag: --force
Usage: wgctl block --name <name> [options]
Block a client entirely or restrict access to specific IPs/ports/subnets.
Block rules are persisted and restored on WireGuard restart.
Options:
--name <name> Client name (e.g. phone-nuno)
--ip <ip> Block access to specific IP (repeatable)
--subnet <cidr> Block access to subnet (repeatable)
--port <ip:port:proto> Block specific port, e.g. 10.0.0.210:9000:tcp (repeatable)
Examples:
wgctl block --name phone-nuno
wgctl block --name phone-nuno --ip 10.0.0.210
wgctl block --name phone-nuno --subnet 10.0.0.0/24
wgctl block --name phone-nuno --port 10.0.0.210:9000:tcp
wgctl ban --name phone-nuno --ip 10.0.0.100 --ip 10.0.0.200
root@wireguard:/# wgctl group unblock --name family
────────────────────────────────────────────────
Unblocking group: family
────────────────────────────────────────────────
=> WARN: ⚠️ 🔒 phone-nuno — not blocked
=> WARN: ⚠️ 🔒 tablet-nuno — not blocked
=> SUCCESS: ✅ 🔒 Unblocked 0 peers in group 'family'
root@wireguard:/#
| 1 | root@wireguard:/# wgctl group add --name family --desc "Family" |
| 2 | => SUCCESS: ✅ 🔒 Group created: family |
| 3 | root@wireguard:/# wgctl group list |
| 4 | |
| 5 | ──────────────────────────────────────────────── |
| 6 | Groups |
| 7 | ──────────────────────────────────────────────── |
| 8 | |
| 9 | NAME DESCRIPTION PEERS STATUS |
| 10 | ─────────────────────────────────────────────────────────────────────────── |
| 11 | /etc/wireguard/wgctl/commands/group.command.sh: line 122: peers_list[0]: unbound variable |
| 12 | root@wireguard:/# wgctl group peer add --name family --peer phone-nuno |
| 13 | => SUCCESS: ✅ 🔒 Added 'phone-nuno' to group 'family' |
| 14 | root@wireguard:/# wgctl group peer add --name family --peer tablet-nuno |
| 15 | => SUCCESS: ✅ 🔒 Added 'tablet-nuno' to group 'family' |
| 16 | root@wireguard:/# wgctl group show --name family |
| 17 | |
| 18 | ──────────────────────────────────────────────── |
| 19 | Group: family |
| 20 | ──────────────────────────────────────────────── |
| 21 | |
| 22 | Description: Family |
| 23 | Peers: 2 |
| 24 | ────────────────────────────────────────────────── |
| 25 | |
| 26 | NAME IP RULE STATUS |
| 27 | phone-nuno 10.1.3.1 admin active |
| 28 | tablet-nuno 10.1.4.1 user active |
| 29 | |
| 30 | root@wireguard:/# wgctl group list |
| 31 | |
| 32 | ──────────────────────────────────────────────── |
| 33 | Groups |
| 34 | ──────────────────────────────────────────────── |
| 35 | |
| 36 | NAME DESCRIPTION PEERS STATUS |
| 37 | ─────────────────────────────────────────────────────────────────────────── |
| 38 | family Family 2 active |
| 39 | |
| 40 | root@wireguard:/# wgctl group block --name family |
| 41 | |
| 42 | ──────────────────────────────────────────────── |
| 43 | Blocking group: family |
| 44 | ──────────────────────────────────────────────── |
| 45 | /etc/wireguard/wgctl/commands/group.command.sh: line 477: cmd::block::run: command not found |
| 46 | root@wireguard:/# wgctl group block --name family |
| 47 | |
| 48 | ──────────────────────────────────────────────── |
| 49 | Blocking group: family |
| 50 | ──────────────────────────────────────────────── |
| 51 | => ERROR: ❌ Unknown flag: --force |
| 52 | Usage: wgctl block --name <name> [options] |
| 53 | |
| 54 | Block a client entirely or restrict access to specific IPs/ports/subnets. |
| 55 | Block rules are persisted and restored on WireGuard restart. |
| 56 | |
| 57 | Options: |
| 58 | --name <name> Client name (e.g. phone-nuno) |
| 59 | --ip <ip> Block access to specific IP (repeatable) |
| 60 | --subnet <cidr> Block access to subnet (repeatable) |
| 61 | --port <ip:port:proto> Block specific port, e.g. 10.0.0.210:9000:tcp (repeatable) |
| 62 | |
| 63 | Examples: |
| 64 | wgctl block --name phone-nuno |
| 65 | wgctl block --name phone-nuno --ip 10.0.0.210 |
| 66 | wgctl block --name phone-nuno --subnet 10.0.0.0/24 |
| 67 | wgctl block --name phone-nuno --port 10.0.0.210:9000:tcp |
| 68 | wgctl ban --name phone-nuno --ip 10.0.0.100 --ip 10.0.0.200 |
| 69 | root@wireguard:/# wgctl group unblock --name family |
| 70 | |
| 71 | ──────────────────────────────────────────────── |
| 72 | Unblocking group: family |
| 73 | ──────────────────────────────────────────────── |
| 74 | => WARN: ⚠️ 🔒 phone-nuno — not blocked |
| 75 | => WARN: ⚠️ 🔒 tablet-nuno — not blocked |
| 76 | => SUCCESS: ✅ 🔒 Unblocked 0 peers in group 'family' |
| 77 | root@wireguard:/# |