nuno hat die Gist bearbeitet 1 month ago. Zu Änderung gehen
1 file changed, 41 insertions
gistfile1.txt(Datei erstellt)
| @@ -0,0 +1,41 @@ | |||
| 1 | + | root@wireguard:/etc/wireguard/wgctl# wgctl net help | |
| 2 | + | Usage: wgctl net <subcommand> [options] | |
| 3 | + | ||
| 4 | + | Manage named network services for use with block/allow rules. | |
| 5 | + | Services map names to IPs and ports, making rules more readable. | |
| 6 | + | ||
| 7 | + | Subcommands: | |
| 8 | + | list List all services | |
| 9 | + | show --name <name> Show service details | |
| 10 | + | add --name <name> --ip <ip> Add a service | |
| 11 | + | add --name <svc:port-name> --port <port:proto> | |
| 12 | + | Add a port to a service | |
| 13 | + | rm --name <name> Remove service or port | |
| 14 | + | rm --name <svc:ports> Remove all ports from service | |
| 15 | + | ||
| 16 | + | Options for add (service): | |
| 17 | + | --name <name> Service name (e.g. proxmox) | |
| 18 | + | --ip <ip> Service IP address | |
| 19 | + | --desc <description> Optional description | |
| 20 | + | --tag <tag> Optional tag (repeatable) | |
| 21 | + | ||
| 22 | + | Options for add (port): | |
| 23 | + | --name <svc:port-name> Service:port-name (e.g. proxmox:web-ui) | |
| 24 | + | --port <port:proto> Port and protocol (e.g. 8006:tcp) | |
| 25 | + | --desc <description> Optional description | |
| 26 | + | ||
| 27 | + | Options for list: | |
| 28 | + | --detailed Show ports for each service | |
| 29 | + | --tag <tag> Filter by tag | |
| 30 | + | ||
| 31 | + | Examples: | |
| 32 | + | wgctl net list | |
| 33 | + | wgctl net list --detailed | |
| 34 | + | wgctl net list --tag admin | |
| 35 | + | wgctl net show --name proxmox | |
| 36 | + | wgctl net add --name proxmox --ip 10.0.0.100 --desc "Proxmox VE" | |
| 37 | + | wgctl net add --name proxmox:web-ui --port 8006:tcp --desc "Web UI" | |
| 38 | + | wgctl net add --name proxmox:ssh --port 22:tcp | |
| 39 | + | wgctl net rm --name proxmox:web-ui | |
| 40 | + | wgctl net rm --name proxmox:ports | |
| 41 | + | wgctl net rm --name proxmox | |
Neuer
Älter