openvpn - Virtual private network (VPN) software ChangeLog

HOWTO


# OpenVPN 2.4.0
# =============
# Prerequisites:
# pkg-config
# net-tools (ifconfig, route, netstat
# iproute2's ip
# systemd (optional)
# man's man2html
# git
# Various Linux kernel features
# pkcs11-helper
# OpenSSL
# lzo

# If the home page link (to the Community section) above stops working, try
# the top level:
# http://openvpn.net/

# The mailing lists are available through SourceForge:
# https://sourceforge.net/projects/openvpn/

# If you can't get a GnuPG public key to verify the download through
# keyservers, as done below, you can also get it here:
# https://openvpn.net/index.php/open-source/documentation/sig.html

# If you ever want to uninstall OpenVPN, skip down to the bottom

# Get it
cd
test -f installed/openvpn-2.4.0.tar.xz &&
mv -f installed/openvpn-2.4.0.tar.xz .
test ! -f openvpn-2.4.0.tar.xz &&
wget --no-check-certificate \
https://swupdate.openvpn.org/community/releases/openvpn-2.4.0.tar.xz

# Verify tarball w/ sha1sum:
# (this came from my gpg-verified tarball)
echo "704658db39e95ae8d63bb7847e9eb7f638e76631  openvpn-2.4.0.tar.xz" | \
sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 198D22A3 > /dev/null 2>&1 || gpg --recv-keys 198D22A3 ) &&
wget -nc --no-check-certificate \
https://swupdate.openvpn.org/community/releases/\
openvpn-2.4.0.tar.xz.asc &&
  gpg --verify openvpn-2.4.0.tar.xz.asc && rm openvpn-2.4.0.tar.xz.asc

# Extract it
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "openvpn-*" -exec rm -r {} \;
tar xJvf ~/openvpn-2.4.0.tar.xz
cd openvpn-2.4.0
test $UID = 0 && chown -R root:root .

# If you do use PAM, leave off --disable-plugin-auth-pam

# If you have systemd installed, add these:
# --enable-systemd --enable-password-save

# Configure the build
LIBDIR=lib
test $(uname -m) = "x86_64" && LIBDIR=lib64
./configure --prefix=/usr --docdir=/usr/doc/openvpn-2.4.0 \
--libdir=/usr/${LIBDIR} --localstatedir=/var --mandir=/usr/man \
--sysconfdir=/etc/openvpn --disable-plugin-auth-pam \
--enable-lzo --enable-iproute2
unset LIBDIR

# Build it
make

# Become root to install it
su

# Backup your /etc/openvpn directory and it's contents
test -d /etc/openvpn &&
( mkdir -p -m 0700 ~/backup
   cd /etc/openvpn
   tar cJvf ~/backup/openvpn-$(date +%Y%m%d).tar.xz .
   chmod 600 ~/backup/openvpn-$(date +%Y%m%d).tar.xz )

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg openvpn

# Remove documentation from old versions
find /usr/doc -maxdepth 1 -type d -name "openvpn-*" -exec rm -r {} \;

# Install it, strip binaries
make install-strip

# If you are going to have it start with --writepid (or you can put that in
# the configuration file) and put the pid in a file in directory
# /var/run/openvpn, make sure it exists and is writable by whatever
# user and/or group you have set in the configuration.  If you have
# "user nobody" and "group nobody" set, this should do it:
mkdir -p /var/run/openvpn
chown root:nobody /var/run/openvpn
chmod 770 /var/run/openvpn

# For more info about OpenVPN configuration see:
# less ./README
# man openvpn
# sample/sample-config-files/ (under the source)
# HOWTO, Examples, Manuals, Wiki, etc. at https://openvpn.net/index.php/open-source.html

# I have a needlessly overcomplicated :-) sample /etc/rc.d/rc.openvpn-server
# startup script here.  To get it to run on boot-up, add something to start
# it to /etc/rc.d/rc.local
cd /etc/rc.d
test -f rc.openvpn-server &&
( mv -f rc.openvpn-server rc.openvpn-server.old
   chmod 600 rc.openvpn-server.old )
wget -nc http://englanders.us/pub/linux/misc/rc.openvpn-server
test -s rc.openvpn-server && chmod 700 rc.openvpn-server

# If you are interested in connecting from a tablet or smart phone, look
# for OpenVPN for Android:
# https://play.google.com/store/apps/details?id=de.blinkt.openvpn

# Become your non-root user again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/openvpn-*.tar.*
mv openvpn-2.4.0.tar.xz installed/


# If you ever want to uninstall OpenVPN, this should do it:
cd
su
test -x /sbin/removepkg && /sbin/removepkg openvpn
test -d src/openvpn-* && ( cd src/openvpn-* ; make uninstall )
test -d /etc/openvpn && rm -r /etc/openvpn
test -d /usr/doc/openvpn && rm -r /usr/doc/openvpn
find /usr/doc -maxdepth 1 -type d -name "openvpn-"* -exec rm -r {} \;
( cd /usr/man/man8 ; rm -f openvpn.8 openvpn.8.gz )
test -f /usr/sbin/openvpn && rm -f /usr/sbin/openvpn
exit
find ~/src -maxdepth 1 -type d -name "openvpn-*" -exec rm -r {} \;
rm -f ~/installed/openvpn-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2017-01-20 11:32pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]