Sunday, October 24, 2010

Static NATing on ASA

Much clearer version of the video is present on Youtube click on this link or copy paste the link on to a browser and test it  

                                http://www.youtube.com/watch?v=Y8z0Xtu_NOE
 

Creating Tar Balls in command line :-)

Working with archives

To archive files, use the command  
tar -cf archive.tar file1 file2 file3
This command combines file1, file2, and file3 and stores them in archive.tar. The -c switch tells tar that you want to create an archive. The -f switch indicates that we are working on files.

We can use the following command to extract the Tar Ball we created.
tar -xf archive.tar

Install VirtualBox Addons inside CentOS Guest

I have to admit that this link helped me out with this.

First you need to install GCC and the kernel sources.


su
Now type your Super User password or Root password.
yum install -y gcc
yum install -y kernel sources kernel-devel

Then we must create a symbolic link to the kernel source:
ln -s /usr/src/kernels/2.6.18-194.17.1.el5-i686/ /usr/src/linux

After this reboot the machine with the reboot command as shown below:

reboot

Once the machine has come back online we can use any one of the command shown below as per our architecture:

sh VBoxLinuxAdditions-x86.run
or
sh VBoxLinuxAddtions-amd64.run


After this reboot the machine with the reboot command as shown below:
reboot


After the reboot you should be able to move the mouse between the VM and you Host OS without hitting right CTRL key.  There is one trouble though the auto desktop resizing with this is not working.

Wednesday, September 29, 2010

Gnome Mplayer

Gnome MPlayer simply rocks, the amount of control it gives us is simply amazing :-D
Press C for Compact mode, and use the arrow keys to move forward and reverse cool :-D  I am loving it :-D

http://www.mplayerhq.hu/design7/news.html

Sunday, September 26, 2010

Four Stages of DHCP capture by Wireshark

Today I thought let me investigate a little bit about the four process which goes into the DHCP request.

First is the DHCP Discovery, where the blind client sends out Broadcast.


Next packet we can see there is an ICMP echo request for an IP from the vmware to see if any client is using it.

It also tries to see if there is an ARP entry for it in the next two packets.  No reply comes back.

Now the DHCP server offers the client the IP from which no ICMP reply or ARP reply came.

Now we see that the client requests the server that it will use the IP address provided to it from the DHCP server.




The last step is where the DHCP server acknowledges the request.


After this if you see there is a Gracious ARP :-D

If there are any mistake do let me know.

How to stop DHCP on a specific vmnet subnet ?

Here we will see how we can stop the DHCP service on VMNET3 subnet of VMWARE.  It took me around 5 hrs to search this, while the answer was right beneath my nose :-D

bala@bala-laptop:~$ sudo /usr/lib/vmware/net-services.sh     stop    3
[sudo] password for bala:
   DHCP server on /dev/vmnet3                                          done
   NAT service on /dev/vmnet3                                           done
   Host-only networking on /dev/vmnet3                            done
bala@bala-laptop:~$ sudo /usr/lib/vmware/net-services.sh     start    3
   Host-only networking on /dev/vmnet3 (background)      done
   DHCP server on /dev/vmnet3                                          done
   NAT service on /dev/vmnet3                                            done

All we need to do is to follow the first command with the word DHCP.

bala@bala-laptop:~$ sudo /usr/lib/vmware/net-services.sh    stop    3   dhcp
   DHCP server on /dev/vmnet3                                          done
bala@bala-laptop:~$


.

Monday, September 13, 2010

Monday, August 9, 2010

What a WEEK END

Man really what a week end.



I had to get one monster out of my Laptop and get another downgraded monster in.


I installed Lucid Lynx every thing was fine, Then on top of that I installed Goddard which wiped out the boot of Lucid lynx, Then atlast I reinstalled Ubuntu on the same partition which detected both the Goddard :-D

.

Saturday, August 7, 2010

How Trojans Work

In this short video I have explained how Trojans attack your system.  This is just for educational and awareness purpose.

Click on this link to see the video on Youtube.


.

Sunday, August 1, 2010

Logmein and Ubuntu

For all those who are interested to see their XP system on a Ubuntu machine this link would provide it

https://secure.logmein.com/activex/logmein-client_1.0.387-1_i386.deb

Wednesday, July 28, 2010

Restart GDM on Ubuntu

Of late after the Kernel update on my Ubuntu, the GDM would not load up correctly.

I cannot click on Terminal, or shut down the system graphically.

I found a work around on this link It as simple as restarting the GDM








sudo /etc/init.d/gdm stop
sudo /etc/init.d/gdm start

If you wonder where to typed in this, Press CTRL+ALT+F1

Sunday, July 18, 2010

Active FTP and Passive FTP Demystified

I have uploaded the same video on Youtube it is way better in clarity :-D, Here are the links.

Active FTP vs Passive FTP Demistified Part 1

Active FTP vs Passive FTP Demistified Part 2

Active FTP vs Passive FTP Demistified Part 3


Sticker showing that Pizza is HOT

vmware server UI crashed once again :-(

This has happened in the past it has reappeared once again today 18-July-2010

I followed these steps given in this URL to get it rectified. :-D

http://communities.vmware.com/thread/203335;jsessionid=0B1AF1DAF3B01511995C3E3A7515076D?start=15&tstart=0

A big thanks to "Doug_" I have edited the file as sudo user /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/conf/tomcat-users.xml

and added in these three lines.





Then restarted vmware with the command

$sudo /etc/init.d/vmware restart

Wola it started working once again.

Saturday, June 19, 2010


Friday, June 4, 2010

How to split any file with script :-D

Thanks to Vineel who gave me this code.

Use the code at your risk, code start from the next line. Copy paste the code into a notepad and change the file name to something.vbs

Function SplitFile(FileName)
'Create Stream object
Dim BinaryInStream
Dim BinaryOutStream
Set BinaryInStream = CreateObject("ADODB.Stream")
BinaryInStream.Type = 1
BinaryInStream.Open
BinaryInStream.LoadFromFile "c:\1.avi"
i=0
WHILE NOT BinaryInStream.EOS
buf = BinaryInStream.Read (5242880) ' 5MB => mention the size of each splited file in bytes
Set BinaryOutStream = CreateObject("ADODB.Stream")
BinaryOutStream.Type = 1
BinaryOutStream.Open
BinaryOutStream.Write(buf)
BinaryOutStream.SetEOS
BinaryOutStream.SaveToFile "C:\" & i & ".dat" , 2
BinaryOutStream.Close
WScript.Echo i & ".dat"
i = i + 1
WEND
BinaryInStream.Close
End Function
'here u give the binary file path
'splited files will be created in C:\ drive......check above logic.....
SplitFile("c:\notepad.exe")
'use following command to recombine them ......... /B means binary files
'copy /B 0.dat+1.dat+2.dat+3.dat+4.dat+5.dat+6.dat+7.dat+8.dat+9.dat+10.dat+11.dat+12.dat+13.dat test.exe
'by vineel

Saturday, May 1, 2010

Thursday, April 29, 2010

Kernal update destroyed VMWare

Kernal update on my system destroyed Vmware finally /usr/bin/vmware-config.pl saved the day.


Tuesday, April 27, 2010

SIT to STAND table

Man I wish that I could buy one table like that for working :-D

http://www.youtube.com/watch?v=oowSZUDCKTc

Sunday, April 25, 2010

Port Forwarding to Virtual Machines :-D

Many a times we would install some server on a virtual machine and wondered how on earth could we show that to the outsite world, well here is a tutorial which shows just that.

Open Bash "Bourn again Shell"

Here you can see that this file is just read only even for root, first change that permission.

bala@ubuntu:~$ ls -l /etc/vmware/vmnet8/nat/nat.conf
-r--r--r-- 1 root root 1246 2010-04-25 11:16 /etc/vmware/vmnet8/nat/nat.conf

Here we are changing that permission.

bala@ubuntu:~$ chmod 644 /etc/vmware/vmnet8/nat/nat.conf
chmod: changing permissions of `/etc/vmware/vmnet8/nat/nat.conf': Operation not permitted

Changing the permission of a file required root privilege in this case.

bala@ubuntu:~$ sudo chmod 644 /etc/vmware/vmnet8/nat/nat.conf
[sudo] password for bala:
bala@ubuntu:~$ ls -l /etc/vmware/vmnet8/nat/nat.conf
-rw-r--r-- 1 root root 1246 2010-04-25 11:16 /etc/vmware/vmnet8/nat/nat.conf

Now that we have got write permission for root let us gedit it :-D

bala@ubuntu:~$ sudo gedit /etc/vmware/vmnet8/nat/nat.conf

I have just taken one small part of the file, as I am going to allow the port forwarding of host machine 80 to the virtual machine 80. In this case my Virtual machine's IP is 10.8.0.128 and the apache server is running on port 80.

# WEB (make sure that if you are using named webhosting, names point to
# your host, not to guest... And if you are forwarding port other
# than 80 make sure that your server copes with mismatched port
# number in Host: header)
# lynx http://localhost:8888
#8888 = 10.8.0.128:80

80 = 10.8.0.129:80


After this save the file by pressing "CTRL + S" if you are using gedit, if you are using vi editor for saving
Press ESC key
Then press :
Then type wq
Then press enter.

After this let us change back the permission on the file back to its original value.

bala@ubuntu:~$ sudo chmod 444 /etc/vmware/vmnet8/nat/nat.conf

Now we need to restart the vmnet8 network so that this will start functioning as we expect.

This "http://webalution.com/techshare/category/vmware/" website helped me a lot with it.

Use the following command.

bala@ubuntu:~$ sudo /usr/lib/vmware/net-services.sh restart 8
DHCP server on /dev/vmnet8 done
NAT service on /dev/vmnet8 done
Host-only networking on /dev/vmnet8 done
Host-only networking on /dev/vmnet8 (background) done
DHCP server on /dev/vmnet8 done
NAT service on /dev/vmnet8 done
bala@ubuntu:~$

Now try to access http://localhost via your browser and wola you are in your virtual machine now :-D hurray.

Now don't stop there if you need to access the same on your LAN then your host firewall should allow it. Add in a rule according to the firewall you use on your host machine. From now on if any one hits your host IP on port 80 they will be get the web-page hosted on your virtual machine.

Fixing bugs for Vmware on Karmic Kola

It took a lot of time for me to get vmware 2.02 server running on Karmic Kola, and still there was this issue with Mouse pointer not working. At last I came across this link "http://ubuntuforums.org/showthread.php?t=1298781" where in they have given a Shell script to run.


#!/bin/bash
################################################## ##############################
# Call VMWare Server's Remote Console in a clean GTK setup.
################################################## ##############################

# Clean GTK setup for VMWare
export VMWARE_USE_SHIPPED_GTK=yes

# Find console executable in Firefox plugins.
vmrc="$(find "$HOME/.mozilla/firefox" -name vmware-vmrc -type f -perm -111 | tail -1)"
[ -x "$vmrc" ] || exit 1

set -x
cd "$(dirname "$vmrc")" && "$vmrc" -h 127.0.0.1:8333


What I did is, we need to go to some path, in my case I have chosen my home folder.

bala@ubuntu:~$ pwd
/home/bala

Use some editor, in my case I have used gedit to create a file called vmware.sh

bala@ubuntu:~$ gedit vmware.sh
bala@ubuntu:~$ ls
vmware.sh

The created file will not have executable permissions, as shown with the ls -l command

bala@ubuntu:~$ ls -l vmware.sh
-rw-r--r-- 1 bala bala 521 2010-04-25 08:56 vmware.sh

I am changing the permission of that file here.

bala@ubuntu:~$ chmod 654 vmware.sh
bala@ubuntu:~$ ls -l vmware.sh
-rw-r-xr-- 1 bala bala 521 2010-04-25 08:56 vmware.sh

Then when I try to run it as normal user it told permission denied. So I ran it as sudo user and wola, it prompts for username and password key in those and you are as good as new :-D

bala@ubuntu:~$ ./vmware.sh
bash: ./vmware.sh: Permission denied
bala@ubuntu:~$ sudo ./vmware.sh

Tuesday, April 20, 2010