niels / Software /

Google Gears 64-bit

Links to outdated and potentially dangerous binaries have been removed.

While eagerly installing Offline Gmail on my computers I ran into the fact the Google Gears is actually not available for 64-bit Linux. I managed to find a number of builds out there, but none that would actually work for me with Offline Gmail or the new WordPress.

Building it myself wasn’t as straight forward as I hoped, so let me safe you the hassle and allow me to share the result with you:

gears-linux-opt-05110.xpi

This build was tested with Firefox 3.0.5 on (k)Ubuntu 8.10 Intrepid. Enjoy!

EDIT: Firefox reports the download to be 4G, but it will complete successfully after 2.7M.

Updated binary:

gears-linux-opt-05180.xpi

This build was tested with Firefox 3.0.9 on (k)Ubuntu 9.04 Jaunty. (It will install but NOT work on Firefox 3.5.)

Updated binary:

gears-linux-opt-05210.xpi

Did not change anything for Firefox 3.5 this time, since it doesn’t work anyway.





niels / Software /

Comparing web hosting packages

Comparing web hosting packages is harder than it seems. When searching for the best deal there is a huge list of companies claiming to offer all the features you could ever want and more bandwidth than you need.

Unfortunately, most of these offers are useless. The small print usually contains one or more vague clauses allowing the web hosting company to shutdown your website as it pleases. Typical reasons are that your website is ‘interfering with the performance of other customer websites’ or that you have been found to use ‘a’ script that is on their list of ‘insecure programs’.

Some things can’t even be found in the small print. I personally use Servage. They offer 510GB of traffic per month. Last night however I’ve seen a rumor confirmed that they don’t give you 510GB per month per se. Instead they give you 510GB/30 = 17GB per day. Now I know a few high-traffic websites and none of them have a traffic pattern that is the same every day of the week. This means it’s practically impossible to benefit from the full 510GB. You won’t even get close.

My problem is not that these limitations exist. Considering the low prices I actually expect some to be there. What is my problem however, is that I have to spend hours reading terms & conditions, disclaimers and rumors on forums to figure out which company has the limitations that least impact my needs.


niels / Hardware /

Windows Mobile 5.0 on HX4700

After many delays HP finally released a Windows Mobile 5.0 upgrade for the HX4700. Normally I wouldn’t care about the Windows upgrades, but unfortunately Linux does not support the built-in WiFi of the HX4700 yet.

Running the upgrade from VMWare caused too many problems with the USB passthrough. It got to 50% once out of 20 tries. I ended up using a Windows machine. The upgrade isn’t too exciting, but the improvements are useful enough to spend the $40.

Keeping an eye on the Linux WiFi progress though. OPIE and GPE ran great on my previous IPAQ so I’ll surely switch when WiFi is available. More info at www.handhelds.org.

EDIT:
If you use synce (or synce-kde) you will have to add the new USB id’s to ipaq.c in your kernel source tree:

{ USB_DEVICE(0x03F0, 0x0301) }, /* HP USB Sync */

EDIT 2:
I hear a lot of complaints about the speed of the HX4700 after the update. Hint: turn off automatic error reporting.


niels / Hardware / #voip

Addpac 200 with Asterisk

After telling you how to turn a Pilmo Voicefinder into an Addpac 200 I noticed some people are looking for an actual configuration example. Some fragments might not be needed in your setup.

The Addpac 200 configuration:

version 8.12
!hostname AP200
!no ip-share enable
ip-share interface net-side ether0.0 ip-share interface local-side ether1.0
!interface ether0.0ip address 192.168.1.3 255.255.255.0
description eth0
!interface ether1.0
no ip address
ip dhcp-group 0
!snmp community 192.168.1.8 public rosnmp 
name AP200A
!no arp reset
!route 0.0.0.0 0.0.0.0 192.168.1.1
!dnshost  domain peen.net
dnshost  nameserver 192.168.1.2
!service snmpd
!user add niels somepassword admin
!! VoIP configuration.
!! Voice service voip configuration.
!voice service voipfax protocol t38 redundancy 0
fax rate 9600
h323 call start fast
announcement language english
busyout monitor gatekeeper
busyout monitor voip-interface
!! Voice port configuration.
!voice-port 0/0
! FXSinput gain -3
output gain -3
caller-id enable
caller-id type etsi-dtmf-prior-ring
!! Pots peer configuration.
!dial-peer voice 0 pots
destination-pattern 1000
port 0/0
user-password asteriskpassword
!! Voip peer configuration.
!dial-peer voice 1000 voip
destination-pattern T
session target sip-server
session protocol sip
answer-address 1000
codec g711ulaw
dtmf-relay rtp-2833
no vad
!! Gateway configuration.
!gatewayh323-id voip.192.168.1.3
public-ip 192.168.1.3
!! SIP UA configuration.
!sip-uasip-server 192.168.1.35
timeout treg
try 10
!! MGCP configuration.
!mgcpepid-type
codec  g711ula
!! Tones
!voip-interface ether0.0

The Asterisk part (sip.conf):

[1000]
type=friend
secret=asteriskpassword
host=dynamic
dtmfmode=rfc2833
username=1000
canreinvite=no
disallow=all
allow=ulaw
qualify=yes
context=default
callerid=Addpac handset <1000>

niels / Code / #php

Geo DNS

There are many databases and pieces of code out there that allow you to detect which country (or even city) a visitor to your website is from. Most of this code is intended to allow you to adjust the content of your website. Very useful. Really!

There are instances however where adjusting content is not enough. Sometimes you will want to redirect users to a server that is local to them. This could be because you have lag-sensitive traffic like VoIP of game servers. It could also be that you generate a lot of traffic and local traffic is simply cheaper than transit. Or maybe you have multiple entry points for VPN and email traffic into your corporate network. Whatever it is, the only way to do this transparently is to make sure your DNS hands out the right IP address to your users. Doing this based on ip-country databases is not ideal but it should get you a long way.

I looked around a bit for a way to do this. There are a few special DNS servers for this purpose. There are also some patches for Bind. I’m not a fan of either special or
patches though, they often imply maintenance.

So I wrote a little command-line script called geobind.php to convert the database provided by Webnet77 to Bind acl’s. (Requires PHP4 cli version to be installed; make sure
to edit variables at the beginning of the script.)

Once you have these acl’s you can use Binds view functionality to serve different versions of your zone file to different parts of the world. Each zone file would of course point to IP addresses that are local to that specific part of the world.

Imagine you have 3 zone files: one for europe, one for the america’s and one for the rest of the world. You simple edit named.conf.local to include the acls for europe and the america’s. E.g.:

include “/etc/bind/named.conf.options”;
include “/etc/bind/acl-europe_east.inc”;
include “/etc/bind/acl-europe_sout.inc”;
include “/etc/bind/acl-europe_west.inc”;
include “/etc/bind/acl-europe_nort.inc”;
include “/etc/bind/acl-america_cari.inc”;
include “/etc/bind/acl-america_cent.inc”;
include “/etc/bind/acl-america_nort.inc”;
include “/etc/bind/acl-america_sout.inc”;

Next you create seperate views. One for europe, one for the america’s and one for everyone else.

view “europe” {
    match-clients {
        europe_east;
        europe_nort;
        europe_sout;
        europe_west
    };
    zone “peen.net” {
        type master;
        file “/etc/bind/europe/db.peen.net”;
    };
};

view “americas” {
    match-clients {
        america_cari;
        america_nort;
        america_sout;
        america_cent
    };
    zone “peen.net” {
        type master;
        file “/etc/bind/americas/db.peen.net”;
    };
};

view “others” {
    match-clients { any; };
    zone “peen.net” {
        type master;
        file “/etc/bind/others/db.peen.net”;
    };
};

Reload Bind and see what happens! 🙂

peen:~# rndc reload

niels / Software / #voip

Asterisk 1.2.4 with Sarge

Of course this had to happen: I finish my 1.2.4 packages and the Asterisk team releases 1.2.5. Oh well, the Debian VoIP team will probably follow soon enough and so will I.

When upgrading, make sure you choose the correct version of asterisk: asterisk-classic or asterisk-bristuff. Also, H323 support is removed and chan_capi is included by default now. The zaptel drivers (incl. hfc) have been pre-built for some common kernel versions. If you don’t like waiting, skip asterisk-doc, it’s a 13MB monster.

deb http://debian.peen.net asterisk/