From 2ebd81db62b313331810b676f1c9cd3ffccd9691 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 1 Jan 2024 07:17:52 +0100 Subject: [PATCH] add a command for a ready to use list --- doc/ADMIN.md | 7 +++++++ 1 file changed, 7 insertions(+) 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.