nuno revisou este gist 1 month ago. Ir para a revisão
1 file changed, 51 insertions
gistfile1.txt(arquivo criado)
| @@ -0,0 +1,51 @@ | |||
| 1 | + | /etc/wireguard/wgctl/commands/block.command.sh:function cmd::block::help() { | |
| 2 | + | /etc/wireguard/wgctl/commands/block.command.sh- cat <<EOF | |
| 3 | + | /etc/wireguard/wgctl/commands/block.command.sh-Usage: wgctl block --name <name> [options] | |
| 4 | + | /etc/wireguard/wgctl/commands/block.command.sh- | |
| 5 | + | /etc/wireguard/wgctl/commands/block.command.sh-Block a client entirely or restrict access to specific IPs/ports/subnets. | |
| 6 | + | /etc/wireguard/wgctl/commands/block.command.sh-Block rules are persisted and restored on WireGuard restart. | |
| 7 | + | /etc/wireguard/wgctl/commands/block.command.sh- | |
| 8 | + | /etc/wireguard/wgctl/commands/block.command.sh-Options: | |
| 9 | + | /etc/wireguard/wgctl/commands/block.command.sh- --name <name> Client name (e.g. phone-nuno) | |
| 10 | + | /etc/wireguard/wgctl/commands/block.command.sh- --type <type> Device type (optional, combines with --name) | |
| 11 | + | /etc/wireguard/wgctl/commands/block.command.sh- --ip <ip> Block access to specific IP (repeatable) | |
| 12 | + | /etc/wireguard/wgctl/commands/block.command.sh- --subnet <cidr> Block access to subnet (repeatable) | |
| 13 | + | /etc/wireguard/wgctl/commands/block.command.sh- --port <ip:port:proto> Block specific port, e.g. 10.0.0.210:9000:tcp (repeatable) | |
| 14 | + | /etc/wireguard/wgctl/commands/block.command.sh- --force Skip confirmation prompt | |
| 15 | + | /etc/wireguard/wgctl/commands/block.command.sh- --quiet Suppress output (used by group block) | |
| 16 | + | /etc/wireguard/wgctl/commands/block.command.sh- | |
| 17 | + | /etc/wireguard/wgctl/commands/block.command.sh-Examples: | |
| 18 | + | /etc/wireguard/wgctl/commands/block.command.sh- wgctl block --name phone-nuno | |
| 19 | + | /etc/wireguard/wgctl/commands/block.command.sh- wgctl block --name nuno --type phone | |
| 20 | + | /etc/wireguard/wgctl/commands/block.command.sh- wgctl block --name phone-nuno --ip 10.0.0.210 | |
| 21 | + | /etc/wireguard/wgctl/commands/block.command.sh- wgctl block --name phone-nuno --subnet 10.0.0.0/24 | |
| 22 | + | /etc/wireguard/wgctl/commands/block.command.sh- wgctl block --name phone-nuno --port 10.0.0.210:9000:tcp | |
| 23 | + | /etc/wireguard/wgctl/commands/block.command.sh- wgctl ban --name phone-nuno | |
| 24 | + | /etc/wireguard/wgctl/commands/block.command.sh-EOF | |
| 25 | + | /etc/wireguard/wgctl/commands/block.command.sh-} | |
| 26 | + | /etc/wireguard/wgctl/commands/block.command.sh- | |
| 27 | + | -- | |
| 28 | + | /etc/wireguard/wgctl/commands/unblock.command.sh:function cmd::unblock::help() { | |
| 29 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- cat <<EOF | |
| 30 | + | /etc/wireguard/wgctl/commands/unblock.command.sh-Usage: wgctl unblock --name <name> [options] | |
| 31 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- | |
| 32 | + | /etc/wireguard/wgctl/commands/unblock.command.sh-Remove block rules for a client. | |
| 33 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- | |
| 34 | + | /etc/wireguard/wgctl/commands/unblock.command.sh-Options: | |
| 35 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- --name <name> Client name (e.g. phone-nuno) | |
| 36 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- --type <type> Device type (optional, combines with --name) | |
| 37 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- --ip <ip> Unblock specific IP (repeatable) | |
| 38 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- --subnet <cidr> Unblock specific subnet (repeatable) | |
| 39 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- --port <ip:port:proto> Unblock specific port (repeatable) | |
| 40 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- --all Remove all block rules for this client | |
| 41 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- --force Skip confirmation prompt | |
| 42 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- --quiet Suppress output (used by group unblock) | |
| 43 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- | |
| 44 | + | /etc/wireguard/wgctl/commands/unblock.command.sh-Examples: | |
| 45 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- wgctl unblock --name phone-nuno | |
| 46 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- wgctl unblock --name nuno --type phone | |
| 47 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- wgctl unblock --name phone-nuno --ip 10.0.0.210 | |
| 48 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- wgctl unban --name phone-nuno | |
| 49 | + | /etc/wireguard/wgctl/commands/unblock.command.sh-EOF | |
| 50 | + | /etc/wireguard/wgctl/commands/unblock.command.sh-} | |
| 51 | + | /etc/wireguard/wgctl/commands/unblock.command.sh- | |
Próximo
Anterior