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 Both sides next revision
system:what_is_my_ip_address [2023-12-15T09:18:46+0000]
michael_paoli DNS: updated example
system:what_is_my_ip_address [2024-01-31T20:28:00+0000]
michael_paoli myip@{,ipv{4,6}.}balug.org ssh
Line 84: Line 84:
 |-                                                                                          |-                                                                                          |  4  |  6  |  y             ​| ​ -           ​| ​ -              |@one.one.one.one. whoami.cloudflare. TXT CH                                       | |-                                                                                          |-                                                                                          |  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  |  -             ​| ​ -           ​| ​ -              |                                                                                  |
 +|                                                                                           ​| ​                                                                                          ​| ​ 4  |  6  |  -             ​| ​ y           ​| ​ -              |myip@balug.org ​                                                                   |
 |[[http://​ipv4.balug.org/​myip]] ​                                                            ​|[[https://​ipv4.balug.org/​myip]] ​                                                           |  4  |  -  |  -             ​| ​ -           ​| ​ -              |                                                                                  | |[[http://​ipv4.balug.org/​myip]] ​                                                            ​|[[https://​ipv4.balug.org/​myip]] ​                                                           |  4  |  -  |  -             ​| ​ -           ​| ​ -              |                                                                                  |
 +|                                                                                           ​| ​                                                                                          ​| ​ 4  |  -  |  -             ​| ​ y           ​| ​ -              |myip@ipv4.balug.org ​                                                              |
 |[[http://​ipv6.balug.org/​myip]] ​                                                            ​|[[https://​ipv6.balug.org/​myip]] ​                                                           |  -  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  | |[[http://​ipv6.balug.org/​myip]] ​                                                            ​|[[https://​ipv6.balug.org/​myip]] ​                                                           |  -  |  6  |  -             ​| ​ -           ​| ​ -              |                                                                                  |
 +|                                                                                           ​| ​                                                                                          ​| ​ -  |  6  |  -             ​| ​ y           ​| ​ -              |myip@ipv6.balug.org ​                                                              |
 |[[http://​corz.org/​ip]]* ​                                                                   |[[https://​corz.org/​ip]] ​                                                                   |  4  |  -  |  -             ​| ​ -           ​| ​ -              |* http redirects to https                                                         | |[[http://​corz.org/​ip]]* ​                                                                   |[[https://​corz.org/​ip]] ​                                                                   |  4  |  -  |  -             ​| ​ -           ​| ​ -              |* http redirects to https                                                         |
 |[[http://​httpbin.dmuth.org/​ip]]* ​                                                          ​|[[https://​httpbin.dmuth.org/​ip]] ​                                                          ​| ​ 4  |  6  |  -             ​| ​ -           ​| ​ -              |found in text, * http redirects to https                                          | |[[http://​httpbin.dmuth.org/​ip]]* ​                                                          ​|[[https://​httpbin.dmuth.org/​ip]] ​                                                          ​| ​ 4  |  6  |  -             ​| ​ -           ​| ​ -              |found in text, * http redirects to https                                          |
Line 567: Line 570:
 myv6="​$(curl -6 -s https://​ipv6.balug.org/​myip)"​ || exit myv6="​$(curl -6 -s https://​ipv6.balug.org/​myip)"​ || exit
 control_M="​$(printf '​\015'​)"​ control_M="​$(printf '​\015'​)"​
-for domain ​in \ +for userathost ​in \ 
-  sshmyip.com+  sshmyip.com ​myip@{,​ipv{4,​6}.}balug.org
 do do
   for v in 4 6   for v in 4 6
Line 581: Line 584:
     esac     esac
     sshopts="​-$v -n -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/​dev/​null"​     sshopts="​-$v -n -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/​dev/​null"​
-    r=$(ssh $sshopts $domain ​2>>/​dev/​null)+    r=$(ssh $sshopts $userathost ​2>>/​dev/​null)
     case "​$r"​ in     case "​$r"​ in
       "​$myip"​)       "​$myip"​)
-        echo "\$ ssh -$v $domain"+        echo "\$ ssh -$v $userathost"
         echo $r         echo $r
       ;;       ;;
       "​$myip$control_M"​)       "​$myip$control_M"​)
-        echo "\$ ssh -$v domain"+        echo "\$ ssh -$v $userathost"
         echo $myip'​^M'​         echo $myip'​^M'​
       ;;       ;;
       *"​$myip"​*)       *"​$myip"​*)
-        echo "\$ ssh -$v $domain"+        echo "\$ ssh -$v $userathost"
         echo $myip found in text         echo $myip found in text
       ;;       ;;
Line 602: Line 605:
         printf '​%s'​ "​$r"​ |         printf '​%s'​ "​$r"​ |
         if grep "​$myRE"​ >>/​dev/​null;​ then         if grep "​$myRE"​ >>/​dev/​null;​ then
-          echo "\$ ssh -$v $domain"+          echo "\$ ssh -$v $userathost"
           echo $myip found in text in alternative format           echo $myip found in text in alternative format
         fi         fi
Line 613: Line 616:
 $ ssh -6 sshmyip.com $ ssh -6 sshmyip.com
 2001:​470:​67:​76f::​2 found in text 2001:​470:​67:​76f::​2 found in text
 +$ ssh -4 myip@balug.org
 +96.86.170.226
 +$ ssh -6 myip@balug.org
 +2001:​470:​67:​76f::​2
 +$ ssh -4 myip@ipv4.balug.org
 +96.86.170.226
 +$ ssh -6 myip@ipv6.balug.org
 +2001:​470:​67:​76f::​2
  
 </​file>​ </​file>​
system/what_is_my_ip_address.txt · Last modified: 2024-05-05T19:51:02+0000 by michael_paoli