/var/www/gravin.net/| ~$ sudo cat life > /dev/null — Best Viewed in Mozilla Firefox

Archives for Ubuntu category

The most awesome security conference ever, their are coming back with more stuffs than last year. You don’t want to miss them!!

Check out the official link here for further informations HERE

If you are experiencing the problem where windows boots up and grub boot loader is missing and you can’t boot to ubuntu , that’s probably because when you run windows installation ( just run it , even you didn’t install it also same result) it tends to clear your grub from the master boot record (mbr). Its totally something you didn’t expect and it hits you badly.

The solution? All you need is Ubuntu live cd.Boot up to ubuntu using the live cd and then you use your terminal to type the following commands :

-$ sudo -s

To make you root.

-$ grub

Here you will enter the grub program.

-$ root (hda, 1)

Then you set the root where your root filesystem for ubuntu is located (which is the location of the grub config file). For example mine is in the hda1 partition. If you are unsure just run fdisk -l in the terminal and you should see /dev/hda3 linux swap , /dev/hda4 and etc. Carefully select and then run

-$setup (hda)

-$quit

And that’s it grub will overwrite the settings and you can now reboot and you should see grub menu. If your grub menu doesn’t contain windows in the selection then you have to insert it in the grub menu file.

-$sudo vim /boot/grub/menu.lst

title WindowsXP PRO

root (hd4,4)

makeactive

chainloader +1

Save and then reboot you should see your windows in the grub menu.

You can setup your own webserver in your home and use it to host your own blog from home and fully utilizing your internet access. What do you need for the start of something certain people think its impossible to do?

1. Any working condition PC. (Yes, can be an old one or a latest one, doesn’t matter because we only need HDD space, Good processor and a sufficient amount of RAM)

2. Modem+Router

3. Ethernet Card for that PC

Then you have all the ingredients that is required to cook, why not? Get the Ubuntu 7.10 iso image from this http://www.ubuntu.com/getubuntu/download , download it and burn the image to a cd. If your processor if 64bit , you must get the one for 64bit processors. After you have finished burning the image, just insert the cd into your PC and reboot it. You will be prompted to a menu whereby you need to select Install to the hard disk.

Then the rest will be a guided installation until you reach this stage :

For more guided images of the installation, visit this link http://howtoforge.com/perfect_server_ubuntu7.10 . Just following until the installation only, the rest of the server setup I will guide you through it. Now login to your new ubuntu server. If the router is connected to the server you will be able to ping google.com and get a reply from the packets sent.

Run this command :

sudo apt-get install apache2 mysql-server-5.0 vim mysql-client-5.0 php5-mysql mysql-common php5 php5-common libapache2-mod-auth-mysql libapache2-mod-php5 openssh

This will probably take a while to download and install all of those services needed. Just put a “y” in every request that you get during this installation. Oka, meanwhile waiting for the installation, if your isp doesnt provide you with a static ip address, you probably need to get one ip address from http://dyndns.com . The you will have to create a host , for example mine is gravin.homelinux.net . So if you visit http://gravin.homelinux.net , that will be the exact webserver that we are trying to install here. The blog website is running on wordpress . Later on will guide you on installing wordpress after the setup of your webserver.

Then after that you need to setup inadyn (for dynamic ip adresses only) :

sudo vim /etc/inadyn.conf

Press “a” to insert these text :

username yourdyndnsusername
password yourdyndnspasswdhere
update_period 60000
alias gravin.homelinux.net(here will be your selected dyndns host name)
background

Then type “:wq” to save the file.

You have to set root passwd now ,

sudo passwd root

Enter your passwd and verify again. Then do a “su root” . Once you are root, type “crontab -e” , you will editing the crontab file, type in this text “@reboot /usr/sbin/inadyn” and hit “ctrl + o and ctrl + x. Thats it and you should see @reboot /usr/sbin/inadyn when you type “crontab -l” .

Now, whenever your server starts/reboots, it will automatically direct your dynamic ip address to the dyndns hostname. Direct your web browser to your dyndns hostname, you should see It Works!. Which means your webserver is up and running. Now you just need to install wordpress (which i will guide you on the next post) on it and start blogging!

Are you browsing and checking emails or other websites which has no SSL connections unlike banking websites which secures you and make sure every transactions are secured via SSL. (https://somebank.com). Any data that is not encrypted is exposed can be easily sniffed through the LAN network.Doesn’t this bothers you if you are connecting from some WIFI spots from somewhere?

Well this is when Squid comes in. You just need to install squid on a remote server and get it up and running.The server can be your home pc which runs linux or you have remote server will be great.I have installed it on my debian 4.0 , for other distros please refer to the packages and look for squid.

In your Debian type this :

sudo apt-get install squid

And.. Thats about it you are done.Now by default, if you didn’t touch the configurations files that comes along with squid you just need to change the way your browser connect to the internet.For example:

In Firefox:

Edit > Preference > Advanced > Network > Settings

Choose the option saying Manual Configuration and and the http proxy part into “localhost” and port “3128″.And choose “use this proxy server for all protocols”.Next you have create a tunnel to your remote squid server:

ssh -L squidport:ipordomainname:squidport username@ipordomainname

ssh -L 3128:linuxbay.org:3128 gravin@linuxbay.org

Remember that you must be always connected to the remote squid server via ssh tunneling.If you are not, you can’t keep browsing using squid.Now, go to www.whatismyip.com and you will see that your ip is different.This is because you are using a ssh tunneling via squid server into the internet rather than direct connection to the internet. How awesome is that. :)

With free and open source GnuPG you can sign and encrypt your emails easily with thunderbird or firefox extensions or even gmail!

For the start you need to setup GnuPG in your distro. For ubuntu users, just - sudo apt-get install gnupg and you will get it done instantly. For other linux distros and windows users can find the installer can be downloaded here. Once you’ve setup GnuPG in your machine, now you have to create a key.

~$ gpg –gen-key

This command will generate the following:

Please select what kind of key you want:
(1) DSA and Elgamal (default)
(2) DSA (sign only)
(5) RSA (sign Your selection?
Your selection? 1
DSA keypair will have 1024 bits.
ELG-E keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 1024
Requested keysize is 1024 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 3y
Key expires at Thu 28 Oct 2010 02:47:32 PM MYT
Is this correct? (y/N) y

You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
“Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>”

Real name: Gravin Kumar
Email address: tycoon@gravin.net
Comment: comment
You selected this USER-ID:
“Gravin Kumar (comment) <tycoon@gravin.net>”

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
You need a Passphrase to protect your secret key.

gpg: gpg-agent is not available in this session
Enter passphrase: passwd
Repeat passphrase: passwd

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 4 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 4u
gpg: next trustdb check due at 2010-10-28
pub 1024D/3D355D77 2007-10-29 [expires: 2010-10-28]
Key fingerprint = BA46 97E1 82CC B9B1 B80E FF9A FE3E 3D35 5D77
uid Gravin Kumar (comment) <tycoon@gravin.net>
sub 2007-10-29 [expires: 2010-10-28]
——-
You have a key now. :)

Next you want to be using the key generated. Download Enigmail ( Thunderbird extension ).You can also create your key using enigmail. Once you have installed the extension, you need to restart thunderbird to get it properly installed and ready to be used.Then open OpenPGP–>Key Management, you will see something like this:

If you notice, ‘Gravin Kumar (comment)’ is the key we generated few moments ago. Now you can just sign and encrypt with your own defined key. Now the interesting part for gmail users (like me) where i have multiple emails in a gmail account and i need to get all signed. Download FIREgpg ( Firefox Extension ) && Gmail Integration! Once you have installed FIREgpg then your gmail will look something like :

This is damn cool. You get to sign, crypt and send!