Camera
My trusty Exilim EX-Z60 took its last picture today in Mexico City. It shall be sorely missed.
These are things pulled in here or pushed to here from other sources.
My trusty Exilim EX-Z60 took its last picture today in Mexico City. It shall be sorely missed.
So I’m looking for a place to live and a place to work in Mexico City. Got any ideas? Contact me on twitter.
So it seems cablemas decided to block DNS requests (port 53) going out of their network. I’m not sure if they’re doing this at the network level — which would be extremely stupid on their part — or by reconfiguring their modem. Either way this means:
Since DNS queries take long to resolve, internet connectivity is slow as hell. Enter DNS caching (DNS proxy).
Most DNS servers can do caching on the side (BIND, djbdns, dnsmasq) without too much additional work. The problem is most of the time the cache disappears when the computer is rebooted. If your system is a server, you’re fine. But what if you’re on a laptop or a desktop? It’s no good having a cache if you have to rebuild it every day.
There isalso the fact the electric system in Mexico isn’t the best, so often computers go down hard when the electricity fails. UPS units are expensive to put them on a single desktop computer.
So that’s when I discovered pdnsd. It’s a light DNS proxy that can act as a caching system, working on localhost to speed up queries.
Being on Debian Sid, all I had to do to install it was
# aptitude install pdnsd
When asked which mode to use, I chose ‘manual’. When it was done I added my ISP’s DNS servers like so to /etc/pdnsd.conf
server {
label=cablemas;
ip=200.95.144.3;
ip=10.147.0.43;
ip=10.147.0.15;
timeout=30;
uptest=ping;
ping_timeout= 300;
}
You’re free to use other DNS resolvers like OpenDNS or Google Public DNS obviously. The caching will work regardless of what upstream server does the actual resolving.
Then set it up so it runs on boot by editing /etc/default/pdnsd
This sets up the daemon to work; you still have to set up your network interfaces to make use of the cache. In my own case my system is getting an IP address from the cablemodem itself dynamically, so I had to edit /etc/dhcp3/dhclient.conf
and enable the prepend domain-name-servers directive:
prepend domain-name-servers 127.0.0.1
If you’re setting manually via /etc/network/interfaces
, you’ll have to manually edit /etc/resolv.conf
so your local DNS is queried first.
Once everything is done, bring down the interface (eth0 in my case):
# ifdown eth0
Then bring it back up:
# ifup eth0
I’m pretty sure it’d be same for wlan interfaces. This should be more useful on laptops or systems that connect to networks of unknown quality.
This all goes to show Cablemas is one of the worst ISPs around and you should avoid it like the plague.
Sources:
[youtube http://www.youtube.com/watch?v=aPI3jxAhG9E?wmode=transparent&autohide=1&egm=0&hd=1&iv_load_policy=3&modestbranding=1&rel=0&showinfo=0&showsearch=0&w=500&h=375]
It’s what I want, that’s easy.
It’s getting it that’s complicated.