Monday, December 10, 2012

Qemu Host in GNS3

You Probably be getting error like qemuwrapper path doesn't exist or failed to start qemu etc.

I was also getting the same error, but after few minutes of brain storming i found the solution.

I did this in Ubuntu12.04 with gns3

Follow the steps below.

1. Click EditMenu->preferences. Click on Qemu tab on the left side of panel. Then go to General Settings.

2. Set the Path to Qemuwrapper to /usr/share/doc/gns3/qemuwrapper.py

3.If you have KVM installed then type kvm in place of qemu in front of Path to qemu

     for installing kvm type in terminal $sudo apt-get install kvm


Monday, November 19, 2012

How to find flash files in Firefox cache ?


The following command lists all the flash files in your Firefox cache.
 
find .mozilla/firefox/*.default/Cache -type f -exec file {} \;  | grep Flash

Wednesday, November 7, 2012

KVM with PXE boot

I have done this in ubuntu 12.04 version.


It is not very tough to boot a kvm image with PXE server...

if you have a pxe server ready in your network then you can go ahead with the following steps.

=>First install the following things..
      qemu, kvm-qemu, bridge-utils, uml-utilities
      sudo apt-get install qemu kvm-qemu bridge-utils uml-utilities

=>Then on the host machine create the bridge interface and tap interface..
      this work is done in my last post-- http://thelinuxtricks.blogspot.in/2012/07/creating-and-binding-bridge-interface.html

=> After creating the interfaces, now you are ready with the weapons, its time to use them
   1.  open terminal
   2.  create a hard disk image
      qemu-img create -f vmdk  testpxe.vmdk 10G
   3. type in terminal
      sudo kvm -hda testpxe.vmdk -boot n -option-rom /usr/share/kvm/pxe-rtl8139.rom -net nic,model=rtl8139 -net tap,ifname=tap0,script=no,downscript=no

That's All, now a screen will come up with pxe boot enable, and will start booting from pxe server.
      

  

Wednesday, July 11, 2012

Creating and Binding bridge interface with tap and ethernet interface

Here i have written a script which firstly set the interface setting then load a virtual OS for host Ubuntu 12.04
i don't know it will work for other Ubuntu version or not....


start.sh ...

#!/bin/bash

username=$(whoami)
echo "username is $username"
tdevice=$(sudo tunctl -u $username)
bridgename='br0'
ethname='eth0'
tapname='tap0'

echo "bridge= $bridgename"
echo "ethernet = $ethname"
echo "tapname= $tapname"



sudo brctl addbr $bridgename
echo "A bridge has been added"

sudo brctl addif $bridgename $ethname
echo "eth0 is added to bridge"

sudo brctl addif $bridgename $tapname
echo "tap0 is added to bridge"

sudo ifconfig $bridgename up
echo "up bridge interface"

sudo ifconfig $ethname up
echo "up ethernet interface"

sudo ifconfig $tapname up
echo "up tap interface"

sudo ifconfig $bridgename 192.168.68.75/24
echo "Giving IP address manually to bridge interface"

sudo ifconfig $ethname 0.0.0.0 promisc
echo "setting eth at promisc mode"

sudo ifconfig $tapname 0.0.0.0 promisc
echo "setting tap interface at promisc mode"

sudo ip route add default via 192.168.68.254
echo "setting the gateway for bridge"

echo "Starting Ubuntu Server"
kvm -hda ubuntu.vmdk -net nic,model=i82551 -net tap,ifname=tap0,script=no,downscript=no -net nic,model=i82551 -boot c

echo "Turning off Server Oh Yeah!!!"
. off.sh
------------------------------------------------------------------------------------------------------------






off.sh .....
#!/bin/bash

bridgename='br0'
ethname='eth0'
tapname='tap0'

output=$(sudo tunctl -d $tapname)
echo $output
echo "Deleting tap interface"

sudo ifconfig $ethname 192.168.68.75/24 up
echo "Setting eth interface ip address"

sudo ifconfig $bridgename down
echo "Down bridge interface"

sudo brctl delbr $bridgename
echo "Deleting bridge interface"

sudo ip route add default via 192.168.68.254
echo "Adding gateway for eth interface"


Saturday, March 10, 2012

Setting Proxy in Ubuntu

In Ubuntu we have to set Proxy at four different Places



1=> In Network Proxy Setting 
        ( System Menu -> Preferences -> Network Proxy)

figure showing the configuration of proxy in ubuntu

      Select Manual Proxy configuration
       Enter the IP of proxy server  as shown in figure
  

Adding user name and password if provided by network administrator


       Click the details button and enter your username and password if provided by Network Administrator



2=> In apt.conf file
        ( /etc/apt/apt.conf)

 if this file is there in the directory then edit as shown below otherwise create one.

  Type the following in the apt.conf file


 Acquire::http::proxy "http://username:password@192.168.1.103:3128/";
 Acquire::ftp::proxy "ftp://username:password@192.168.1.103:3128/";
 Acquire::https::proxy "https://username:password@192.168.1.103:3128/";


Here the IP address is the address of the proxy server and 3128 is the port number of the proxy.





3=> In Mozilla Firefox


  In Firefox go to Edit->Preferences->Advanced->Network->Setting
  Enter the Proxy server address and Port Number. 





4=> In Synaptic Package Manager

    Go to Setting-> Preferences -> Network
Enter the proxy server address and Port Number.






     Thank You.