Thursday, January 14, 2010

Linux and NICs (bringing up the NIC)

Hello,
Today I will post about detection of NIC (h/w) and if a driver was installed .

Like windows, there is no central way on linux to check if something happened.

To check if NIC is present :

use lspci (list pci devices) : generally nic is connected thru pci bus (if you have one on usb, use lsusb)

ls is a general command to list things on linux, prolly ls+pci is listing pci devices and so on.

Then check if the driver was loaded:

The simplest way of do this is to grep eth lines on /var/log/dmesg file.
dmsg would prolly contain bootup messages.

cat /var/log/dmesg | grep eth

the output should be:

[xxx.xxx] eth0 : registered xyzcompany name etc.

Now simply bringup the network

For this, you need to add entries to /etc/network/interfaces file.
add:
auto eth0
iface eth0 inet dhcp

save.(you can do this via gedit, or vi or any other editor you want)
even cat > would do.
after this, use ifup -a

ifup -a

brings up all interfaces.

try pinging, traceroute and if its replying then your network is up and running!

Wonders of Virtualization

The last time I had to install linux, I had to work out partitioning the hard disk, installing the boot sector on the appropriate partition, and 10k other things. Along with the tension that if I mess something, that would prolly mean reinstalling the whole system again (ie.wasting 2-3hrs) or then complete loss of data :) , if the partition was done absent mindedly,and I boast(in a sarcastic way) a long tradition of making absent minded mistakes.

Now here comes the saviour : FULL VIRTUILIZATION.

As the name suggests , full virtuilization provides virtuilization at level of machine lvl instructions (or machine code), by doing so, a single pc could host a dozen os at a time in complete relative isolation, which is totally rad(ical).


For users like me , who like to try out all that new distros have to offer, this comes as a unparalled boon, now i dont need to toggle my actualy h/w settings, instead i just "virtually-install" any operating system I need to.Thus eleminating any risk that the os installation/running may have brought to the other ones installed.

Ofcourse there are thousands of reasons why virtuilization was actually so important, some being ability of a single hardware to provide multiple guest level operating systems- the primary goal .

Currently virtuilization is important because it helps isolate the hardware and software, by providing a level of virtuilization in between, so processor p0 on a virtual os, may not really exsist. Where is all this heading to ? Well, this is one of the principles of security called diffusion.
Something that diffuses a central attack target into many splinters only one of which is true, or each share 1/nth risk the original, if there were n virtual processors in this particular case.

The downtime is reduced to ~"0" by making use of virtuilization, the answer being obvious that, any damage that occours , ocours to a part of the system rather than the whole system, so next time you jam out a nic, its just the virtual nic, not the real one, so your attack would bring down only part of the operating system.

This added complexity results into security-by-ignorance.


All in all, this is the new beginning of computers ,where a single laptop would host a mac, linux, solaris, and any other os one would like....all at a time.

That is impressive!!!



Try out Virtual Box, one of the coolest full vir s/w available for FREE!