Web lists-archives.com

Re: Get the external IP address from a Linux box




On Sun, 2018-05-27 at 23:48 +1000, Andrew McGlashan wrote:
> Hi,
> 
> On 27/05/18 22:14, André Rodier wrote:
> > > My script also does the Google DNS lookup.
> > 
> > I have four IP addresses, and Goodle DNS returns the first one,
> > although I query from the second one.
> 
> Are you sure that isn't a problem at your end?  How your firewall is
> identifying and routing the traffic, perhaps?

Yes, it might be that, the only logic explanation. I will check my
router settings.

> # dig -t txt +short o-o.myaddr.l.google.com @ns1.google.com
> "74.125.181.11"
> "edns0-client-subnet 92.19.253.41/32"
> # wget -q -O - https://api.ipify.org/ ; echo
> 92.19.253.42

> I've got access to an IPV4 /29 block and did the Google DNS query from
> two hosts and got their own IP addresses.
> 
> # dig -t txt +short o-o.myaddr.l.google.com @ns1.google.com
> "115.nnn.nnn.17"

> # dig -t txt +short o-o.myaddr.l.google.com @ns1.google.com
> "115.nnn.nnn.18"
> 
> Kind Regards
> AndrewM

Have a nice day!