from small one page howto to huge articles all in one place
 

search text in:




Other .linuxhowtos.org sites: www.linuxhowtos.org
toolsntoys.linuxhowtos.org



Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

39914

userrating:

average rating: 1.5 (4 votes) (1=very good 6=terrible)


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Tutorials per portage category->net-misc->openvpn

OpenVPN primer


There are as many advantages to VPN tunnels as there are different VPN scenarios. One easy implementation is the "OpenVPN via tun-device" solution. An example: you'd like to connect your laptop to your LAN at home so that you can use your mail client without reconfiguring it anytime you switch from home to internet and back. Let's say your mail-server is 192.168.1.10 in your LAN (192.168.1.0/24) at home, and you have got a router/firewall providing access to the Internet. You connect from work or school and want to read mail. OpenVPN can create two virtual devices for you when connecting two computers through an encrypted tunnel. Naturally you then have the possibility of forwarding traffic into the networks behind them, and thus would be "virtually connected" to your LAN behind the firewall. To enable this, either your firewall or a server behind it should run OpenVPN (if you choose a server in your LAN, you'll have to forward the destination port to the OpenVPN server).

Here's what you need to do:
Code Listing 1: Enable the tun module in your kernel: Kernel config - tun module
          [*] Networking support    
Networking options --->
[ ] Amateur Radio support --->
< > IrDA (infrared) subsystem support --->
< > Bluetooth subsystem support --->
[*] Network device support
< > Dummy net driver support
< > Bonding driver support
< > EQL (serial line load balancing) support
Universal TUN/TAP device driver support
// This option must be enabled


Make sure this module exists and can be loaded. Next, install OpenVPN and it dependencies.
Code Listing 2: Install OpenVPN
emerge openvpn

Now on both server and client, create a directory for your configuration:

Code Listing 3: Make directory
mkdir /etc/openvpn    
mkdir /etc/openvpn/myhomelan


Inside that directory, create a shared key for your VPN session and copy that key to the client's directory, /etc/openvpn/myhomelan.

Code Listing 4: Generate shared key
cd /etc/openvpn/myhomelan    
openvpn --genkey --secret myhomelan-key.txt


Now for the tricky part, the routing. It is important that the two tun devices on the client and server use IP addresses from the same subnet. The configuration files shown below list the type of device, the two end-points of the tunnel, the compression method and the UDP-port on which the tunnel is established. Finally privileges are dropped to user and group as listed:

Code Listing 5: Server-side configuration file /etc/openvpn/myhomelan/local.conf
dev tun    
ifconfig 172.16.1.1 172.16.1.20 // IP of the local
// tun device and its peer
secret /etc/openvpn/myhomelan/myhomelan-key.txt
comp-lzo
port 5000
user nobody
group nobody


The client's configuration needs the tunnel's destination address. This is often a dynamic DNS address, sometimes a fixed IP, depending on your ISP. You also need to route to your home LAN (192.168.1.0 in our example). You can call a shell script from the configuration file that accordingly sets a route.

Code Listing 6: Client-side configuration file /etc/openvpn/myhomelan/local.conf
remote    // or your VPN 
// server's external IP if you have a fixed one
dev tun
ifconfig 172.16.1.20 172.16.1.1 // IP of the local tun
// device and its peer
secret /etc/openvpn/myhomelan/myhomelan-key.txt
comp-lzo
port 5000
user nobody
group nobody
up /etc/openvpn/myhomelan/route.sh // sets up the route
//to the network behind the VPN server


The route command would need to set the client's gateway for the network 192.168.1.0 to its peer's address (172.16.1.1 in our setup).

Code Listing 7: /etc/openvpn/myhomelan/route.sh
#!/bin/bash    
route add -net 192.168.1.0 netmask 255.255.255.0 gw 172.16.1.1


That's it. Start OpenVPN on the server and the client, and check the devices with ifconfig and the routes with route -n. Success!

From http://www.gentoo.org/news/en/gwn/20041011-newsletter.xml
rate this article:
current rating: average rating: 2.4 (16 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back
Please read "Why adblockers are bad".



other Ads
Trace My Cash
Wenn Sie sich schon immer mal gefragt haben, wo eigentlich Ihr geliebtes Bargeld geblieben ist, finden Sie hier vielleicht die Antwort.
www.tracemycash.com
Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2018-01-17
apache - 2.4.29-r1
Ebuild name:

www-servers/apache-2.4.29-r1

Description

The Apache Web Server

Added to portage

2018-01-17

blohg - 0.13-r3
Ebuild name:

www-apps/blohg-0.13-r3

Description

A Mercurial (or Git) based blogging engine

Added to portage

2018-01-17

buildbot - 0.9.15_p1
Ebuild name:

dev-util/buildbot-0.9.15_p1

Description

BuildBot build automation system

Added to portage

2018-01-17

buildbot-console-view - 0.9.15_p1
Ebuild name:

dev-util/buildbot-console-view-0.9.15_p1

Description

Buildbot console-view plugin

Added to portage

2018-01-17

buildbot-grid-view - 0.9.15_p1
Ebuild name:

dev-util/buildbot-grid-view-0.9.15_p1

Description

BuildBot grid view web interface

Added to portage

2018-01-17

buildbot-pkg - 0.9.15_p1
Ebuild name:

dev-util/buildbot-pkg-0.9.15_p1

Description

BuildBot common www build tools for packaging releases

Added to portage

2018-01-17

buildbot-waterfall-view - 0.9.15_p1
Ebuild name:

dev-util/buildbot-waterfall-view-0.9.15_p1

Description

Buildbot waterfall-view plugin

Added to portage

2018-01-17

buildbot-worker - 0.9.15_p1
Ebuild name:

dev-util/buildbot-worker-0.9.15_p1

Description

BuildBot Worker (slave) Daemon

Added to portage

2018-01-17

buildbot-wsgi-dashboards - 0.9.15_p1
Ebuild name:

dev-util/buildbot-wsgi-dashboards-0.9.15_p1

Description

Buildbot plugin to integrate flask or bottle dashboards

Added to portage

2018-01-17

buildbot-www - 0.9.15_p1
Ebuild name:

dev-util/buildbot-www-0.9.15_p1

Description

BuildBot base web interface, use with buildbot-{console-view,waterf

Added to portage

2018-01-17

cdrtools - 3.02_alpha09
Ebuild name:

app-cdr/cdrtools-3.02_alpha09

Description

A set of tools for CD/DVD reading and recording, including cdrecord

Added to portage

2018-01-17

chrome-binary-plugins - 65.0.3322.3_alpha
Ebuild name:

www-plugins/chrome-binary-plugins-65.0.3322.3_alpha

Description

Binary plugins from Google Chrome for use in Ch

Added to portage

2018-01-17

crystal - 0.24.1-r1
Ebuild name:

dev-lang/crystal-0.24.1-r1

Description

The Crystal Programming Language

Added to portage

2018-01-17

curl - 7.57.0-r1
Ebuild name:

net-misc/curl-7.57.0-r1

Description

A Client that groks URLs

Added to portage

2018-01-17

davical - 1.1.7
Ebuild name:

www-apps/davical-1.1.7

Description

A CalDAV and CardDAV Server

Added to portage

2018-01-17

gdal - 2.2.3-r1
Ebuild name:

sci-libs/gdal-2.2.3-r1

Description

Translator library for raster geospatial data formats (includes OGR support)

Added to portage

2018-01-17

google-chrome-unstable - 65.0.3322.3
Ebuild name:

www-client/google-chrome-unstable-65.0.3322.3

Description

The web browser from Google

Added to portage

2018-01-17

include-what-you-use - 4.0-r2
Ebuild name:

dev-util/include-what-you-use-4.0-r2

Description

Find unused include directives in C/C++ programs

Added to portage

2018-01-17

kuroo - 0.90.5
Ebuild name:

app-portage/kuroo-0.90.5

Description

Graphical Portage frontend based on KDELibs4/Qt4

Added to portage

2018-01-17

kuroo - 9999
Ebuild name:

app-portage/kuroo-9999

Description

Graphical Portage frontend based on KDE Frameworks

Added to portage

2018-01-17

libtasn1 - 4.13
Ebuild name:

dev-libs/libtasn1-4.13

Description

ASN.1 library

Added to portage

2018-01-17

opera-developer - 52.0.2838.0
Ebuild name:

www-client/opera-developer-52.0.2838.0

Description

A fast and secure web browser

Added to portage

2018-01-17

owncloud-client - 2.4.0
Ebuild name:

net-misc/owncloud-client-2.4.0

Description

Synchronize files from ownCloud Server with your computer

Added to portage

2018-01-17

piexif - 1.1.0_beta0
Ebuild name:

dev-python/piexif-1.1.0_beta0

Description

Exif manipulation with pure Python

Added to portage

2018-01-17

pytest-qt - 2.3.0-r2
Ebuild name:

dev-python/pytest-qt-2.3.0-r2

Description

pytest plugin for PyQt4 or PyQt5 applications

Added to portage

2018-01-17

sudo - 1.8.22
Ebuild name:

app-admin/sudo-1.8.22

Description

Allows users or groups to run commands as other users

Added to portage

2018-01-17

wordpress - 4.9.2
Ebuild name:

www-apps/wordpress-4.9.2

Description

Wordpress PHP and MySQL based content management system (CMS)

Added to portage

2018-01-17

xmlsec - 1.2.25
Ebuild name:

dev-libs/xmlsec-1.2.25

Description

Command line tool for signing, verifying, encrypting and decrypting XML

Added to portage

2018-01-17

2018-01-16
File_Iterator - 1.4.3
Ebuild name:

dev-php/File_Iterator-1.4.3

Description

FilterIterator implementation that filters files based on criteria

Added to portage

2018-01-16

avogadro - 1.2.0_p20170207
Ebuild name:

sci-chemistry/avogadro-1.2.0_p20170207

Description

Advanced molecular editor that uses Qt4 and OpenGL

Added to portage

2018-01-16

bash - 4.4_p12-r1
Ebuild name:

app-shells/bash-4.4_p12-r1

Description

The standard GNU Bourne again shell

Added to portage

2018-01-16

bird - 1.6.3-r1
Ebuild name:

net-misc/bird-1.6.3-r1

Description

A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6

Added to portage

2018-01-16

bunny - 2.9.1
Ebuild name:

dev-ruby/bunny-2.9.1

Description

Another synchronous Ruby AMQP client

Added to portage

2018-01-16

ck-sources - 4.9.76-r1
Ebuild name:

sys-kernel/ck-sources-4.9.76-r1

Description

Con Kolivas' high performance patchset and Gentoo's genpatches for

Added to portage

2018-01-16

cups-filters - 1.19.0
Ebuild name:

net-print/cups-filters-1.19.0

Description

Cups filters

Added to portage

2018-01-16

dwarf-fortress - 0.44.05
Ebuild name:

games-roguelike/dwarf-fortress-0.44.05

Description

A single-player fantasy game

Added to portage

2018-01-16

elogind - 235.2
Ebuild name:

sys-auth/elogind-235.2

Description

The systemd project's logind, extracted to a standalone package

Added to portage

2018-01-16

etherape - 0.9.16
Ebuild name:

net-analyzer/etherape-0.9.16

Description

A graphical network monitor for Unix modeled after etherman

Added to portage

2018-01-16

fldigi - 4.0.14
Ebuild name:

media-radio/fldigi-4.0.14

Description

Sound card based multimode software modem for Amateur Radio use

Added to portage

2018-01-16

flrig - 1.3.38
Ebuild name:

media-radio/flrig-1.3.38

Description

Transceiver control program for Amateur Radio use

Added to portage

2018-01-16

gazebo_dev - 2.7.3
Ebuild name:

dev-ros/gazebo_dev-2.7.3

Description

Provides a cmake config for the default version of Gazebo for the ROS dist

Added to portage

2018-01-16

gazebo_dev - 9999
Ebuild name:

dev-ros/gazebo_dev-9999

Description

Provides a cmake config for the default version of Gazebo for the ROS distr

Added to portage

2018-01-16

gazebo_msgs - 2.7.3
Ebuild name:

dev-ros/gazebo_msgs-2.7.3

Description

Message and service data structures for interacting with Gazebo from ROS

Added to portage

2018-01-16

gazebo_plugins - 2.7.3
Ebuild name:

dev-ros/gazebo_plugins-2.7.3

Description

Robot-independent Gazebo plugins for sensors, motors and dynamic recon

Added to portage

2018-01-16

gazebo_ros - 2.7.3
Ebuild name:

dev-ros/gazebo_ros-2.7.3

Description

ROS plugins that offer message and service publishers for interfacing with

Added to portage

2018-01-16

gazebo_ros_control - 2.7.3
Ebuild name:

dev-ros/gazebo_ros_control-2.7.3

Description

ROS control plugins for gazebo

Added to portage

2018-01-16

gazebo_ros_pkgs - 2.7.3
Ebuild name:

ros-meta/gazebo_ros_pkgs-2.7.3

Description

Interface for using ROS with the gazebo simulator

Added to portage

2018-01-16

gemato - 9.3
Ebuild name:

app-portage/gemato-9.3

Description

Stand-alone Manifest generation & verification tool

Added to portage

2018-01-16

gtk+ - 3.22.26
Ebuild name:

x11-libs/gtk+-3.22.26

Description

Gimp ToolKit +

Added to portage

2018-01-16

hstr - 1.24
Ebuild name:

app-shells/hstr-1.24

Description

Shell history suggest box

Added to portage

2018-01-16

igmpproxy - 0.2
Ebuild name:

net-misc/igmpproxy-0.2

Description

Multicast Routing Daemon using only IGMP signalling

Added to portage

2018-01-16

kalzium - 17.12.1-r1
Ebuild name:

kde-apps/kalzium-17.12.1-r1

Description

Periodic table of the elements

Added to portage

2018-01-16

kmail - 17.12.1-r1
Ebuild name:

kde-apps/kmail-17.12.1-r1

Description

Email client, supporting POP3 and IMAP mailboxes.

Added to portage

2018-01-16

kmailtransport - 17.12.1-r1
Ebuild name:

kde-apps/kmailtransport-17.12.1-r1

Description

Mail transport service

Added to portage

2018-01-16

kwidgetsaddons - 5.42.1
Ebuild name:

kde-frameworks/kwidgetsaddons-5.42.1

Description

An assortment of high-level widgets for common tasks

Added to portage

2018-01-16

kxstitch - 2.1.0
Ebuild name:

media-gfx/kxstitch-2.1.0

Description

Program to create cross stitch patterns

Added to portage

2018-01-16

ldb - 1.3.1
Ebuild name:

sys-libs/ldb-1.3.1

Description

An LDAP-like embedded database

Added to portage

2018-01-16

mksh - 56c
Ebuild name:

app-shells/mksh-56c

Description

MirBSD KSH Shell

Added to portage

2018-01-16

mod_gnutls - 0.8.3-r1
Ebuild name:

www-apache/mod_gnutls-0.8.3-r1

Description

mod_gnutls uses GnuTLS for SSL/TLS encryption in Apache2 (compare to

Added to portage

2018-01-16

myclabs-deepcopy - 1.6.1
Ebuild name:

dev-php/myclabs-deepcopy-1.6.1

Description

Create deep copies (clones) of your objects

Added to portage

2018-01-16

otter - 0.9.94
Ebuild name:

www-client/otter-0.9.94

Description

Project aiming to recreate classic Opera (12.x) UI using Qt5

Added to portage

2018-01-16

pspg - 0.9.2
Ebuild name:

dev-db/pspg-0.9.2

Description

A better pager for psql and mysql

Added to portage

2018-01-16

qpdf - 7.1.0
Ebuild name:

app-text/qpdf-7.1.0

Description

Command-line tool for structural, content-preserving transformation of PDF file

Added to portage

2018-01-16

qutebrowser - 1.1.0
Ebuild name:

www-client/qutebrowser-1.1.0

Description

A keyboard-driven, vim-like browser based on PyQt5 and QtWebEngine

Added to portage

2018-01-16

rpcsvc-proto - 1.3.1
Ebuild name:

net-libs/rpcsvc-proto-1.3.1

Description

rpcsvc protocol definitions from glibc

Added to portage

2018-01-16

rss2email - 3.10_pre20171001
Ebuild name:

net-mail/rss2email-3.10_pre20171001

Description

A python script that converts RSS/Atom newsfeeds to email

Added to portage

2018-01-16

rsync - 3.1.3_pre1
Ebuild name:

net-misc/rsync-3.1.3_pre1

Description

File transfer program to keep remote files into sync

Added to portage

2018-01-16

samba - 4.8.0_rc1
Ebuild name:

net-fs/samba-4.8.0_rc1

Description

Samba Suite Version 4

Added to portage

2018-01-16

sarg - 2.3.11
Ebuild name:

net-analyzer/sarg-2.3.11

Description

Squid Analysis Report Generator

Added to portage

2018-01-16

scummvm-tools - 2.0.0-r1
Ebuild name:

games-engines/scummvm-tools-2.0.0-r1

Description

utilities for the SCUMM game engine

Added to portage

2018-01-16

talloc - 2.1.11
Ebuild name:

sys-libs/talloc-2.1.11

Description

Samba talloc library

Added to portage

2018-01-16

tevent - 0.9.35
Ebuild name:

sys-libs/tevent-0.9.35

Description

Samba tevent library

Added to portage

2018-01-16

virtualbox - 5.1.32
Ebuild name:

app-emulation/virtualbox-5.1.32

Description

Family of powerful x86 virtualization products for enterprise and h

Added to portage

2018-01-16

virtualbox - 5.2.6
Ebuild name:

app-emulation/virtualbox-5.2.6

Description

Family of powerful x86 virtualization products for enterprise and ho

Added to portage

2018-01-16

virtualbox-additions - 5.1.32
Ebuild name:

app-emulation/virtualbox-additions-5.1.32

Description

CD image containing guest additions for VirtualBox

Added to portage

2018-01-16

virtualbox-additions - 5.2.6
Ebuild name:

app-emulation/virtualbox-additions-5.2.6

Description

CD image containing guest additions for VirtualBox

Added to portage

2018-01-16

virtualbox-bin - 5.1.32.120294
Ebuild name:

app-emulation/virtualbox-bin-5.1.32.120294

Description

Family of powerful x86 virtualization products for enter

Added to portage

2018-01-16

virtualbox-bin - 5.2.6.120293
Ebuild name:

app-emulation/virtualbox-bin-5.2.6.120293

Description

Family of powerful x86 virtualization products for enterp

Added to portage

2018-01-16

virtualbox-extpack-oracle - 5.1.32.120294
Ebuild name:

app-emulation/virtualbox-extpack-oracle-5.1.32.120294

Description

PUEL extensions for VirtualBox

Added to portage

2018-01-16

virtualbox-extpack-oracle - 5.2.6.120293
Ebuild name:

app-emulation/virtualbox-extpack-oracle-5.2.6.120293

Description

PUEL extensions for VirtualBox

Added to portage

2018-01-16

virtualbox-guest-additions - 5.1.32
Ebuild name:

app-emulation/virtualbox-guest-additions-5.1.32

Description

VirtualBox kernel modules and user-space tools for

Added to portage

2018-01-16

virtualbox-guest-additions - 5.2.6
Ebuild name:

app-emulation/virtualbox-guest-additions-5.2.6

Description

VirtualBox kernel modules and user-space tools for G

Added to portage

2018-01-16

virtualbox-modules - 5.1.32
Ebuild name:

app-emulation/virtualbox-modules-5.1.32

Description

Kernel Modules for Virtualbox

Added to portage

2018-01-16

virtualbox-modules - 5.2.6
Ebuild name:

app-emulation/virtualbox-modules-5.2.6

Description

Kernel Modules for Virtualbox

Added to portage

2018-01-16

wimlib - 1.12.0
Ebuild name:

app-arch/wimlib-1.12.0

Description

The open source Windows Imaging (WIM) library

Added to portage

2018-01-16

xf86-video-virtualbox - 5.1.32
Ebuild name:

x11-drivers/xf86-video-virtualbox-5.1.32

Description

VirtualBox X11 video driver for Gentoo guest

Added to portage

2018-01-16

rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2017 Sascha Nitsch Unternehmensberatung UG(haftungsbeschänkt)
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 4.3 ms
system status display