HOWTO OpenVPN setup(excelent)

1. First of all get a few additional repos, If you already have your repos setup, skip this step

If you have Fedora 3, follow these steps, http://stanton-finley.net/fedora_cor…notes.html#Yum

If you have Fedora 4, follow these steps, http://stanton-finley.net/fedora_cor…notes.html#Yum

If you have Fedora 5, follow these steps, http://stanton-finley.net/fedora_cor…notes.html#Yum

if you have CentOS, follow the “additional third party CentOS repos” http://www.osresources.com/11_6_en.html Then issue these commands, each line is a new command, anything beginning with “#” are comments so dont try to execute those.

# yum update
# yum install openssl openssl-devel
# openssl and openssl-devel may be installed already… so don’t worry

2. Right, now you want to install OpenVPN, here are the commands,

# yum install openvpn -y
// Now check that it works
# service openvpn start
# service openvpn stop

3. A few things to setup before you can make certificates, issue these commands,

# find / -name "easy-rsa"
// you should get an output like this
# /usr/share/doc/openvpn-2.0.7/easy-rsa
// Now, make a copy of the easy-rsa directory, to /etc/openvpn/
( make sure you #have put the right version number in i.e. mine was -2.0.7, change if needed)
# cp -R /usr/share/doc/openvpn-2.0.7/easy-rsa /etc/openvpn/
# cd /etc/openvpn/easy-rsa
# chmod 777 *
# mkdir /etc/openvpn/keys

HOWTO VPN over SSH and tun

Do it with a Script

Introduction

The following script will let you start a full featured VPN using SSH and tun.
Requirements

* OpenSSH with tun support on both sides (tested Debian 4.3 on server, Gentoo 4.5 on client)
* Root access on both sides * Allowed root access and tunnel on server side:

File: /etc/ssh/sshd_config

PermitRootLogin yes
PermitTunnel yes
TCPKeepAlive yes # Not required but makes things much more stable. This is default now
* Compiled ‘tun’ module on both sides
* Loaded ‘tun’ module on server side 
* Allowed ARP proxy (required only for accessing client from within the private network)

Howto create Loop Device on REDHAT, CENTOS or FEDORA

This mini howto explain how to create more loop device on your operating system.You need to create more loop device in some case like encrypted file system or HVM xen virtualization.  By default there are 7 devices available, named /dev/loop0 through to /dev/loop7 .

INFORMATIONS

You can find the loop device like that :

# ls -al /dev/loop*
brw-r----- 1 root disk 7, 0 Mar 19 09:34 /dev/loop0
brw-r----- 1 root disk 7, 1 Mar 19 09:34 /dev/loop1
brw-r----- 1 root disk 7, 2 Mar 19 09:34 /dev/loop2
brw-r----- 1 root disk 7, 3 Mar 19 09:34 /dev/loop3
brw-r----- 1 root disk 7, 4 Mar 19 09:34 /dev/loop4
brw-r----- 1 root disk 7, 5 Mar 19 09:34 /dev/loop5
brw-r----- 1 root disk 7, 6 Mar 19 09:34 /dev/loop6
brw-r----- 1 root disk 7, 7 Mar 19 09:34 /dev/loop7

The creation of the loop device is very simple but you have 2 options for this creation one is without reboot and the other one is with a reboot.