OpenVZ is container-based virtualization for Linux. OpenVZ creates multiple secure, isolated containers (otherwise known as VE or VPS) on a single physical server enabling better server utilization and ensuring that applications do not conflict. Each container performs and executes exactly like a stand-alone server; a container can be rebooted independently and have root access, users, IP addresses, memory, processes, files, applications, system libraries and configuration files.

Step 1. Installation:
An OpenVZ kernel and the vzctl and vzquota packages are available in the Debian Squeeze repositories, so we can install them as follows:

apt-get install linux-image-openvz-686  vzctl  vzquota

Step 2. Create a symlink from /var/lib/vz to /vz to provide backward compatibility:

ln -s /var/lib/vz /vz

Step 3. Open with your favorite editor (eg: nano, vim) /etc/sysctl.conf and edit as following :

net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.ip_forward=1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.eth0.proxy_arp=1

After you’ve edited /etc/sysctl.conf file run:

sysctl -p

Continue Reading…

VMware Server is totally free. All you need is just to register your name and address to obtain a number of serial numbers.

You may get up to 100 serial numbers at a time. In VMware, there are 3 network types: bridge, nat, and host-only:

Bridge is the most powerful one but you need an extra IP address.

If you don’t have one, you might be interesting in nat or host-only. Nat seems to be better to keep your guest OS up-to-date and connected to the internet.  Nat means you can’t connect to the guest OS directly from internet so you can’t run it as a server.

Anyway, it is possible to forward port to the guest OS behind NAT

Usually, the nat configuration will be stored in a file named nat.conf located in each VMware’s network device.

For example, my host OS has vmnet8 as a nat device so there is a nat.conf as follow:

/etc/vmware/vmnet8/nat/nat.conf

Port forwarding is in section incomingtcp and incomingudp.

For example, I would like to ssh to the guest OS on port 22 through port 2222 on the host OS.

[incomingtcp]
2222 = 172.168.254.100:22

After that I have to restart VMware’s network services as below.

/usr/lib/vmware/net-services.sh restart

So now I can ssh to the guest OS as follow:

ssh -p 222 mydomain.com

First create he folder you want to share:

mkdir /mnt/shared_folder
Then open to edit the rc.local file:
nano /etc/rc.local
And add the following line:
  mount -t vboxsf -w -o uid=1000,gid=1000 my_shared_folder /mnt/shared_folder

And the last step: save, quit. Reboot

reboot

If you are useing Webmin system administration and you forget your password you will probably see how frustrating that there is not a way of remembering the password or reset it.
Webmin gives us the only possibility of authentication, but when you are not authenticated, you can not do anything. So we can not change the user password.

A solution still exist using the command line. For this, we need the installation directory, the directory configuration and the user name to reset password. If Webmin is installed in “/usr/share/webmin” and the settings are stored in “/etc/webmin” we can rewrite the admin user password by running the following command as root:

/usr/share/webmin/changepass.pl < config-dir > < login > < password >

*< config-dir >  –   is the directory where webmin settings are stored.
*< login >            –   is the username for which we want to reset password.
*< password >   -  is the new password.

Example:

Continue Reading…

Webmin on Debian:
(latest version can be found here if a new version has come out http://www.webmin.com/download.html)

Run everything in root to avoid confusion

apt-get update

apt-get install wget perl libnet-ssleay-perl openssl libauthen-pam-perl libio-pty-perl libmd5-perl

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.441_all.deb

dpkg -i webmin_1.441_all.deb

rm -rvf /etc/rc*d/S*webmin*

rm -rvf /etc/rc*d/K*webmin* Continue Reading...

Page 3 of 41234