gistfile1.txt
· 1.5 KiB · Text
Raw
root@wireguard:/etc/wireguard/wgctl# wgctl net help
Usage: wgctl net <subcommand> [options]
Manage named network services for use with block/allow rules.
Services map names to IPs and ports, making rules more readable.
Subcommands:
list List all services
show --name <name> Show service details
add --name <name> --ip <ip> Add a service
add --name <svc:port-name> --port <port:proto>
Add a port to a service
rm --name <name> Remove service or port
rm --name <svc:ports> Remove all ports from service
Options for add (service):
--name <name> Service name (e.g. proxmox)
--ip <ip> Service IP address
--desc <description> Optional description
--tag <tag> Optional tag (repeatable)
Options for add (port):
--name <svc:port-name> Service:port-name (e.g. proxmox:web-ui)
--port <port:proto> Port and protocol (e.g. 8006:tcp)
--desc <description> Optional description
Options for list:
--detailed Show ports for each service
--tag <tag> Filter by tag
Examples:
wgctl net list
wgctl net list --detailed
wgctl net list --tag admin
wgctl net show --name proxmox
wgctl net add --name proxmox --ip 10.0.0.100 --desc "Proxmox VE"
wgctl net add --name proxmox:web-ui --port 8006:tcp --desc "Web UI"
wgctl net add --name proxmox:ssh --port 22:tcp
wgctl net rm --name proxmox:web-ui
wgctl net rm --name proxmox:ports
wgctl net rm --name proxmox
| 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 |