I have a 3g mobile stick and in certain circumstances I would need to route internet traffic of a PC/server or a particular subnet through this interface. In a windows OS we could simply achieve this by enabling internet sharing on the interface itself. But in the case of ubuntu we can easily enhance ICS (internet connection sharing) feature to a higher level as internet gateway. This way your linux machine can be turned into a gateway which is way cool, isn’t it?
Category Archives: Ubuntu
Set Date/Time in Linux
Here are the steps to set date and time in linux
Linux Partitioning and Formating
Partitioning with fdisk
fdisk usage
fdisk is started by typing (as root) fdisk device at the command prompt. device might be something like /dev/hda or /dev/sda. The basic fdisk commands you need are:
Managing services in Ubuntu
There are 2 ways of using services in ubuntu:
- Traditional way: /etc/init.d/myservice start/stop/restart
- Upstart: service myservice start/stop/restart
Continue reading
find/Replace in linux
regexxer is a nifty GUI search/replace tool featuring Perl-style regular expressions. If you need project-wide substitution and you’re tired of hacking sed command lines together, then you should definitely give it a try.
Continue reading
Cisco IP Phones 79XX with Asterisk
Recently we had a pack of cisco 7942G phones that we were required to get them up running with Asterisk. The good thing about 79XX series is that they all support SIP besides SCCP. Whereas, the bad thing is that they are by default running on SCCP and you have to upgrade them to SIP first. I spent a great deal of time trying to figure this out, as I were going to use SIP Version 8 and there is no to-the-point documentation (at least not that I could find!)
Linux File Discriptors
The Standard UNIX File Descriptors – Standard Input (stdin), Standard Output (stdout), and Standard Error (stderr). Bash and other modern shell provides I/O redirection facility. There are 3 default standard files (standard streams) open:
[a] stdin – Use to get input (keyboard) i.e. data going into a program.
[b] stdout – Use to write information (screen)
[c] stderr – Use to write error message (screen)
You can look at /usr/include/unistd.h if you forget them:
/* Standard file descriptors. */ #define STDIN_FILENO 0 /* Standard input. */ #define STDOUT_FILENO 1 /* Standard output. */ #define STDERR_FILENO 2 /* Standard error output. */
Linux bash scripting – Basic
In this post we have some basic scripting samples collected from here and there. It must be straightforward and to the point, way better than going through pages of manuals looking for a clue. Check the resources at the end
Continue reading
How to SSH to a host without login
Here are 2 easy steps to ssh into a host without login:
Simple firewall functions in linux using iptables
Here is a simple, to the point manual on linux iptables:

Port numbers which are recognized by Internet and other network protocols, enabling the computer to interact with others.
Each Linux server has a port number (see /etc/services file). For example:
Continue reading
