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:

36813

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
2017-02-25
cdegroot-db - 0.08-r2
Ebuild name:

dev-java/cdegroot-db-0.08-r2

Description

OO database written in Java

Added to portage

2017-02-25

ck-sources - 4.9.12
Ebuild name:

sys-kernel/ck-sources-4.9.12

Description

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

Added to portage

2017-02-25

cronolog - 1.6.2-r5
Ebuild name:

app-admin/cronolog-1.6.2-r5

Description

Log rotation software

Added to portage

2017-02-25

dnd - 1.1-r2
Ebuild name:

x11-libs/dnd-1.1-r2

Description

OffiX' Drag'n'drop library

Added to portage

2017-02-25

gdk-pixbuf - 2.36.5
Ebuild name:

x11-libs/gdk-pixbuf-2.36.5

Description

Image loading library for GTK+

Added to portage

2017-02-25

gentoo-sources - 4.1.38-r1
Ebuild name:

sys-kernel/gentoo-sources-4.1.38-r1

Description

Full sources including the Gentoo patchset for the . kernel tre

Added to portage

2017-02-25

gentoo-sources - 4.10.0
Ebuild name:

sys-kernel/gentoo-sources-4.10.0

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2017-02-25

gst-plugins-base - 1.10.4
Ebuild name:

media-libs/gst-plugins-base-1.10.4

Description

Basepack of plugins for gstreamer

Added to portage

2017-02-25

gst-plugins-cdparanoia - 1.10.4
Ebuild name:

media-plugins/gst-plugins-cdparanoia-1.10.4

Description

CD Audio Source (cdda) plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-dv - 1.10.4
Ebuild name:

media-plugins/gst-plugins-dv-1.10.4

Description

DV demuxer and decoder plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-flac - 1.10.4
Ebuild name:

media-plugins/gst-plugins-flac-1.10.4

Description

FLAC encoder/decoder/tagger plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-gdkpixbuf - 1.10.4
Ebuild name:

media-plugins/gst-plugins-gdkpixbuf-1.10.4

Description

Added to portage

2017-02-25

gst-plugins-good - 1.10.4
Ebuild name:

media-libs/gst-plugins-good-1.10.4

Description

Basepack of plugins for GStreamer

Added to portage

2017-02-25

gst-plugins-jack - 1.10.4
Ebuild name:

media-plugins/gst-plugins-jack-1.10.4

Description

Added to portage

2017-02-25

gst-plugins-jpeg - 1.10.4
Ebuild name:

media-plugins/gst-plugins-jpeg-1.10.4

Description

JPEG image encoder/decoder plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-libav - 1.10.4
Ebuild name:

media-plugins/gst-plugins-libav-1.10.4

Description

FFmpeg based gstreamer plugin

Added to portage

2017-02-25

gst-plugins-libpng - 1.10.4
Ebuild name:

media-plugins/gst-plugins-libpng-1.10.4

Description

PNG image encoder/decoder plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-libvisual - 1.10.4
Ebuild name:

media-plugins/gst-plugins-libvisual-1.10.4

Description

Visualization elements for GStreamer

Added to portage

2017-02-25

gst-plugins-opus - 1.10.4
Ebuild name:

media-plugins/gst-plugins-opus-1.10.4

Description

Opus audio parser plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-oss - 1.10.4
Ebuild name:

media-plugins/gst-plugins-oss-1.10.4

Description

OSS (Open Sound System) support plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-pulse - 1.10.4
Ebuild name:

media-plugins/gst-plugins-pulse-1.10.4

Description

PulseAudio sound server plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-raw1394 - 1.10.4
Ebuild name:

media-plugins/gst-plugins-raw1394-1.10.4

Description

Fiwewire DV/HDV capture plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-shout2 - 1.10.4
Ebuild name:

media-plugins/gst-plugins-shout2-1.10.4

Description

Icecast server sink plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-soup - 1.10.4
Ebuild name:

media-plugins/gst-plugins-soup-1.10.4

Description

HTTP client source/sink plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-speex - 1.10.4
Ebuild name:

media-plugins/gst-plugins-speex-1.10.4

Description

Speex encoder/decoder plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-taglib - 1.10.4
Ebuild name:

media-plugins/gst-plugins-taglib-1.10.4

Description

ID3v2/APEv2 tagger plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-v4l2 - 1.10.4
Ebuild name:

media-plugins/gst-plugins-v4l2-1.10.4

Description

Added to portage

2017-02-25

gst-plugins-vpx - 1.10.4
Ebuild name:

media-plugins/gst-plugins-vpx-1.10.4

Description

VP8/VP9 video encoder/decoder plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-wavpack - 1.10.4
Ebuild name:

media-plugins/gst-plugins-wavpack-1.10.4

Description

Wavpack audio encoder/decoder plugin for GStreamer

Added to portage

2017-02-25

gst-plugins-ximagesrc - 1.10.4
Ebuild name:

media-plugins/gst-plugins-ximagesrc-1.10.4

Description

X11 video capture stream plugin for GStreamer

Added to portage

2017-02-25

gstreamer - 1.10.4
Ebuild name:

media-libs/gstreamer-1.10.4

Description

Open source multimedia framework

Added to portage

2017-02-25

heirloom-sh - 050706-r1
Ebuild name:

app-shells/heirloom-sh-050706-r1

Description

Heirloom Bourne Shell, derived from OpenSolaris code SVR4/SVID3

Added to portage

2017-02-25

leatherman - 0.11.1
Ebuild name:

dev-libs/leatherman-0.11.1

Description

A C++ toolkit

Added to portage

2017-02-25

livecd-tools - 2.3
Ebuild name:

app-misc/livecd-tools-2.3

Description

Gentoo LiveCD tools for autoconfiguration of hardware

Added to portage

2017-02-25

message_filters - 1.13.0
Ebuild name:

dev-ros/message_filters-1.13.0

Description

Set of message filters which take in messages and may output those m

Added to portage

2017-02-25

opentmpfiles - 0.1.2
Ebuild name:

sys-apps/opentmpfiles-0.1.2

Description

A standalone utility to process systemd-style tmpfiles.d files

Added to portage

2017-02-25

pprocm - 1.0-r2
Ebuild name:

app-admin/pprocm-1.0-r2

Description

ncurses-based program to monitor CPU, disk, network and memory usage

Added to portage

2017-02-25

rosbag - 1.13.0
Ebuild name:

dev-ros/rosbag-1.13.0

Description

Set of tools for recording from and playing back to ROS topics

Added to portage

2017-02-25

rosbag_storage - 1.13.0
Ebuild name:

dev-ros/rosbag_storage-1.13.0

Description

Set of tools for recording from and playing back ROS message

Added to portage

2017-02-25

rosconsole - 1.13.0
Ebuild name:

dev-ros/rosconsole-1.13.0

Description

ROS console output library

Added to portage

2017-02-25

roscpp - 1.13.0
Ebuild name:

dev-ros/roscpp-1.13.0

Description

C++ implementation of ROS

Added to portage

2017-02-25

rosgraph - 1.13.0
Ebuild name:

dev-ros/rosgraph-1.13.0

Description

Prints information about the ROS Computation Graph

Added to portage

2017-02-25

roslaunch - 1.13.0
Ebuild name:

dev-ros/roslaunch-1.13.0

Description

Tool for easily launching multiple ROS nodes

Added to portage

2017-02-25

roslz4 - 1.13.0
Ebuild name:

dev-ros/roslz4-1.13.0

Description

Python and C++ implementation of the LZ4 streaming format

Added to portage

2017-02-25

rosmaster - 1.13.0
Ebuild name:

dev-ros/rosmaster-1.13.0

Description

ROS Master implementation

Added to portage

2017-02-25

rosmsg - 1.13.0
Ebuild name:

dev-ros/rosmsg-1.13.0

Description

Command-line tools for displaying information about message and services

Added to portage

2017-02-25

rosnode - 1.13.0
Ebuild name:

dev-ros/rosnode-1.13.0

Description

Command-line tool for displaying debug information about ROS nodes

Added to portage

2017-02-25

rospkg - 1.1.0
Ebuild name:

dev-python/rospkg-1.1.0

Description

Standalone Python library for the ROS package system

Added to portage

2017-02-25

sdformat - 5.1.0
Ebuild name:

dev-libs/sdformat-5.1.0

Description

Simulation Description Format (SDF) parser

Added to portage

2017-02-25

telegram-desktop-bin - 1.0.14
Ebuild name:

net-im/telegram-desktop-bin-1.0.14

Description

Official desktop client for Telegram (binary package)

Added to portage

2017-02-25

2017-02-24
abootimg - 20150323
Ebuild name:

dev-util/abootimg-20150323

Description

Manipulate Android boot images.

Added to portage

2017-02-24

acpilight - 1.0
Ebuild name:

sys-power/acpilight-1.0

Description

Replacement for xbacklight that uses the ACPI interface to set brightness

Added to portage

2017-02-24

cdrtools - 3.02_alpha07
Ebuild name:

app-cdr/cdrtools-3.02_alpha07

Description

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

Added to portage

2017-02-24

chrome-binary-plugins - 58.0.3018.3_alpha
Ebuild name:

www-plugins/chrome-binary-plugins-58.0.3018.3_alpha

Description

Binary plugins from Google Chrome for use in Ch

Added to portage

2017-02-24

chromium - 58.0.3018.3
Ebuild name:

www-client/chromium-58.0.3018.3

Description

Open-source version of Google Chrome web browser

Added to portage

2017-02-24

containerd - 0.2.5-r1
Ebuild name:

app-emulation/containerd-0.2.5-r1

Description

A daemon to control runC

Added to portage

2017-02-24

dbext - 25.0
Ebuild name:

app-vim/dbext-25.0

Description

vim plugin easy access to databases

Added to portage

2017-02-24

docker - 1.13.1-r1
Ebuild name:

app-emulation/docker-1.13.1-r1

Description

The core functions you need to create Docker images and run Docker c

Added to portage

2017-02-24

docker-runc - 1.0.0_rc2_p20170201
Ebuild name:

app-emulation/docker-runc-1.0.0_rc2_p20170201

Description

runc container cli tools (docker fork)

Added to portage

2017-02-24

dropbox - 21.3.18
Ebuild name:

net-misc/dropbox-21.3.18

Description

Dropbox daemon (pretends to be GUI-less)

Added to portage

2017-02-24

fbida - 2.13
Ebuild name:

media-gfx/fbida-2.13

Description

Image viewers for the framebuffer console (fbi) and X11 (ida)

Added to portage

2017-02-24

firebird - 2.5.7.27050.0
Ebuild name:

dev-db/firebird-2.5.7.27050.0

Description

Relational database offering many ANSI SQL and some SQL features

Added to portage

2017-02-24

flexmock - 2.3.5
Ebuild name:

dev-ruby/flexmock-2.3.5

Description

Simple mock object library for Ruby unit testing

Added to portage

2017-02-24

gentoo-sources - 4.4.51
Ebuild name:

sys-kernel/gentoo-sources-4.4.51

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2017-02-24

gentoo-sources - 4.9.12
Ebuild name:

sys-kernel/gentoo-sources-4.9.12

Description

Full sources including the Gentoo patchset for the . kernel tree

Added to portage

2017-02-24

gitea - 1.0.2
Ebuild name:

www-apps/gitea-1.0.2

Description

A painless self-hosted Git service, written in Go

Added to portage

2017-02-24

gitgutter - 20170222
Ebuild name:

app-vim/gitgutter-20170222

Description

vim plugin shows a git diff in the sign column and stages/reverts hunks

Added to portage

2017-02-24

gloox - 1.0.19
Ebuild name:

net-libs/gloox-1.0.19

Description

A portable high-level Jabber/XMPP library for C++

Added to portage

2017-02-24

google-chrome-unstable - 58.0.3018.3
Ebuild name:

www-client/google-chrome-unstable-58.0.3018.3

Description

The web browser from Google

Added to portage

2017-02-24

libarchive - 3.3.0
Ebuild name:

app-arch/libarchive-3.3.0

Description

BSD tar command

Added to portage

2017-02-24

lightdm - 1.21.5
Ebuild name:

x11-misc/lightdm-1.21.5

Description

A lightweight display manager

Added to portage

2017-02-24

logmein-hamachi - 2.1.0.174
Ebuild name:

net-misc/logmein-hamachi-2.1.0.174

Description

LogMeIn Hamachi VPN tunneling engine

Added to portage

2017-02-24

lxml - 3.7.3
Ebuild name:

dev-python/lxml-3.7.3

Description

A Pythonic binding for the libxml2 and libxslt libraries

Added to portage

2017-02-24

manaplus - 1.7.2.18
Ebuild name:

games-rpg/manaplus-1.7.2.18

Description

OpenSource 2D MMORPG client for Evol Online and The Mana World

Added to portage

2017-02-24

merlin-extend - 0.3
Ebuild name:

dev-ml/merlin-extend-0.3

Description

SDK to extend Merlin

Added to portage

2017-02-24

mysqlclient - 1.3.10
Ebuild name:

dev-python/mysqlclient-1.3.10

Description

Fork of MySQL-python

Added to portage

2017-02-24

nano - 2.7.5
Ebuild name:

app-editors/nano-2.7.5

Description

GNU GPL'd Pico clone with more functionality

Added to portage

2017-02-24

nanoc - 4.4.7
Ebuild name:

www-apps/nanoc-4.4.7

Description

nanoc is a simple but very flexible static site generator written in Ruby

Added to portage

2017-02-24

nbd - 3.15.2
Ebuild name:

sys-block/nbd-3.15.2

Description

Userland client/server for kernel network block device

Added to portage

2017-02-24

ntplib - 0.3.3
Ebuild name:

dev-python/ntplib-0.3.3

Description

Python NTP library

Added to portage

2017-02-24

ocaml-conduit - 0.15.0
Ebuild name:

dev-ml/ocaml-conduit-0.15.0

Description

Dereference URIs into communication channels for Async or Lwt

Added to portage

2017-02-24

ocaml-dns - 0.19.0
Ebuild name:

dev-ml/ocaml-dns-0.19.0

Description

A pure OCaml implementation of the DNS protocol

Added to portage

2017-02-24

opera-beta - 44.0.2510.73
Ebuild name:

www-client/opera-beta-44.0.2510.73

Description

A fast and secure web browser

Added to portage

2017-02-24

phonon-vlc - 0.9.1
Ebuild name:

media-libs/phonon-vlc-0.9.1

Description

Phonon VLC backend

Added to portage

2017-02-24

pogo-manager-bin - 0.1.7
Ebuild name:

games-util/pogo-manager-bin-0.1.7

Description

Pokemon Go manager

Added to portage

2017-02-24

qemu - 2.8.0-r4
Ebuild name:

app-emulation/qemu-2.8.0-r4

Description

QEMU + Kernel-based Virtual Machine userland tools

Added to portage

2017-02-24

rc - 1.7.4-r1
Ebuild name:

app-shells/rc-1.7.4-r1

Description

A reimplementation of the Plan 9 shell

Added to portage

2017-02-24

rex - 9999
Ebuild name:

app-admin/rex-9999

Description

(R)?ex is a small script to ease the execution of remote commands

Added to portage

2017-02-24

rspamd - 1.4.4
Ebuild name:

mail-filter/rspamd-1.4.4

Description

Rapid spam filtering system

Added to portage

2017-02-24

sdl-gfx - 2.0.26
Ebuild name:

media-libs/sdl-gfx-2.0.26

Description

Graphics drawing primitives library for SDL

Added to portage

2017-02-24

sdl2-gfx - 1.0.3
Ebuild name:

media-libs/sdl2-gfx-1.0.3

Description

Graphics drawing primitives library for SDL2

Added to portage

2017-02-24

shadow - 4.4-r2
Ebuild name:

sys-apps/shadow-4.4-r2

Description

Utilities to deal with user accounts

Added to portage

2017-02-24

systemtap - 3.1
Ebuild name:

dev-util/systemtap-3.1

Description

A linux trace/probe tool

Added to portage

2017-02-24

thermald - 1.5.4
Ebuild name:

sys-power/thermald-1.5.4

Description

Thermal daemon for Intel architectures

Added to portage

2017-02-24

thread_safe - 0.3.6
Ebuild name:

dev-ruby/thread_safe-0.3.6

Description

A collection of thread-safe versions of common core Ruby classes

Added to portage

2017-02-24

tortoisehg - 4.1
Ebuild name:

dev-vcs/tortoisehg-4.1

Description

Set of graphical tools for Mercurial

Added to portage

2017-02-24

toxic - 0.7.2-r1
Ebuild name:

net-im/toxic-0.7.2-r1

Description

A curses-based client for Tox.

Added to portage

2017-02-24

vanilla-sources - 3.16.40
Ebuild name:

sys-kernel/vanilla-sources-3.16.40

Description

Full sources for the Linux kernel

Added to portage

2017-02-24

vanilla-sources - 3.2.85
Ebuild name:

sys-kernel/vanilla-sources-3.2.85

Description

Full sources for the Linux kernel

Added to portage

2017-02-24

vanilla-sources - 4.4.51
Ebuild name:

sys-kernel/vanilla-sources-4.4.51

Description

Full sources for the Linux kernel

Added to portage

2017-02-24

vanilla-sources - 4.9.12
Ebuild name:

sys-kernel/vanilla-sources-4.9.12

Description

Full sources for the Linux kernel

Added to portage

2017-02-24

xen - 4.8.0-r3
Ebuild name:

app-emulation/xen-4.8.0-r3

Description

The Xen virtual machine monitor

Added to portage

2017-02-24

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: 6.9 ms
system status display