Hallo,
Ich möchte eine Mullvad VPN Verbindung herstellen und nutze dafür diese Wiki-Seite
https://wiki.archlinux.org/index.php/Mullvad, wobei ich den Weg über systemd gehe.
Alle Schritte funktionieren soweit auch, mit Ausnahme des Letzten, dem Aktivieren via systemd.
[root@arch]# sudo systemctl start openvpn-client@mullvad.service
Job for openvpn-client@mullvad.service failed because the control process exited with error code.
See "systemctl status openvpn-client@mullvad.service" and "journalctl -xe" for details.
[root@arch]#
Wobei sich in den Logs (journalctl -xe) dieser Fehler findet:
The job identifier is 2053.
Oct 18 09:34:26 arch openvpn[6112]: Note: option tun-ipv6 is ignored because modern operating systems do not need special IPv6 tun handling anymore.
Oct 18 09:34:26 arch openvpn[6112]: Options error: --up script fails with '/etc/openvpn/update-resolv-conf': Permission denied (errno=13)
Oct 18 09:34:26 arch [6112]: Options error: Please correct this error.
Oct 18 09:34:26 arch openvpn[6112]: Use --help for more information.
Oct 18 09:34:26 arch systemd[1]: openvpn-client@mullvad.service: Main process exited, code=exited, status=1/FAILURE
Subject: Unit process exited
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
An ExecStart= process belonging to unit openvpn-client@mullvad.service has exited.
The process' exit code is 'exited' and its exit status is 1.
Oct 18 09:34:26 arch systemd[1]: openvpn-client@mullvad.service: Failed with result 'exit-code'.
Subject: Unit failed
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
The unit openvpn-client@mullvad.service has entered the 'failed' state with result 'exit-code'.
Oct 18 09:34:26 arch systemd[1]: Failed to start OpenVPN tunnel for mullvad.
Subject: A start job for unit openvpn-client@mullvad.service has failed
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
A start job for unit openvpn-client@mullvad.service has finished with a failure
Die Datei ist vorhanden:
[root@arch client]# ls -la '/etc/openvpn/'
total 20
drwxr-xr-x 4 root root 4096 Oct 18 09:15 .
drwxr-xr-x 101 root root 4096 Oct 18 09:13 ..
drwxr-x--- 2 root network 4096 Oct 18 09:15 client
drwxr-x--- 2 root network 4096 Apr 20 22:54 server
-rw-r--r-- 1 root root 1301 Oct 18 06:40 update-resolv-conf
Und mit folgendem Inhalt befüllt:
[root@arch client]# cat '/etc/openvpn/update-resolv-conf'
#!/bin/bash
#
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood and Chris Hanson.
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.
#
# Example envs set from openvpn:
#
# foreign_option_1='dhcp-option DNS 193.43.27.132'
# foreign_option_2='dhcp-option DNS 193.43.27.133'
# foreign_option_3='dhcp-option DOMAIN be.bnc.ch'
#
[ -x /sbin/resolvconf ] || exit 0
[ "$script_type" ] || exit 0
[ "$dev" ] || exit 0
split_into_parts()
{
part1="$1"
part2="$2"
part3="$3"
}
case "$script_type" in
up)
NMSRVRS=""
SRCHS=""
for optionvarname in ${!foreign_option_*} ; do
option="${!optionvarname}"
echo "$option"
split_into_parts $option
if [ "$part1" = "dhcp-option" ] ; then
if [ "$part2" = "DNS" ] ; then
NMSRVRS="${NMSRVRS:+$NMSRVRS }$part3"
elif [ "$part2" = "DOMAIN" ] ; then
SRCHS="${SRCHS:+$SRCHS }$part3"
fi
fi
done
R=""
[ "$SRCHS" ] && R="search $SRCHS
"
for NS in $NMSRVRS ; do
R="${R}nameserver $NS
"
done
echo -n "$R" | /sbin/resolvconf -a "${dev}.openvpn"
;;
down)
/sbin/resolvconf -d "${dev}.openvpn"
;;
esac
PS:
[root@arch openvpn]# ls '/etc/openvpn/client/'
mullvad_ca.crt mullvad.conf mullvad_userpass.txt
Über Lösungsvorschläge würde ich mich sehr freuen 🙂
_________
Administrativ auf gelöst gesetzt