Configure master node as gateway for the slave nodes

The master node has dual network interfaces and directly connects to the Internat. Slave nodes get Internet access through the master node.

To set the master node as gateway through ufw:

Install OS on master node

  1. Install Ubuntu 9.10 Server on master node1:
    The primary network interface is eth0, the network interface that connects to the Internet
    Install open ssh server only
    In this example I gave the master node domain name "private.levich" and the host name "master". Two slave nodes will be named "node01" and "node02" with the same domain name.
  2. Post installation:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install sysv-rc-conf

The cluster node layout

Normally, a cluster consists of a head (master) node, a few compute (slave) nodes, and a network switch. The head node has two network interfaces, one to the Internet and one to the cluster private network. The compute nodes are connected to the private network.


I built a few clusters with some variations:

Change Ubuntu default editor

The command is:

sudo update-alternatives --config editor

And choose one of the available terminal editors:

Manupilate network interface hardware address

The hardware address of eth0 and eth1 are often bound to software license. Sometimes software vendors are nice enough to issue a new license to your new machine but other times this procedure takes time. Therefore it is necessary to manipulate the MAC address in order to continue to use licenses when migrating the system.

The command to change hardware address is like:

sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether 11:22:33:AA:BB:CC
sudo ifconfig eth0 up


Kill a job running on a specific network port

Sometimes a port could be taken by unwanted program or defunct program. To kill such program, one has to find what program is using the port. Here is an example:

sudo netstat -anp | grep :7241


The command has to be run as root in order for the process ID to show up.

Then use kill command to kill the process as necessary.


What does "Windows key + m" do?

My wife accidently pressed Ubuntu key + m, and got me a wierd looking desktop, and it went back after pressing the key combo again.

Go try it out yourself!

Furthur search revealed this was a Compiz Fusion visual effect. In addition "Ubuntu key + n" inverts one window only.

BTW, I called the Ubuntu key, right? Yeah, I got the free Ubuntu key stickers from System 76.

Check Ubuntu version

To check Ubuntu version:

cat /etc/*release


cat /etc/issue


To detect machine architecture:

uname -m

Turn on / off service

In Ubuntu system the general format of start or stop a service is like:

sudo /etc/init.d/servicename on|off|status


To set a service on or off at system boot:

After install this package

sudo apt-get install sysv-rc-conf


run command like these examples:

sudo sysv-rc-conf apache on
sudo sysv-rc-conf apache off



PBNJ - a suite of tools to monitor changes on a network

While Aide checks the file integrity, PBNJ is a tool kit to detect the network integrity.

Syndicate content