4 ms·
How so? Getting your public/external IP does not seem possible behind a NAT without an external service.
by lxgr 2y ago
How so? Getting your public/external IP does not seem possible behind a NAT without an external service.
- Havoc 2y agoNo idea. All I can tell you is that it works and if I need to hard code a IP check like this then I’d rather rely on a big player like Google or cloudflare ns than someone’s project site
- speleding 2y agoYou can use dig: dig +short -4 myip.opendns.com @resolver1.opendns.com (still an external service, but not reliant on a website)
- lxgr 2y agoThat's just another protocol in the end (DNS vs. HTTP), or am I missing something? DNS also runs a higher risk of being cached or mangled somewhere along the way by middleboxes. HTTPS avoids that problem.