User Tools

Site Tools


system:what_is_my_ip_address

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
system:what_is_my_ip_address [2023-12-15T08:34:07+0000]
michael_paoli remove (mostly done) section: Work in progress
system:what_is_my_ip_address [2023-12-15T09:18:46+0000]
michael_paoli DNS: updated example
Line 70: Line 70:
 |[[http://​ip6.me/​api/​]] ​                                                                    ​|[[https://​ip6.me/​api/​]] ​                                                                   |  4  |  6  |  -             ​| ​ -           ​| ​ -              |https://​ip6.me/​docs/​ found in text                                                | |[[http://​ip6.me/​api/​]] ​                                                                    ​|[[https://​ip6.me/​api/​]] ​                                                                   |  4  |  6  |  -             ​| ​ -           ​| ​ -              |https://​ip6.me/​docs/​ found in text                                                |
 |[[http://​ip6only.me/​api/​]] ​                                                                ​|[[https://​ip6only.me/​api/​]] ​                                                               |  -  |  6  |  -             ​| ​ -           ​| ​ -              |https://​ip6.me/​docs/​ found in text                                                | |[[http://​ip6only.me/​api/​]] ​                                                                ​|[[https://​ip6only.me/​api/​]] ​                                                               |  -  |  6  |  -             ​| ​ -           ​| ​ -              |https://​ip6.me/​docs/​ found in text                                                |
 +|-                                                                                          |-                                                                                          |  4  |  -  |  U             ​| ​ -           ​| ​ -              |@update.dynamic.name. my.dynamic.name. A                                          |
 |-                                                                                          |-                                                                                          |  4  |  -  |  y             ​| ​ -           ​| ​ -              |@ns1-1.akamaitech.net. whoami.akamai.net. A                                       | |-                                                                                          |-                                                                                          |  4  |  -  |  y             ​| ​ -           ​| ​ -              |@ns1-1.akamaitech.net. whoami.akamai.net. A                                       |
 |[[https://​bgpstuff.net/​]]* ​                                                                ​|[[https://​bgpstuff.net/​]] ​                                                                 |  4  |  6  |  -             ​| ​ -           ​| ​ -              |found in text                                                                     | |[[https://​bgpstuff.net/​]]* ​                                                                ​|[[https://​bgpstuff.net/​]] ​                                                                 |  4  |  6  |  -             ​| ​ -           ​| ​ -              |found in text                                                                     |
Line 81: Line 82:
 |[[http://​sjekkip.no/​]] ​                                                                    ​|[[https://​sjekkip.no/​]] ​                                                                   |  4  |  -  |  -             ​| ​ -           ​| ​ -              |                                                                                  | |[[http://​sjekkip.no/​]] ​                                                                    ​|[[https://​sjekkip.no/​]] ​                                                                   |  4  |  -  |  -             ​| ​ -           ​| ​ -              |                                                                                  |
 |[[http://​ip.tyk.nu]] ​                                                                      ​|[[https://​ip.tyk.nu]] ​                                                                     |  4  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  | |[[http://​ip.tyk.nu]] ​                                                                      ​|[[https://​ip.tyk.nu]] ​                                                                     |  4  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  |
 +|-                                                                                          |-                                                                                          |  4  |  6  |  y             ​| ​ -           ​| ​ -              |@one.one.one.one. whoami.cloudflare. TXT CH                                       |
 |[[http://​balug.org/​myip]] ​                                                                 |[[https://​balug.org/​myip]] ​                                                                ​| ​ 4  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  | |[[http://​balug.org/​myip]] ​                                                                 |[[https://​balug.org/​myip]] ​                                                                ​| ​ 4  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  |
 |[[http://​ipv4.balug.org/​myip]] ​                                                            ​|[[https://​ipv4.balug.org/​myip]] ​                                                           |  4  |  -  |  -             ​| ​ -           ​| ​ -              |                                                                                  | |[[http://​ipv4.balug.org/​myip]] ​                                                            ​|[[https://​ipv4.balug.org/​myip]] ​                                                           |  4  |  -  |  -             ​| ​ -           ​| ​ -              |                                                                                  |
Line 105: Line 107:
 |[[http://​myipv4.addr.tools/​]] ​                                                             |[[https://​myipv4.addr.tools/​]] ​                                                            ​| ​ 4  |  -  |  -             ​| ​ -           ​| ​ -              |https://​ip.addr.tools/ ​                                                           | |[[http://​myipv4.addr.tools/​]] ​                                                             |[[https://​myipv4.addr.tools/​]] ​                                                            ​| ​ 4  |  -  |  -             ​| ​ -           ​| ​ -              |https://​ip.addr.tools/ ​                                                           |
 |[[http://​myipv6.addr.tools/​]] ​                                                             |[[https://​myipv6.addr.tools/​]] ​                                                            ​| ​ -  |  6  |  -             ​| ​ -           ​| ​ -              |https://​ip.addr.tools/ ​                                                           | |[[http://​myipv6.addr.tools/​]] ​                                                             |[[https://​myipv6.addr.tools/​]] ​                                                            ​| ​ -  |  6  |  -             ​| ​ -           ​| ​ -              |https://​ip.addr.tools/ ​                                                           |
-|-                                                                                          |-                                                                                          |  4  |  ​ ​|  ​            |  -           ​| ​ -              |https://​www.dns.toys/​ @dns.toys ip. TXT help. TXT                                 |+|-                                                                                          |-                                                                                          |  4  |  ​ ​|  ​            |  -           ​| ​ -              |https://​www.dns.toys/​ @dns.toys ip. TXT help. TXT                                 |
 |[[http://​myip.wtf/​text]] ​                                                                  ​|[[https://​myip.wtf/​text]] ​                                                                 |  4  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  | |[[http://​myip.wtf/​text]] ​                                                                  ​|[[https://​myip.wtf/​text]] ​                                                                 |  4  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  |
 |[[http://​ip.wtf/​]] ​                                                                        ​|[[https://​ip.wtf/​]] ​                                                                       |  4  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  | |[[http://​ip.wtf/​]] ​                                                                        ​|[[https://​ip.wtf/​]] ​                                                                       |  4  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  |
Line 433: Line 435:
  
 <​file>​ <​file>​
-for ns_rr_types ​in \ +myv4="​$(curl -4 -s https://​ipv4.balug.org/​myip)"​ || exit 
-  '​ns1.google.com. o-o.myaddr.l.google.com. TXT' \ +myv6="​$(curl -6 -s https://​ipv6.balug.org/​myip)"​ || exit 
-  '​resolver1.opendns.com. myip.opendns.com. A AAAA' \ +control_M="​$(printf '​\015'​)"​ 
-  '​ns.sslip.io. ip.sslip.io. TXT' \ +#​digopts='​+noall +answer +nottl +norecurse'​ 
-  '​ns1-1.akamaitech.net. whoami.akamai.net. A' \ +digopts='​+short +norecurse'​ 
-  '​dns.toys ip. TXT'+for ns_rr_class_types ​in 
 +  '​1.1.1.1 whoami.cloudflare CH TXT' ​
 +  '​ns1.google.com. o-o.myaddr.l.google.com. ​IN TXT' \ 
 +  '​resolver1.opendns.com. myip.opendns.com. ​IN A AAAA' \ 
 +  '​ns.sslip.io. ip.sslip.io. ​IN TXT' \ 
 +  '​update.dynamic.name. my.dynamic.name. IN A' \ 
 +  '​ns1-1.akamaitech.net. whoami.akamai.net. ​IN A' \ 
 +  '​one.one.one.one. whoami.cloudflare. CH TXT' \ 
 +  '​dns.toys ip. IN TXT'
 do do
-  set -- $ns_rr_types; ​NS="​$1";​ shift; RR="​$1";​ shift; TYPES="​$*"​ +  set -- $ns_rr_class_types 
-  query=+  ​NS="​$1";​ shift; RR="​$1";​ shift; CLASS="​$1";​ shift; TYPES="​$*"​
   for TYPE in $TYPES   for TYPE in $TYPES
   do   do
-    query="​${query:​+$query ​}$RR $TYPE"+    query="​$RR $TYPE $CLASS"​ 
 +    for v in 4 6 
 +    do 
 +      case "​$v"​ in 
 +        4) 
 +          myip="​$myv4"​ 
 +        ;; 
 +        6) 
 +          myip="​$myv6"​ 
 +        ;; 
 +      esac 
 +      r=$(dig @"​$NS"​ $digopts -"​$v"​ $query 2>>/​dev/​null) &&​ 
 +      case "​$r"​ in 
 +        \""​$myip"​\"​|"​$myip"​) 
 +          echo "\$ dig @"​$NS"​ $digopts -"​$v"​ $query"​ 
 +          echo $r 
 +        ;; 
 +        *"​$myip"​*) 
 +          echo "\$ dig @"​$NS"​ $digopts -"​$v"​ $query"​ 
 +          printf 'found in text:\n%s\n'​ "​$r"​ 
 +        ;; 
 +        *) 
 +          myRE=$( 
 +            echo "​$myip"​ | 
 +            sed -e '​s/​[.:​]/​-/​g'​ 
 +          ) 
 +          printf '​%s'​ "​$r"​ | 
 +          if grep "​$myRE"​ >>/​dev/​null;​ then 
 +            echo "\$ dig @"​$NS"​ $digopts -"​$v"​ $query"​ 
 +            echo $myip found in text in alternative format 
 +          fi 
 +        ;; 
 +      esac 
 +      r=$(dig @"​$NS" ​+tcp $digopts -"​$v" ​$query ​2>>/​dev/​null) &&​ 
 +      case "$r" in 
 +        \""​$myip"\"​|"​$myip"​) 
 +          echo "\$ dig @"​$NS"​ +tcp $digopts -"​$v"​ $query"​ 
 +          echo $r 
 +        ;; 
 +        *"​$myip"​*) 
 +          echo "\$ dig @"​$NS"​ +tcp $digopts -"​$v"​ $query"​ 
 +          printf 'found in text:​\n%s\n'​ "​$r"​ 
 +        ;; 
 +        *) 
 +          myRE=$( 
 +            echo "​$myip"​ | 
 +            sed -e '​s/​[.:​]/​-/​g'​ 
 +          ) 
 +          printf '​%s'​ "​$r"​ | 
 +          if grep "​$myRE"​ >>/​dev/​null;​ then 
 +            echo "\$ dig @"​$NS"​ +tcp $digopts -"​$v"​ $query"​ 
 +            echo $myip found in text in alternative format 
 +          fi 
 +        ;; 
 +      esac 
 +    done
   done   done
-  for v in 4 6 
-  do 
-    r=$(dig @"​$NS"​ +short +norecurse -"​$v"​ $query 2>>/​dev/​null) && 
-    [ -n "​$r"​ ] && { 
-      echo \$ dig @"​$NS"​ +short +norecurse -"​$v"​ $query 
-      echo $r 
-    } 
-  done 
-  : 
 done; echo '$ ' done; echo '$ '
- +$ dig @1.1.1.+short +norecurse -4 whoami.cloudflare ​TXT CH
-$ dig @ns1.google.com. +short +norecurse -4 o-o.myaddr.l.google.com. TXT+
 "​96.86.170.226"​ "​96.86.170.226"​
-$ dig @ns1.google.com. +short +norecurse -6 o-o.myaddr.l.google.com. TXT+$ dig @1.1.1.1 +tcp +short +norecurse -4 whoami.cloudflare TXT CH 
 +"​96.86.170.226"​ 
 +$ dig @ns1.google.com. +short +norecurse -4 o-o.myaddr.l.google.com. TXT IN 
 +"​96.86.170.226"​ 
 +$ dig @ns1.google.com. +tcp +short +norecurse -4 o-o.myaddr.l.google.com. TXT IN 
 +"​96.86.170.226"​ 
 +$ dig @ns1.google.com. +short +norecurse -6 o-o.myaddr.l.google.com. TXT IN
 "​2001:​470:​67:​76f::​2"​ "​2001:​470:​67:​76f::​2"​
-$ dig @resolver1.opendns.com. +short +norecurse -4 myip.opendns.com. A myip.opendns.com. ​AAAA+$ dig @ns1.google.com. +tcp +short +norecurse -6 o-o.myaddr.l.google.com. TXT IN 
 +"​2001:​470:​67:​76f::​2"​ 
 +$ dig @resolver1.opendns.com. +short +norecurse -4 myip.opendns.com. A IN 
 +96.86.170.226 
 +$ dig @resolver1.opendns.com. +tcp +short +norecurse -4 myip.opendns.com. ​A IN
 96.86.170.226 96.86.170.226
-$ dig @resolver1.opendns.com. +short +norecurse -6 myip.opendns.com. A myip.opendns.com. AAAA+$ dig @resolver1.opendns.com. +short +norecurse -6 myip.opendns.com. AAAA IN
 2001:​470:​67:​76f::​2 2001:​470:​67:​76f::​2
-$ dig @ns.sslip.io. +short +norecurse -4 ip.sslip.io. TXT+$ dig @resolver1.opendns.com. +tcp +short +norecurse -6 myip.opendns.com. AAAA IN 
 +2001:​470:​67:​76f::​2 
 +$ dig @ns.sslip.io. +short +norecurse -4 ip.sslip.io. TXT IN 
 +"​96.86.170.226"​ 
 +$ dig @ns.sslip.io. +tcp +short +norecurse -4 ip.sslip.io. TXT IN
 "​96.86.170.226"​ "​96.86.170.226"​
-$ dig @ns.sslip.io. +short +norecurse -6 ip.sslip.io. TXT+$ dig @ns.sslip.io. +short +norecurse -6 ip.sslip.io. TXT IN
 "​2001:​470:​67:​76f::​2"​ "​2001:​470:​67:​76f::​2"​
-$ dig @ns1-1.akamaitech.net. +short +norecurse -4 whoami.akamai.net. A whoami.ak+$ dig @ns.sslip.io. +tcp +short +norecurse ​-6 ip.sslip.io. TXT IN 
 +"​2001:​470:​67:​76f::​2"​ 
 +$ dig @update.dynamic.name. +short +norecurse -4 my.dynamic.name. A IN
 96.86.170.226 96.86.170.226
-$ dig @dns.toys +short +norecurse -4 ip. TXT+$ dig @ns1-1.akamaitech.net. +short +norecurse -4 whoami.akamai.net. A IN 
 +96.86.170.226 
 +$ dig @ns1-1.akamaitech.net. +tcp +short +norecurse -4 whoami.akamai.net. A IN 
 +96.86.170.226 
 +$ dig @one.one.one.one. +short +norecurse -4 whoami.cloudflare. TXT CH 
 +"​96.86.170.226"​ 
 +$ dig @one.one.one.one. +tcp +short +norecurse -4 whoami.cloudflare. TXT CH 
 +"​96.86.170.226"​ 
 +$ dig @one.one.one.one. +short +norecurse -6 whoami.cloudflare. TXT CH 
 +"​2001:​470:​67:​76f::​2"​ 
 +$ dig @one.one.one.one. +tcp +short +norecurse -6 whoami.cloudflare. TXT CH 
 +"​2001:​470:​67:​76f::​2"​ 
 +$ dig @dns.toys +short +norecurse -4 ip. TXT IN
 "​96.86.170.226"​ "​96.86.170.226"​
-$ dig @dns.toys +short +norecurse -6 ip. TXT+$ dig @dns.toys +short +norecurse -6 ip. TXT IN
 "​2001:​470:​67:​76f::​2"​ "​2001:​470:​67:​76f::​2"​
  
system/what_is_my_ip_address.txt · Last modified: 2024-05-05T19:51:02+0000 by michael_paoli