Follow

You can get your external address without using HTTP(S)!

dig @resolver1.opendns.com ANY myip.opendns.com +short

Other providers, IPv4/IPv6, etc at the source: unix.stackexchange.com/questio

CC @Azure - long-ago you mentioned using "icanhazip.com" with netcat - digging with DNS isn't as easy (for me) to remember, but it is a nice, fast approach :)

Show thread

@digitalfox Whoa, that's cool! Also means we can get it programmatically and/or without going to some website. =^.^=

@IceWolf There's other options like IP=$(curl https://api.ipify.org/), which I had been using before, but I'm about to use this in a system service (setting up coTURN behind NAT) and wanted to check if there's a simpler and/or more robust option :)

@faoluin Makes sense!

In my case, I'm hosting a home server on a friend's network, which is using Google Wifi… My use case is making a more robust version of github.com/instrumentisto/cotu - I wanted to add some IPv4 address validation and such to guard against malicious responses 🙃​

@digitalfox Ahh, I see! Yeah, router status pages aren't (usually) parsable or anything, so not as robust.

@faoluin The Google/Nest Wifi router setup is special in that *there is no router HTTP admin page* - you have to use the app (or reverse-engineer the protocol the app uses). For me, it's a mild nicety since I'm able to remotely set up port forwards instead of asking a friend to log in (or using a proxy/VPN to their house), but I'd probably never personally want to use Google Wifi - OpenWRT here, pfSense or such I'll try later :)

@digitalfox Bleh, Google. :/

I was on OpenWRT until I bought a new router and put pfSense on it. Still use the old one for a WAP actually. OpenWRT is nice but pfSense is /way/ more powerful. I highly recommend it. :blobfoxhappy:

@faoluin Your recommendation pretty much matches up what I've heard from elsewhere, too, thanks!

(I decided to try OpenWRT with the ZyXEL NBG6817 for parents' home network, as I figured an all-in-one solution would be easier to manage and keep working once I'm out of the house. Time will tell if I goofed :blobfoxthinking:​ )

@faoluin @digitalfox If you like PF you can also just install OpenBSD on the router as long as it's mips64 or aarch64. OpenBSD doesn't support mips32 because nobody wanted to implement the commodore64-like bank swapping needed to address more than 512m of ram. With OpenBSD you get the full PacketFilter and on any arch you may want. No extra cruft.
Sign in to participate in the conversation
The Vulpine Club

The Vulpine Club is a friendly and welcoming community of foxes and their associates, friends, and fans! =^^=