Getting access to "Planet 3" on a non-3 mobile, or a cellular modem

Apr 08, 2009 00:31


If you have a SIM from the telco "3" but your mobile isn't from them, or (as in my case) you use a cellular modem with a 3 SIM, you won't be able to access the "Planet 3" site that contains various free or account-linked extras, account tools, usage information, etc.

While not too widely published, it turns out that all you need to gain access is to use the "3services" APN instead of "3netaccess". This gives you a private IP address and different DNS servers, putting you behind NAT (so some things - many SIP clients, some other VoIP, some IM clients, etc won't work) but giving you access to 3's internal-only hosts like three.net.au ("Planet 3").

If you're using a laptop it's not too hard to set things up so you can access three.net.au while otherwise connected to the Internet via wifi. I'll provide instructions for Ubuntu; it's possible under Windows and Mac OS X, but I don't know if it's possible to automate it so you don't need to manually enter the routing table changes every time you connect. The general idea is to suppress the default route and add some static /16 routes for Three's networks.

NetworkManager under Ubuntu makes this pretty easy. If you're running NetworkManager 0.7 or newer, just create a new Mobile Broadband profile (right click on NM applet, edit connections, mobile broadband, new). Call it "3services". Edit your new service, and change the APN to "3services". In the IPv4 settings tab, set "method" to "PPP (addresses only)". Clear the DNS server list; you do not need or want any. Now click on "routes" and check "use this connection only for resources on its network". That'll inhibit the creation of a default route. Now, finally, add the following two entries to the routing table:
AddressNetmaskGatewayMetric 10.156.0.0255.255.0.010.64.64.64[leave blank] 10.156.0.0255.255.0.010.64.64.64[leave blank]
(10.64.64.64 is a sort of standard anycast-like default route, used for the vast majority of cellular connections if they don't just ignore nexthop routing info entirely).
Now, when you activate the 3Services connection, it won't be used for anything but things on Three's network.

Problem is, Three publish an IP address for three.net.au in public DNS. We'll override that by adding an entry to /etc/hosts:

10.176.32.20 three three.net.au
Now, you should be able to access three.net.au from your browser even while connected via wifi.

A much cleaner solution to the DNS resolution issue would be to run a local caching DNS with enough brains to delegate to different upstream DNS servers depending on the requested domain. So, for .three.net.au it'd ask Three's internal private DNS; for everything else it'd respect the servers set in /etc/resolv.conf. I don't know of anything like that at present, though, and running a custom BIND config to achieve it would be kinda overkill. So I put up with the hosts hack.

If the routes above are no longer up to date, you can figure out the new ones pretty easily (if you know a wee bit about IP networks). Connect without suppressing DNS negotiation so their PPP server sends you their DNS addresses. Add a route for the DNS server ("ip r a [dnsserverip]/16 via 10.64.64.64 dev ppp0") and query it for the IP of three.net.au ("dig +short @[dnsserverip] three.net.au"). Add a route to the /16 on which three.net.au is found if it's different to the DNS server's /16. You're done.

cellular, mobile broadband, tech

Previous post Next post
Up