Oskar Stolc's Howto Collection

Articles by Oskar Stolc

OpenVZ - Create a Container with VETH Interface

This howto shows how to create an OpenVZ container with VETH interface.

Create the container

vzctl create 10221 --ostemplate centos-6-x86_64 --config vswap-1g

Configure the container

vzctl set 10221 --save --name server10221
vzctl set 10221 --save --onboot yes
vzctl …

OpenVZ on CentOS 6

This howto shows how to install OpenVZ on CentOS 6.

Assumptions

  • SELinux is disabled
  • Firewall is disabled
  • Containers are on the same subnet as the physical host

Installation Steps

Install the OpenVZ yum repo and ensure it points to the right repo (RHLE6)

wget -O /etc/yum.repos.d/openvz …

L2TP/IPSec Linux Server Behind NAT

In this blog we will learn how to install an L2TP/IPSec Linux Server behind NAT.

IP Assignments

  • L2TP/IPSec Server IP: 192.168.42.190 / 24
  • L2TP/IPSec Client IPs: 192.168.42.191-199

Kernel Parameter Tuning

Add the following to /etc/sysctl.conf

# ---------------- L2TP/IPSec (OpenSwan) ---------------
net.ipv4 …

GIT - Extract a Subdirectory into a Separate GIT Repository

This howto shows how to extract a subdirectory into a separate GIT repository.

Assumptions

  • Your main GIT repo is /var/lib/git/giantproject.git
  • You want to extract /var/lib/git/giantproject.git/path/to/subproject into a separate /var/lib/git/subproject.git bare repo
  • You want to remove …