From fc70bc6095dba783d53b0629c67e01c1b5bab98f Mon Sep 17 00:00:00 2001 From: Joshua Priddle Date: Wed, 29 May 2024 01:00:33 -0400 Subject: [PATCH] Add post --- ...24-05-29-public-ip-lookup-from-cloudflare-dns.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 _posts/2024-05-29-public-ip-lookup-from-cloudflare-dns.md diff --git a/_posts/2024-05-29-public-ip-lookup-from-cloudflare-dns.md b/_posts/2024-05-29-public-ip-lookup-from-cloudflare-dns.md new file mode 100644 index 0000000..fb5bb44 --- /dev/null +++ b/_posts/2024-05-29-public-ip-lookup-from-cloudflare-dns.md @@ -0,0 +1,13 @@ +--- +title: "Public IP lookup from CloudFlare DNS" +date: "Wed May 29 00:57:41 -0400 2024" +category: dev +--- + +I wanted a quick way to grab my public IP address from the command line. I +found that CloudFlare's DNS service allows this by looking up TXT records for +`whoami.cloudflare`. + +```bash +dig @1.1.1.1 ch txt whoami.cloudflare +short | tr -d '"' +```