On 2012-06-01 10:09, Mark Rogers wrote:
I always get into a muddle when I try to set up VPN connections but I'm going to have another go..
What I have is lots of Linux "devices" (typically ARM boxes running Debian) which will be plugged into networks giving them Internet access.
What I want to achieve is to have them auto-connect to a VPN, such that I am able to access all of them, but also that the end user can connect to their own devices but nobody elses. Ideally I'd also like other VPN capable devices, such as Draytek routers, to be able to join in the party.
I don't know whether Draytek routers will connect to an OpenVPN server - you may have to be a little more clever to make this work. In the past I have had my openvpn server establish vpns directly out to vpn-capable devices (I would connect to openvpn on a VPS server for "roadwarrior" type remote access, and that server itself would establish IPSec VPN connections to my DSL router at home)
My starting point - which may well be wrong, is to assume that I want a server running OpenVPN somewhere on t' Internet. (Is that the right place to start?) I find the OpenVPN documentation to be very detailed but hard to narrow it down to any particular usage case unless it's a standard config (eg "road
warrier").
I do something similar with my various internet-connected devices and connect back to a "hub" OpenVPN server running on a small VPS out there in the interwebs.
This works well for me, I install the relevant key files on each of my devices (linux/windows laptops and desktops, android devices etc) and configure openvpn to start automatically at boot and connect to the server.
What I don't want at my end is to *have* to connect separately to each VPN. Doing so optionally would be good (but would be possible in the same way an extra device could), but it could be I end up with dozens or hundreds of separate segregated VPNs. Furthermore, it's likely that I will want all of the VPNs to have access to certain facilities (eg databases, FTP) on other servers without having to make the other servers join multiple VPNs.
The server config is set to permit connectivity between client machines, and I reserve individual addresses for those devices which I might need to connect to remotely.
Hope this helps,
Jim
========== config file follows =========
# server.conf openvpn configuration file # # # This will become our network interface dev tap10
# We want to use tcp on port 8200 proto tcp port 8200
# Bind to eth0 local server.public.fqdn.org.uk
# Set ourselves up as a server mode server server 10.10.10.0 255.255.255.0
# here will live our status information status /tmp/openvpn-server.status
# These are our settings for authentication and connectivity keepalive 10 30 client-to-client max-clients 5 log-append /var/log/openvpn/server.local verb 3 ifconfig-pool-persist server-ipp.txt client-config-dir /etc/openvpn/server/ccd client-connect /etc/openvpn/server/client-connect.sh
# Push routes push "route 192.168.0.0 255.255.255.0" push "route 192.168.1.0 255.255.255.0"
# here we configure our PKI tls-auth /etc/openvpn/server/ta.key 0 tls-server dh /etc/openvpn/server/dh1024.pem ca /etc/openvpn/server/ca.crt cert /etc/openvpn/server/public.crt key /etc/openvpn/server/private.key comp-lzo
# User and group settings user openvpn group openvpn
# Keep alive stuff persist-key persist-tun