Tuesday, August 16, 2016

Docker + full machine virtualization

Docker + QEMU + KVM + VMWare


So, lightweight Docker is good for app virtualizations or even for small systems. Of course if you need a full-scale OS running there are better tools.

sudo apt install docker

sudo apt install docker.io \
virt-manager libvirt libvirt-python libvirt-client

 Also not all laptops are having enabled virtualization! Even with i3 and i5 CPU's the manufacturer just banned it ... Not possible to activate it from the BIOS, even that CPU and MB are supporting it.

Check out if your machine is ok with it:
lsmod | grep kvm
and
cat /proc/cpuinfo | grep vmx
(-- on http://www.tecmint.com is similar >> grep -e 'vmx' /proc/cpuinfo; check it out, Matei's How-To is better than mine)

Now we can run-up the daemon and use virtualized applications! 

sudo service docker status
docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running)
           <omitted>
systemd[1]: Started Docker Application Container Engine.

 You see that it looks good and is up.
Now we can start up 'Hello World' -- > testing image. Basically you should see a message confirming that all is working correctly.

docker run hello-world 
docker info
docker version
docker --help 
 
docker images
docker search ubuntu
docker pull ubuntu

Now we need to run it inside the Docker's container

 docker run ubuntu cat /etc/issue
 
we need to know which container is running already
 docker ps -l 
 docker start c629b7d70666
>> Ctrl+P and Ctrl+Q - will move you back and forth the original OS.   
 
 but who should remember this number?
What if we want to run more apps?   Let's Give him a name!
docker run --name myname  ubuntu cat /etc/debian_version 

docker run -it ubuntu bash 
 docker attach c692...
 docker ps
docker kill 


 
 
 


Thursday, August 11, 2016

NetFlow + NtopNG

NetFlow + Ntop-NG


-- after few hours pulling my hairs finally have NetFlow Collector up and running

-- Finally went for Ntop with NBOX webGUI and must admit that graphics is just COOOL!!! :)

-- Dashboard and all working with it is done with precision and experiences

-- can be installed from repositories ;)

sudo dpkg -i apt-ntop-stable.deb
sudo apt-get clean all
sudo apt update

sudo apt install pfring /
nprobe ntopng ntopng-data n2disk cento nbox pfring-drivers-zc-dkms

sudo apt update
sudo apt install ntopng
(yes, it is really twice here -- first time didn't resolve all dependencies)

To activate the new configuration, you need to run:
  service apache2 reload
insserv: warning: script 'K01nfsen' missing LSB tags and overrides
insserv: warning: script 'nfsen' missing LSB tags and overrides
[ ok ] Reloading apache2 configuration (via systemctl): apache2.service.
[ ok ] Restarting apache2 (via systemctl): apache2.service.

*** IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT ***

You can now point your browser to https://localhost/

The default user is nbox with password nbox

*** IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT ***


So you can go ahead and check it - don't forget to change default password and restart apache2 after ... :D