What is up with IP address? Getting bizarre results
Question
I'm trying to limit my teenage son's access to certain websites (like Discord) during school hours only. The only solution I've found is to use something like https://www.dnsfilter.com. They require our public IP.
But while playing with different DNS settings, I'm getting bizarre results for our (dynamic) IP and confused what is causing this.
If I just Google "My IP" I get our true IP.
If I go to any of the "what is my IP" websites (like myip.com) I get different results, like 138.199.9.198
In Terminal, curl ifconig.me
and other hosts I get the false IP as well.
Changing the DNS server on the Mac results in different results.
Solution
Given your description, it sounds like your Mac is accessing the Internet via a rerouted/controlled connection, such as a Virtual Private Network (VPN).
Please contact DNSFilter and ask how their product works on Mac and if this is expected.
138.197.142.28 looks to be operated by Digital Ocean. This is a cloud computing service and is probably being used by the DNSFilter service installed on your Mac to route your traffic.