diff options
Diffstat (limited to 'src/tools/wg-quick.8')
-rw-r--r-- | src/tools/wg-quick.8 | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/tools/wg-quick.8 b/src/tools/wg-quick.8 index 04653a8..f27a270 100644 --- a/src/tools/wg-quick.8 +++ b/src/tools/wg-quick.8 @@ -62,9 +62,16 @@ sub-command, with the exception of the following additions to the \fIInterface\f which are handled by this tool: .IP \(bu -Address \(em a comma-separated list of ip (v4 or v6) addresses (optionally with CIDR masks) +Address \(em a comma-separated list of IP (v4 or v6) addresses (optionally with CIDR masks) to be assigned to the interface. May be specified multiple times. .IP \(bu +DNS \(em a comma-separated list of IP (v4 or v6) addresses to be set as the interface's +DNS servers. May be specified multiple times. Upon bringing the interface up, this runs +`resolvconf -a tun.\fIINTERFACE\fP -m 0 -x` and upon bringing it down, this runs +`resolvconf -d tun.\fIINTERFACE\fP`. If these particular invocations of +.BR resolvconf (8) +are undesirable, the PostUp and PostDown keys below may be used instead. +.IP \(bu MTU \(em if not specified, the MTU is automatically determined from the endpoint addresses or the system default route, which is usually a sane choice. However, to manually specify an MTU to override this automatic discovery, this value may be specified explicitly. @@ -72,7 +79,8 @@ an MTU to override this automatic discovery, this value may be specified explici PreUp, PostUp, PreDown, PostDown \(em script snippets which will be executed by .BR bash (1) before/after setting up/tearing down the interface, most commonly used -to configure DNS. The special string `%i' is expanded to \fIINTERFACE\fP. +to configure custom DNS options or firewall rules. The special string `%i' +is expanded to \fIINTERFACE\fP. .IP \(bu SaveConfig \(em if set to `true', the configuration is saved from the current state of the interface upon shutdown. @@ -98,9 +106,7 @@ traffic: .br \fBAddress = 10.200.100.8/24\fP .br - \fBPostUp = echo nameserver 10.200.100.1 | resolvconf -a tun.%i -m 0 -x\fP -.br - \fBPostDown = resolvconf -d tun.%i\fP + \fBDNS = 10.200.100.1\fP .br PrivateKey = oK56DE9Ue9zK76rAc8pBl6opph+1v36lm7cXXsQKrQM= .br @@ -117,12 +123,11 @@ traffic: Endpoint = demo.wireguard.com:51820 .br -Notice that the `PostUp` and `PostDown` commands are used here to configure DNS using -.BR resolvconf (8), -which is one of the many options for DNS configuration. The `Address` field is added -here in order to set up the address for the interface. The peer's allowed IPs entry -implies that this interface should be configured as the default gateway, which this -script does. +The `Address` field is added here in order to set up the address for the interface. The `DNS` field +indicates that a DNS server for the interface should be configured via +.BR resolvconf (8). +The peer's allowed IPs entry implies that this interface should be configured as the default gateway, +which this script does. Here is a more complicated example, fit for usage on a server: @@ -184,7 +189,8 @@ This will load the configuration file `/etc/wireguard/wgnet0.conf'. .BR ip-link (8), .BR ip-address (8), .BR ip-route (8), -.BR ip-rule (8). +.BR ip-rule (8), +.BR resolvconf (8). .SH AUTHOR .B wg-quick |