diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 0a49183..30e7ad6 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -90,4 +90,11 @@ Using the connexion to allow, go to and click on "Autonomous You can now copy all the IP adresses in the "routes" section, remove all quotation marks, commas and spaces, but keep one IP per line, then paste the result into your allowlist. It should look like the list in the previous section. +You can use the following command to automatically give you a ready-to-use list: + +```bash +AS="$(curl -sL ip.guide | jq -s --indent 1 ".[].network.autonomous_system.asn")" | curl -sL ip.guide/AS"$AS" | jq -s --indent 1 ".[].routes" | +sed "/\[/d;/{/d;/]/d;/}/d;s/ \"//;s/\",//;s/\"//" +``` + **Note:** maybe you'll need to do this step multiple times, as some Internet provider have multiple ASN numbers. So if one day your AdGuard Home refuses to reply, it might be because of this.