Pocholo and I


If there’s one person who really makes my home sickness  lesser it’s Pocholo.

He is the closest friend I have here in Singapore so far, he is really sweet, he cooks for me and he really cooks well, he is my team mate and in just a short span of time we became really good friends.  We even actually think that there’s already a hearsay that we are together, hahaha knowing that he is married and I’m recently separated. I actually would prefer that and I really don’t mind, I would rather be linked to him than any other guys, it’s actually doing me good so those creepy guys would stop smiling and staring at me.  He hates it, I love it hahahaha

We never had a dull moment when we are together, we always talk, on person, on phone, and even in chat during work.  We talk almost about everything, from personal life, love life, sex life, work life, other people lives hahahaha.  We usually call each other during our way to office and ask where we are and how still far are we in office, and during our conversation earlier this morning I told him my torrent download now is super fine as I was having trouble with my download speed a few days back and I downloaded Fedora 12 and CentOS 5.4 with less than an hour, then he suggested RHEL 5, I want to but it’s too hard to find seeders for that, then he let me borrowed his redhat account :D and I’m downloading it now :D

He is really a funny guy who screams like a girl :D but he’s the best

Filesystem

I will be training a new member of our team as I commit to do so before I leave :)

Our work are mostly on filesystem so I need to start there.

What is a filesystem and what is a mount point? Most people are confused with these two so I will explain here based on how I understand it.

A filesystem is basically the repository for all your files and as RedHat said that a filesystem is a disk drive by itself provides a place to store data, and nothing more.

To be able to access any filesystem you need mount it to make is available to the system. In order to do these you need a device file representing the desired disk and partition and a directory under which the mounted filesytem will be made available and that directory is known as the mount point.

When a filesystem is mounted, that filesystem is made available as a set of subdirectories under the specified mount point.

for example on a system we have a directory named unix and the full path would be /unix and assume that there is a filesystem to be mounted to that directory. If that filesystem had a file in it called sample.txt and you mount the filesystem to /unix, in that case,  you can access the file with the below full file specification.

/unix/sample.txt

If in you change the mount point of the filesystem to /linux the full file specification would be

/linux/sample.txt

To see what is mounted you can view /etc/mtab and /proc/mounts on Linux and /etc/mnttab on HP-UX, you can also use df command and bdf command for HP-UX.

While /etc/fstab is used to control what systems are mounted when the system boots, as well as to supply default values for other file systems that may be mounted manually from time to time.

This is it for now, we’ll continue on LVM

Linux pronounciation

Linux was introduced to me by a friend when I was in college but didn’t really got interested but then when I entered the corporate world my former supervisor taught me Linux.

How do you really pronounce it? I usually have students come to me for help with their ASUS EEE PC which has Linux installed as it’s OS and they would pronounce Linux asLine-uksand I still meet people who pronounce it like that and for me it sounds awkward, as since college I know that it is pronounced as it is “leenooks”.

So how do you pronounce it? I did a research cause I also want to know how to pronounce it the “right” way, well it is pronounced as “leenooks” and this is according to Linus Tovarlds himself.

“but Linux is always Linux…”

IP Tables

I will try to refresh my memory on networking stuffs, and I will start on IPTABLES, this is just a brief explanation if you want to learn more please go here

What is “IP Tables” and how does it work?

It is a mechanism for packet filtering that is native to 2.4 kernel series. System administrator usually uses this to filter packet, implement NAT and packet mangling (modification of information of IP packet headers before it enters routing).

CHAINS

for IP filtering there are three default chains; INPUT, OUTPUT and FORWARD
for NAT (network address translation) there are two; PREROUTING and POSTROUTING.

These chains are being filtered according to the set rules in the filter table of the kernel. Packets may be ACCEPted or DROPped.

Packets are being DROPped when the kernel doesn’t have forwarding enabled or it doesn’t know how to forward the packet, however when forwarding is enabled packet goes to the FORWARDING chain, if it is ACCEPted, it will be sent out which pass through the OUTPUT chain.

Packet mangling is done through the NAT process. Within the NAT, the translation tables can be set up to modify the source IP address (SNAT) and the destination IP address (DNAT) fields automatically.

SNAT is when you are altering the source address of the first packet or you are changing where is the source of connection is coming from, this is done during POSTROUTING. DNAT is when you alter the destination address of the first packet or you are changing where the connection is going to, this is done during PREROUTING

for example (this example is based on shorewall which is also based on IP tables)

ACTION –> SOURCE –> DESTINATION PROTOCOL –> DESTINATION PORT –> SOURCE PORT –> ORIGINAL DESTINATION

ACCEPT loc:10.1.0.1 net all – -

the local IP 10.1.0.1 accepts all packets coming from all network using all kinds of ports to any destination.

DNAT net loc:10.1.0.1 tcp 54305 – 125.212.102.159

the local IP 10.1.0.1 forwards the request to 125.212.102.159