Thursday, March 24, 2011

network management

I'm firmly in the "NetworkManager is the devil" camp, because it messes up my network configuration without triggering a loud error in syslog or somewhere. Grr.

I'm now using wicd to manage my wireless/ethernet networks.

Note, to use wicd in a non-systray window manager (wmii), type "wicd-client -n &"

Lastly, "ifconfig" is deprecated(!).  Use "ip" instead --
"ifconfig" => "ip a"
"route" => "ip r"

Friday, March 4, 2011

EasyTether internet tethering for Android on Debian

My local cable provider likes to mess with me, so on occasion I get internet via my cellphone. In practice this works rather well. Install EasyTether on the phone and on your Debian machine. Connect via USB, then run some commands on the Debian side to route packets via your cellphone. The software is designed to be run standalone, not as part of the normal Linux system, which is a little weird. The following stanza helps with this. If you add the following to /etc/network/interfaces, you can turn on/off the tethering using the normal ifup/down commands:
iface easytether0 inet dhcp
      pre-up easytether connect &
      pre-up sleep 1
      pre-down killall easytether
That is, after the above is added, do "sudo ifup easytether0" to route packets through the USB-connected Android device. To turn it off, do "sudo ifdown easytether0". This solution is rather buggy. Disconnect and reconnect the USB cable to solve some problems. Also, by default EasyTether doesn't route ICMP packets, which means you can't use "ping -c1" to verify your internet connection is up. "curl" is a good check instead. Note that EasyTether Lite doesn't route https, which means Gmail and Facebook doesn't work. To get around the latter, use the mobile site: The full software is $10 and has been a fantastic value for me -- highly recommended.