On Dec 13, 2010, at 8:32 PM, Nat! wrote: > >>> It turns out that it is not hard to get the Airport Extreme Base Station >>> external address: >>> >>> [mbp:]$ snmpwalk -Ov -OQ -c public router ipAdEntAddr >>> 76.177.12.46 >>> 127.0.0.1 >>> 127.0.0.2 >>> 169.254.162.44 >>> 192.168.1.1 >> >> Except that this isn't the proper answer to your question at all. Nor are >> you going to be able to reliably use this either. >> > > I think it's fairly clever to use snmpwalk, with the result piped through > > egrep -v > '^127\.0\.0.|^169\.254\.|^172\.3[0-1]\.|^172\.2[0-9]\.|^172\.1[6-9]\.|^192\.168\.|^224\.|^2[45][0-9]\.|^10\.' >
All you're doing is filtering out what may not be the WAN IP and it doesn't account for duplicates returned if the router has any additional VLANs that operate or VPNs. That could lead to additional false positives. > it should be OK in normal configurations and to me it's a better solution, > than using whatismyip.com because: > > a) more robust, you are not at the mercy of another entity, which is not > legally required to provide this service 24/7 at no cost for eternity > b) more paranoid, whatismyip.com won't "log" him I just picked whatsmyip from a quick google, there's no dearth of these services. > c) more lightweight, technologically better, faster, just local network > traffic, less network traffic Um, it's the same actually. And a HTTP request is lighter weight than a SNMP traverse. As far ass network traffic, it's less bytes. And as I've said, the real solution to knowing what your IP address and have a way to get back to your LAN would be to use DNS. Since dyndns (and other similar services) do this for free, are lightweight and provide FOSS clients to set the DNS entry, it would seem to solve all the problems cleanly. But obvious it's too simple. ;) But since the OP has resorted to personal attacks, I could care less. -d ------------------------------------------------------------------------ Dan Shoop [email protected] GoogleVoice: 1-646-402-5293 aim: iWiring twitter: @colonelmode _______________________________________________ MacOSX-admin mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/macosx-admin
