Using an Alcatel X200 under Linux

Posted in Internet, Linux / unix, Software-related on October 12th, 2009 by Jan

I recently purchased an Alcatel Onetouch X200 3G USB modem, to be able to use internet on various locations where there is no wired or wifi available. Works fine under Windows/Mac OS X, bit more of a hassle under Linux.

Here are some hints on how to get it to work:

  • You need to install usb-modeswitch to switch the card from it’s builtin usb-storage mode to the USBModem mode. Configuration is done in /etc/usb_modeswitch.conf
  • Use /dev/ttyUSB2. The other two ports that your modem will give don’t really work well.
  • Also, use atleast kernel 2.6.31. Earlier ones might not work.
  • Disable PIN authentication on your SIMcard! This one thing was what kept it from working decently – I tried tons of things, and when I disabled the PIN, it worked nearly instantaneously.
    The command to do PIN auth is AT+CPIN=1111 (changing 1111 by your actual PIN), but when issuing this command the modem accepts it, but very often freaks out afterwards. Weird.
    You can find a nice list of GSM modem AT codes on gsm-modem.de.

Thats about it!

Backup & restore of your Tomato-based router statistics

Posted in Hardware-related, Internet on September 4th, 2009 by Jan

Since I recently moved, and now have my Tomato based WRT54GL on 24/7, I also wanted a way to keep a backup of those nice statistics the router generates. You have the option (built-in) to write them to nvram or to a CIFS share, but the former has a limited amount of writes, and the latter is not really stable (and I don’t have anything powered on all the time to keep the backups on).

I found some nice scripts on gulbsoft.de that showed how to make backups on an ftp/website combination, but I wanted to move this to an internet-host (since that thing IS up 24/7 in contrast to my inhouse infrastructure) and I didn’t really like them, I ‘redesigned’ them.

Lo and behold!

The only thing you need to do is put this in your WAN-up script:

killall rstats

URL="http://your.web.page.address"
FTP="ftp.server.name"
USER="username"
PW="password"
STATSDIR="/tmp/var/lib/misc"
FTPSCRIPT="/tmp/ftpbackup.sh"
FILES="rstats-history.gz rstats-speed.gz rstats-stime rstats-source"

cat > $FTPSCRIPT << EOF
for FILE in $FILES; do
  ftpput -u $USER -p $PW $FTP \$FILE $STATSDIR/\$FILE
done
EOF
chmod a+x $FTPSCRIPT

cru d bkstat
cru a bkstat "2,15,30,45 * * * * $FTPSCRIPT"
cd $STATSDIR
rm $FILES
for FILE in $FILES; do
  wget $URL/$FILE
done
sleep 10
rstats

Don’t forget to change the lines reading URL, FTP, USER and PW to your respective website address, ftp server name, ftp login name and ftp password!

Spam is evil…

Posted in Internet, Miscellaneous on June 21st, 2009 by Jan

… see? Even Wordpress thinks so.

Spam is evil!

Stop Software Patents

Posted in Internet, Miscellaneous, Politics on January 26th, 2009 by Jan

Stop Software Patents

Yes, I signed this petition!

An introduction to peering and transit

Posted in Internet, Miscellaneous on September 7th, 2008 by Jan

An interesting read on Ars Technica: How the ‘Net works: an introduction to peering and transit.

Iodine (dns tunnel) on your Mac (to escape those evil firewalls)

Posted in Internet, Linux / unix, Mac OS, Software-related on July 7th, 2008 by Jan

Here’s a short how-to to get the iodine dns tunnel working on your Mac.

In this short howto, I’ll assume you’ll be using a linux server to act as your gateway to the world. I’ll also assume you’ve read the iodine documentation and setup your DNS accordingly. For my example, I’ll be using a (nonexistant) DynDNS.org static DNS entry, iodine.rulestheworld.tld. I’ll also assume that you’ll be using a public internet address of 1.2.3.4, and a private subnet of 10.0.0.1.

  1. Install the tun/tap driver for Mac OS X. Easy as doing *click* *click* done! :p
  2. Next, install iodine on your Mac. Easy as download, extract, and typing make; make install
  3. Now, install iodine on your linux box. It’s included in the package repositories of the usual suspects, for instance debian: apt-get install iodine.

    Start it (or configure it to use) with:
    iodined -P <password> <unused private IP> <dns name>
    or in our example:
    iodined -P mypass 10.0.0.1 iodine.rulestheworld.tld

    This should return the following:

    Opened dns0
    Setting IP of dns0 to 10.0.0.1
    Setting MTU of dns0 to 1024
    Opened UDP socket
    Listening to dns for domain iodine.rulestheworld.tld

  4. Configure your linux box for IP forwarding: sysctl -e net.ipv4.ip_forward=1
    (and add this to your /etc/sysctl.conf file), and configuring your firewall (iptables) for masquerading:
    iptables -t nat -A POSTROUTING -s 10.0.0.0/255.255.255.0 -o eth0 -j MASQUERADE
  5. Next, download NStun.sh, a very handy script that does all the hard work of changing the routes and so on :p

    You’ll want to change the script: change the first lines as the script reads, and lower, change the

    NS=`grep nameserver /etc/resolv.conf|head -1|awk ‘{print $2}’`

    line to read

    NS=”62.213.207.197″

Now, start NStun.sh on your Mac, and surf away! (well, slowly, but freely, atleast!)

My ISP – Part deux

Posted in Internet on January 13th, 2008 by Jan

An update after my previous ISP post:

  • July 2007
    • Increase of data transfer for netconnect to 75gb
  • October 2007
    • Increase in prices :( BOOO! Well, only with a few euro’s, but still… :(
  • November 2007
    • Change in newsservice, now allowing more connections and dedicated text-news server ;)
  • December 2007
    • Increase of data transfer for netconnect to 100gb, netconnect + boostpack to 120gb
  • January 2008
    • Increased upload traffic in all accounts to 448kbit
    • Increased data transfer with the boostpack to 150gb
    • Increased download speed (2048kbit) on mediumband with boostpack
    • Started delivery of Cityconnect – a new ADSL2+ product line (available in Leuven only sofar…)

Needless to say, I’m still a very happy customer ;) But I am going to cancel my boostpack, since it no longer has use (I need the upstream speed, not the data transfer..)

Telenet pushed the button… and nothing happened

Posted in Internet on December 14th, 2007 by Jan

Telenet has launched a big campaign, known as Telenet drukt op de knop (Telenet pushes the button) touting that their product line would be dramatically altered. Rumours flew around like a scrapping of the limits they impose, doubling of speeds, …

In the end, it’s basically just a big non-event: they multiplied the speed of their lowest subscription by 4, going from 256kbit to 1mbit… but keeping the ultra-low limit of 400 megabytes. Yes, that’s correct, megabytes.
They also increased the upload speed of the other subscriptions.

So now these people will be able to get a lot faster on smallband (56kbit connection), or buy blocks to increase their limits… and increase Telenet’s revenues – ofcourse!

Gmail goes IMAP

Posted in Internet on October 24th, 2007 by Jan

Finally!

Gmail now offers secure IMAP access.

To use this:

  1. Activate IMAP on your Gmail account
  2. Configure your favourite mail client for IMAP access

Done ;)

Proxy settings for Brussels Airlines lounge in Brussels airport

Posted in Internet on October 14th, 2007 by Jan

Just in case you ever find yourself in the Brussels Airlines VIP lounge (in Brussels Airport), and you want to do something besides using IE on their internet pc’s, here are the proxy settings (that you can use in eg. putty). I had to find a way to open a command box to get to the settings, but in the end I managed.

HTTP Proxy: 193.108.215.75
Proxy Port: 8080

;)