1

Since I reinstalled my ArchLinux distro I get an error when I want to use OpenVPN. Here is the full output:

quentin@QuentinDesktop ~/Documents> openvpn --config ulille-vpn.ovpn
2022-01-04 21:52:15 WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
2022-01-04 21:52:15 WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
Options error: --up script fails with '/etc/openvpn/update-systemd-resolved': No such file or directory (errno=2)
Options error: Please correct this error.
Use --help for more information.

Here is the truncated ulille-vpn.ovpn file content (I just truncated the CA certificates):

ignore-unknown-option comp-lzo compress
dev tun
persist-tun
persist-key
cipher AES-256-CBC
tls-client
client
resolv-retry infinite
proto udp
remote vpn-etudiant.univ-lille.fr 443
verify-x509-name "vpn-etudiant.univ-lille.fr" name
auth SHA256
auth-user-pass
comp-lzo
compress lzo
#route-nopull
verb 3


pull-filter ignore "dhcp-option DOMAIN"
dhcp-option DOMAIN univ-lille.fr
dhcp-option DOMAIN univ-lille1.fr
script-security 2
setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
up /etc/openvpn/update-systemd-resolved
up-restart
down /etc/openvpn/update-systemd-resolved
down-pre

Note that I didn't write this one myself, it is given by my university to access its local network.

I already tried to install the openvpn-update-systemd-resolved AUR package and enable it on systemd but it changed nothing.

How can I fix it ?

4 Answers 4

4

Okay, after a quick looking at the configuration file (what I did not think before asking this question), I commented the last 4 lines of the chunk I posted, and it works !

I am sorry for asking this question, I though the config file my university distributes was valid but it looks like it is Fedora/Debian specific, which is kind of weird because it works perfectly fine without these four lines.

I hope this short lifespan topic can help someone else in a similar case ! :^)

Sign up to request clarification or add additional context in comments.

1 Comment

This is not an answer, and it shuoldn't be the preferred solution. Of course if you comment out "up /etc/openvpn/update-systemd-resolved" it starts working, but why? In my case it was apparmor.
2

I've experienced the very same issue on my home computer, while the office computer had no problems. In my case, I did not need to modify the certificate.

First, I suggest to re-download the certificate and verify its integrity via checksum. Then, install the following:

sudo apt install openvpn-systemd-resolved

Comments

1

I had the very same problem and it was also the config file trying to run up /etc/openvpn/update-systemd-resolved. Seems to be a distro problem as I'm also running arch.

2 Comments

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
The worst thing is that my config file works perfectly without its 4 problematic lines, I contacted the informatic department of my university and they told me they didn't have to manage for some "esoteric" (?) distro user while it literally costs nothing to them to change it as it doesn't break the config...
0

In my case the issues was caused by apparmor.

In order to fix it, as root user, I ran aa-complain openvpn (openvpn was already defined under /etc/apparmor.d/)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.