diff options
Diffstat (limited to 'middleware/rewrite/README.md')
-rw-r--r-- | middleware/rewrite/README.md | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/middleware/rewrite/README.md b/middleware/rewrite/README.md index 8fa38a377..63334d09c 100644 --- a/middleware/rewrite/README.md +++ b/middleware/rewrite/README.md @@ -37,7 +37,7 @@ Using FIELD edns0, you can set, append, or replace specific EDNS0 options on the * `append` will add the option regardless of what options already exist * `set` will modify a matching option or add one if none is found -Currently supported are `EDNS0_LOCAL` and `EDNS0_NSID`. +Currently supported are `EDNS0_LOCAL`, `EDNS0_NSID` and `EDNS0_SUBNET`. ### `EDNS0_LOCAL` @@ -74,3 +74,18 @@ rewrite edns0 local set 0xffee {client_ip} This has no fields; it will add an NSID option with an empty string for the NSID. If the option already exists and the action is `replace` or `set`, then the NSID in the option will be set to the empty string. + +### `EDNS0_SUBNET` + +This has two fields, IPv4 bitmask length and IPv6 bitmask length. The bitmask +length is used to extract the client subnet from the source IP address in the query. + +Example: + +~~~ + rewrite edns0 subnet set 24 56 +~~~ + +* If the query has source IP as IPv4, the first 24 bits in the IP will be the network subnet. +* If the query has source IP as IPv6, the first 56 bits in the IP will be the network subnet. + |