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

Sed – An Introduction and Tutorial

Bruce Barnett

Last update: Wed Apr 16 20:55:07 EDT 2008
Thanks to Keelan Evans, Fredrik Nilsson, and Kurt McKee for spotting some typos.
Thanks to Wim Stolker and Jose' Sebrosa as well.
Thanks to Olivier Mengue.
Thanks to Andrew M. Goth.
Thanks to David P. Brown.

Copyright 2001,2005,2007 Bruce Barnett and General Electric Company

All rights reserved

You are allowed to print copies of this tutorial for your personal use, and link to this page, but you are not allowed to make electronic copies, or redistribute this tutorial in any form without permission.

real world unix/linux FIND usage

find . -type f -size +10000 -exec ls -al {} \;
find . -atime +1 -type f -exec mv {} TMP \; # mv files older then 1 day to dir TMP
find . -name "-F" -exec rm {} \; # a script error created a file called -F
find . -exec grep -i "vds admin" {} \;
find . \! -name "*.Z" -exec compress -f {} \;
find . -type f \! -name "*.Z" \! -name ".comment" -print | tee -a /tmp/list
find . -name *.ini
find . -exec chmod 775 {} \;
find . -user xuser1 -exec chown -R user2 {} \;
find . -name ebtcom*
find . -name mkbook
find . -exec grep PW0 {} \;
find . -exec grep -i "pw0" {} \;
find . -atime +6
find . -atime +6 -exec ll | more
find . -atime +6 -exec ll | more \;
find . -atime +6 -exec ll \;
find . -atime +6 -exec ls \;
find . -atime +30 -exec ls \;
find . -atime +30 -exec ls \; | wc -l
find . -name auth*
find . -exec grep -i plotme10 {};
find . -exec grep -i plotme10 {} \;
find . -ls -exec grep 'PLOT_FORMAT 22' {} \;

How-To Make the root filesystem read-only

Introduction

There are several reasons why you might want to make your root file system read only. I wanted to have a system on a flash disk, and since flash disks are damaged after repeated read-write circles the read-only root is a very nice solution. Other reasons why you would want to make your root partition read only include:

  • If you want maximum security for your server, and want it to boot from a read only medium (i.e. a CD-ROM)
  • If you want to make your own live-cd
  • To avoid that power loss or system crash damage the root partition.
  • If you want to mount the same nfsroot on several thin clients

The following procedure is what i did to turn my SuSE 10.1 root file system to read-only. It should work on both earlier and later versions but i haven’t tested it yet. There could be better/more elegant solutions, if you think that something is missing please fill free to edit this howto.

Acknowledgments

Some of the information on this howto where found here.

Moving Directories using TAR

The following can be used to move a directory/sub-directory when the directory is the entire mount point: [bash]# dump 0f - /dev/rdsk/c207d0s0 | restore rf -[/bash] NOTE: Must be in the target directory! The following can be used when the directory to be moved is a sub-directory to the mount…

Using the find Command

Overview This document provides several examples of using the find command in a UNIX environment. Finding Groups with Numeric Values [bash]# find /db? -group 15 | xargs chgrp[/bash] Often a user or system administrator will encounter directories that have a numeric value. This is an indication a change user made…

The /proc Filesystem

One of the ways in determining what is going on inside the UNIX kernel is to make use of the /proc filesystem. Some of that information may be disk arrays connected to your server or querying kernel parameters. The /proc filesystem offers an interface to important kernel data structures that provide information about the state of a running UNIX kernel by use of special files. The System Administrators uses the UNIX cat command to list the contents of those special files.

Under Linux, it is also possible to set certain kernel parameters by using the echo command. For example, to change the kernel parameter value used to control the maximum socket receive buffer size, net.core.rmem_default, to 262144, use the following:

# echo 262144 > /proc/sys/net/core/rmem_default

It is important to understand when setting kernel parameters in Linux using the echo command, (as in the above example), these settings need to be applied each time the system boots. Some distributions of Linux already have a setup method for this during boot. On Red Hat, this can be configured in /etc/sysctl.conf: (like: net.core.rmem_default = 262144).

This article attempts to list some of the more common files used by System Administrators. Although most of these special files are general enough to apply to all flavors or UNIX (Solaris, Linux, HP-UX, etc.), I indicate those that only apply to a particular platform.