OpenVPN & Debian Stretch

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

OpenVPN & Debian Stretch

Post by Pippin » Mon Dec 04, 2017 3:28 pm

Hi,

Pretty new to this, i` ve installed a dual boot W7 - Debian stretch 9.2.1 with xfce desktop on a laptop to learn and possibly switch to Linux completely in the future. Now i`m trying to install OpenVPN 2.4.4 as a client.
I followed:
https://community.openvpn.net/openvpn/w ... twareRepos

Code: Select all

:~# apt-get update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Hit:2 http://deb.debian.org/debian stretch-updates InRelease             
Ign:3 http://build.openvpn.net/debian/openvpn/release/2.4 stretch InRelease
Hit:4 http://build.openvpn.net/debian/openvpn/release/2.4 stretch Release
Reading package lists... Done

Code: Select all

:~# apt-get install openvpn
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openvpn : Depends: libpkcs11-helper1 (>= 1.11) but it is not installable
           Recommends: easy-rsa but it is not installable
E: Unable to correct problems, you have held broken packages.

Code: Select all

:~# apt-get install libpkcs11-helper1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libpkcs11-helper1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libpkcs11-helper1' has no installation candidate

Code: Select all

:~# apt-get install easy-rsa
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package easy-rsa is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'easy-rsa' has no installation candidate
I would think i need to add something for libpkcs11-helper1 and easy-rsa...but
Pretty new to this
:)
Also i see easy-rsa is 2.2.2, how to install the latest from openvpn/github?

Some pointers appreciated,
Pippin

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN & Debian Stretch

Post by TinCanTech » Mon Dec 04, 2017 3:52 pm

Works for me:

Code: Select all

Linux deb9 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Dec  4 15:35:20 2017
root@deb9:~# 
root@deb9:~# 
root@deb9:~# apt-get update
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [63.0 kB]                                     
Ign:2 http://debian-archive.trafficmanager.net/debian stretch InRelease                                                  
Get:3 http://debian-archive.trafficmanager.net/debian stretch-updates InRelease [91.0 kB]
Hit:4 http://debian-archive.trafficmanager.net/debian stretch Release
Get:5 http://security.debian.org/debian-security stretch/updates/main Sources [87.7 kB]
Get:7 http://debian-archive.trafficmanager.net/debian stretch-updates/main Sources.diff/Index [1,720 B]
Get:8 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [232 kB]
Get:9 http://debian-archive.trafficmanager.net/debian stretch-updates/main amd64 Packages.diff/Index [1,720 B]
Get:10 http://debian-archive.trafficmanager.net/debian stretch-updates/main Translation-en.diff/Index [1,720 B]
Get:11 http://debian-archive.trafficmanager.net/debian stretch-updates/main Sources 2017-10-26-2029.42.pdiff [1,345 B]
Get:12 http://debian-archive.trafficmanager.net/debian stretch-updates/main amd64 Packages 2017-10-26-2029.42.pdiff [871 B]
Get:11 http://debian-archive.trafficmanager.net/debian stretch-updates/main Sources 2017-10-26-2029.42.pdiff [1,345 B]
Get:12 http://debian-archive.trafficmanager.net/debian stretch-updates/main amd64 Packages 2017-10-26-2029.42.pdiff [871 B]
Get:13 http://debian-archive.trafficmanager.net/debian stretch-updates/main Translation-en 2017-10-26-2029.42.pdiff [544 B]
Get:13 http://debian-archive.trafficmanager.net/debian stretch-updates/main Translation-en 2017-10-26-2029.42.pdiff [544 B]
Get:14 http://security.debian.org/debian-security stretch/updates/main Translation-en [97.3 kB]
Fetched 579 kB in 11s (48.4 kB/s)                            
Reading package lists... Done
root@deb9:~# cd /etc/apt/sources.list.d
root@deb9:/etc/apt/sources.list.d# ls -l
total 0
root@deb9:/etc/apt/sources.list.d# echo "deb http://build.openvpn.net/debian/openvpn/release/2.4 stretch main" > openvpn-aptrepo.list
root@deb9:/etc/apt/sources.list.d# wget -O - https://swupdate.openvpn.net/repos/repo-public.gpg|apt-key add -
--2017-12-04 15:39:35--  https://swupdate.openvpn.net/repos/repo-public.gpg
Resolving swupdate.openvpn.net (swupdate.openvpn.net)... 104.20.194.50, 104.20.195.50
Connecting to swupdate.openvpn.net (swupdate.openvpn.net)|104.20.194.50|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1806 (1.8K) [binary/octet-stream]
Saving to: ‘STDOUT’

-                               100%[======================================================>]   1.76K  --.-KB/s    in 0s      

2017-12-04 15:39:41 (35.3 MB/s) - written to stdout [1806/1806]

OK
root@deb9:/etc/apt/sources.list.d# apt-get update
Ign:1 http://debian-archive.trafficmanager.net/debian stretch InRelease                 
Hit:2 http://security.debian.org/debian-security stretch/updates InRelease              
Hit:3 http://debian-archive.trafficmanager.net/debian stretch-updates InRelease      
Hit:4 http://debian-archive.trafficmanager.net/debian stretch Release                
Ign:6 http://build.openvpn.net/debian/openvpn/release/2.4 stretch InRelease
Get:7 http://build.openvpn.net/debian/openvpn/release/2.4 stretch Release [2,647 B]
Get:8 http://build.openvpn.net/debian/openvpn/release/2.4 stretch Release.gpg [512 B]
Get:9 http://build.openvpn.net/debian/openvpn/release/2.4 stretch/main amd64 Packages [984 B]
Fetched 4,143 B in 16s (255 B/s)
Reading package lists... Done
root@deb9:/etc/apt/sources.list.d# cd /etc
root@deb9:/etc# apt-get install openvpn
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  easy-rsa libccid liblzo2-2 libpcsclite1 libpkcs11-helper1 libusb-1.0-0 opensc opensc-pkcs11 pcscd
Suggested packages:
  pcmciautils resolvconf
The following NEW packages will be installed:
  easy-rsa libccid liblzo2-2 libpcsclite1 libpkcs11-helper1 libusb-1.0-0 opensc opensc-pkcs11 openvpn pcscd
0 upgraded, 10 newly installed, 0 to remove and 11 not upgraded.
Need to get 2,144 kB of archives.
After this operation, 5,950 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://build.openvpn.net/debian/openvpn/release/2.4 stretch/main amd64 openvpn amd64 2.4.4-stretch0 [508 kB]
Get:2 http://debian-archive.trafficmanager.net/debian stretch/main amd64 liblzo2-2 amd64 2.08-1.2+b2 [55.0 kB]
Get:3 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libpcsclite1 amd64 1.8.20-1 [56.5 kB]                
Get:4 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libpkcs11-helper1 amd64 1.21-1 [46.6 kB]             
Get:5 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libusb-1.0-0 amd64 2:1.0.21-1 [53.9 kB]              
Get:6 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libccid amd64 1.4.26-1 [314 kB]                      
Get:7 http://debian-archive.trafficmanager.net/debian stretch/main amd64 pcscd amd64 1.8.20-1 [95.9 kB]                       
Get:8 http://debian-archive.trafficmanager.net/debian stretch/main amd64 easy-rsa all 2.2.2-2 [17.2 kB]                       
Get:9 http://debian-archive.trafficmanager.net/debian stretch/main amd64 opensc-pkcs11 amd64 0.16.0-3 [751 kB]                
Get:10 http://debian-archive.trafficmanager.net/debian stretch/main amd64 opensc amd64 0.16.0-3 [246 kB]                      
Fetched 2,144 kB in 13s (155 kB/s)                                                                                            
Preconfiguring packages ...
Selecting previously unselected package liblzo2-2:amd64.
(Reading database ... 37221 files and directories currently installed.)
Preparing to unpack .../0-liblzo2-2_2.08-1.2+b2_amd64.deb ...
Unpacking liblzo2-2:amd64 (2.08-1.2+b2) ...
Selecting previously unselected package libpcsclite1:amd64.
Preparing to unpack .../1-libpcsclite1_1.8.20-1_amd64.deb ...
Unpacking libpcsclite1:amd64 (1.8.20-1) ...
Selecting previously unselected package libpkcs11-helper1:amd64.
Preparing to unpack .../2-libpkcs11-helper1_1.21-1_amd64.deb ...
Unpacking libpkcs11-helper1:amd64 (1.21-1) ...
Selecting previously unselected package libusb-1.0-0:amd64.
Preparing to unpack .../3-libusb-1.0-0_2%3a1.0.21-1_amd64.deb ...
Unpacking libusb-1.0-0:amd64 (2:1.0.21-1) ...
Selecting previously unselected package openvpn.
Preparing to unpack .../4-openvpn_2.4.4-stretch0_amd64.deb ...
Unpacking openvpn (2.4.4-stretch0) ...
Selecting previously unselected package libccid.
Preparing to unpack .../5-libccid_1.4.26-1_amd64.deb ...
Unpacking libccid (1.4.26-1) ...
Selecting previously unselected package pcscd.
Preparing to unpack .../6-pcscd_1.8.20-1_amd64.deb ...
Unpacking pcscd (1.8.20-1) ...
Selecting previously unselected package easy-rsa.
Preparing to unpack .../7-easy-rsa_2.2.2-2_all.deb ...
Unpacking easy-rsa (2.2.2-2) ...
Selecting previously unselected package opensc-pkcs11:amd64.
Preparing to unpack .../8-opensc-pkcs11_0.16.0-3_amd64.deb ...
Unpacking opensc-pkcs11:amd64 (0.16.0-3) ...
Selecting previously unselected package opensc.
Preparing to unpack .../9-opensc_0.16.0-3_amd64.deb ...
Unpacking opensc (0.16.0-3) ...
Setting up libpcsclite1:amd64 (1.8.20-1) ...
Setting up libpkcs11-helper1:amd64 (1.21-1) ...
Setting up opensc-pkcs11:amd64 (0.16.0-3) ...
Setting up libusb-1.0-0:amd64 (2:1.0.21-1) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for systemd (232-25+deb9u1) ...
Setting up easy-rsa (2.2.2-2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libccid (1.4.26-1) ...
Setting up liblzo2-2:amd64 (2.08-1.2+b2) ...
Setting up opensc (0.16.0-3) ...
Setting up pcscd (1.8.20-1) ...
Created symlink /etc/systemd/system/sockets.target.wants/pcscd.socket → /lib/systemd/system/pcscd.socket.
Setting up openvpn (2.4.4-stretch0) ...
[ ok ] Restarting virtual private network daemon.:.
Created symlink /etc/systemd/system/multi-user.target.wants/openvpn.service → /lib/systemd/system/openvpn.service.
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for systemd (232-25+deb9u1) ...
root@deb9:/etc# 
Make sure you have setup /etc/apt/sources.list .. eg:

Code: Select all

root@deb9:/etc/apt# cat sources.list
# 

# deb cdrom:[Debian GNU/Linux 9.2.0 _Stretch_ - Official amd64 NETINST 20171007-12:09]/ stretch main

#deb cdrom:[Debian GNU/Linux 9.2.0 _Stretch_ - Official amd64 NETINST 20171007-12:09]/ stretch main

deb http://debian-archive.trafficmanager.net/debian/ stretch main
deb-src http://debian-archive.trafficmanager.net/debian/ stretch main

deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main

# stretch-updates, previously known as 'volatile'
deb http://debian-archive.trafficmanager.net/debian/ stretch-updates main
deb-src http://debian-archive.trafficmanager.net/debian/ stretch-updates main
Pippin wrote:
Mon Dec 04, 2017 3:28 pm
Also i see easy-rsa is 2.2.2, how to install the latest from openvpn/github?
Surprised you have not got this on a bookmark:
https://github.com/OpenVPN/easy-rsa/releases
Pippin wrote:
Mon Dec 04, 2017 3:28 pm
and possibly switch to Linux completely in the future
Good idea ;) I went for Linux Mint.

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: OpenVPN & Debian Stretch

Post by Pippin » Mon Dec 04, 2017 7:06 pm

sources.list looked like this:

Code: Select all

# deb cdrom:[Debian GNU/Linux 9.2.1 _Stretch_ - Official amd64 DVD Binary-1 20171013-13:09]/ stretch main contrib 

# Line commented out by installer because it failed to verify:
deb http://security.debian.org/debian-security/ stretch/updates contrib main  
# Line commented out by installer because it failed to verify:
deb-src http://security.debian.org/debian-security/ stretch/updates contrib main  

# stretch-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
deb http://deb.debian.org/debian/ stretch-updates contrib main  
deb-src http://deb.debian.org/debian/ stretch-updates contrib main  
sources.list.d/openvpn-aptrepo.list:

Code: Select all

deb http://build.openvpn.net/debian/openvpn/release/2.4/ stretch main 
Copied only your sources.list and now it installed :)
Don`t know why the original did not work...

Next hurdle is that Add a VPN connection is not working, Choose a VPN connection type window only shows Cancel button click-able.

With regards to easy-rsa, i never looked before because i always use XCA, it`s so convenient :mrgreen:

Practicing search-vodoo now :)

Thanks.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN & Debian Stretch

Post by TinCanTech » Mon Dec 04, 2017 7:13 pm

Pippin wrote:
Mon Dec 04, 2017 7:06 pm
Next hurdle is that Add a VPN connection is not working, Choose a VPN connection type window only shows Cancel button click-able.
If that is Network-Manager then don't use it .. with debian 9 you have systemd which does a much better job. Of course that all depends on what you want, what you are used to and what actually works .. and being new to Linux is a hurdle in itself .. good luck 8-)

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: OpenVPN & Debian Stretch

Post by Pippin » Mon Dec 04, 2017 8:00 pm

Thanks, ok will look for systemd.
Not completely new but new enough to not know a lot of things :)
I`m used to modifying a linux based NAS not using linux daily as a laptop/desktop.

I`ll see how far i`ll come...starting with some tutorials here and there.
Cheers

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: OpenVPN & Debian Stretch

Post by Pippin » Tue Dec 05, 2017 3:27 pm

Ok, running now.
Added update-resolve-conf script to make DNS work but it didn`t, however could ping IP`s.
Found out i had to first install resolvconf package and working now.

Got update-resolv-conf from here:
https://github.com/masterkorp/openvpn-u ... esolv-conf

Also took a look at
https://github.com/jonathanio/update-systemd-resolved
but looks like a step too much for me at the moment and it`s working now :)

Post Reply