Ting Wai's Blog

Access Router Web Management Interface Remotely Through SSH

| Comments

As an administrator for multiple Linux servers in various location, I find it hard to manage port forwarding in routers, of course you can configure a remote GUI login such as RDP and VNC but all these servers only enable services they need with SSH as their main method of remote administration to these servers. Then, I found out about SSH tunneling, which is a lifesaver. There are two main method to tunnel traffic through SSH:

  1. Forward a single port through SSH
  2. Tunneling through SOCKS

Blueproximity for KDE4 Configuration

| Comments

BlueProximity is a great addition to Linux, it adds a little of extra security for you Linux machine. For those who don’t know what it is, here’s an excerpt from BlueProximity:

This software helps you add a little more security to your desktop. It does so
by detecting one of your bluetooth devices, most likely your mobile phone, and
keeping track of its distance. If you move away from your computer and the
distance is above a certain level (no measurement in meters is possible) for a
given time, it automatically locks your desktop (or starts any other shell
command you want).

Once away your computer awaits its master back - if you are nearer than a given
level for a set time your computer unlocks magically without any interaction
(or starts any other shell command you want).

PHP Class Design for MySQL?

| Comments

Since I first started out my journey on PHP, I have been trying to find a good design to make coding less messy when using MySQL. Anyone use PHP knows that mixing PHP and MySQL together makes the code less readable and less modifiable, worse, it makes debugging much harder. These situations would only get worse if you don’t refactor your code. So, here is my solution for PHP (sure, it is applicable in any language), using an abstract class as the base class for all records:

Postfix Mail Relays

| Comments

Recently I have to setup a mail server to notify me of system failure from Nagios. So, instead of setting the mail server from scratch, I decided to use my company’s email as a relay for notification.