Wednesday, September 05, 2007

Windows XP optimization

These are some of the tweaks that I do to speed up my Windoze:

- Display Properties > Themes > Windows Classic Theme

- System Properties > Advanced > Performance > Adjust for best performance

- System Properties > System Restore > Turn off

- Disable File Indexing: From My Computer > right-click on the C: Drive > select Properties. Uncheck "Allow Indexing Service to index this disk for fast file searching." Apply changes to "C: sub folders and files," and click OK.

- Clean Up Prefetch, temp, and cache files: Download CleanUp!

- If VM, turn off Screen Saver. If VMWare, install VMWare Tools.

- Defrag disks.


Tuesday, September 04, 2007

SSH reverse tunnel

# ssh -nNT -R

The "-n" option prevents reading from STDIN. Redirection from /dev/null to STDIN.
"-N" tells ssh that the tunnel is not for executing remote commands.
"-T" tells ssh not to allocate a pseudo-tty on the remote system.
"-T" disables pseudo-tty allocation.

Rough diagram: <---

To avoid timeout:

In /etc/ssh/sshd_config on the server:
TCPKeepAlive yes
ClientAliveInterval 30
ClientAliveCountMax 99999

To enable binding address in ssh -R:
GatewayPorts yes

Man page docu for -R switch:
-R [bind_address:]port:host:hostport

Specifies that the given port on the remote (server) host is to be forwarded to the given host and port on the local side. This works by allocating a socket to listen to port on the remote side, and whenever a connection is made to this port, the connection is forwarded over the secure channel, and a connection is made to host port hostport from the local machine.

Port forwardings can also be specified in the configuration file. Privileged ports can be forwarded only when logging in as root on the remote machine. IPv6 addresses can be specified by enclosing the address in square braces or using an alternative syntax: [bind_address/]host/port/hostport.

By default, the listening socket on the server will be bound to the loopback interface only. This may be overriden by specifying a bind_address. An empty bind_address, or the address "*", indicates that the remote socket should listen on all interfaces. Specifying a remote bind_address will only succeed if the serverâs GatewayPorts option is enabled (see sshd_config(5)).

Debian apt GPG keys and repos

# wget -O - | sudo apt-key add -
# wget -O - | sudo apt-key add -
(replace 2006 with current year)
deb unstable main contrib non-free
Other keys:
mdebian:~# gpg --keyserver --recv-keys A70DAF536070D3A1
mdebian:~# gpg --keyserver --recv-keys B5D0C804ADB11277
mdebian:~# gpg --armor --export A70DAF536070D3A1 | apt-key add -
mdebian:~# gpg --armor --export B5D0C804ADB11277 | apt-key add -

Monday, September 03, 2007

Motorola MOTOKRZR K3 and Smart 3G

Word of Warning: I am a Linux user and very keen in buying a Motorola Razr (specifically v3xx) because it is known to work in Linux. But for some stupid reason I bought a newer model and it is NOT based on this chipset anymore:

# lsusb

Bus 001 Device 002: ID 22b8:6402 Motorola PCS
# dmesg
[30549.844000] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[30549.844000] usbcore: registered new interface driver cdc_acm
[30549.844000] drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control
Model driver for USB modems and ISDN adapters
I have not tried yet making it work in Linux but might write a dev driver for this if time permits.

For Smart 3G Internet on the phone, I first sent the following message to 211:
You will receive a browser message. This is a bit noob but only after some fiddling I manage to figure out that I need to see the Options of that message and Install. This message essentially contains the Smart 3G-related browser settings. I previously used a Globe SIM so the default set Web Sesssion is Globe Internet (Menu > Web Access > Web Sessions). Make Smart Internet as the default web session.

To use it as a modem on Windoze, install the Motorola Phone Tools, then Click Internet. It will automagically create a new Connection (with default Smart provider settings that comes with MPT).

Important Note: It takes some time after the 3G registration for the service to be activated.

I got the following actual bandwidth stats using at about 3am in the morning (the other endpoint is a Bayantel server in the Phil):
277kbps downlink (~35 kbytes/second)
109kbps uplink (~14kbytes/second)
Not bad!

At 9pm, uplink 47kbps (~6 kbytes/second), downlink 223 kbps (~28 kbytes/second).

If you have questions, post it as a comment.