Description of problem: Since the last update of fortinet client this will happens. SELinux is preventing openfortivpn from 'write' accesses on the Datei resolv.conf. ***** Plugin catchall (100. confidence) suggests ************************** Wenn Sie denken, dass es openfortivpn standardmäßig erlaubt sein sollte, write Zugriff auf resolv.conf file zu erhalten. Then sie sollten dies als Fehler melden. Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen. Do zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen: # ausearch -c 'openfortivpn' --raw | audit2allow -M my-openfortivpn # semodule -X 300 -i my-openfortivpn.pp Additional Information: Source Context system_u:system_r:openfortivpn_t:s0 Target Context system_u:object_r:net_conf_t:s0 Target Objects resolv.conf [ file ] Source openfortivpn Source Path openfortivpn Port <Unbekannt> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.14.3-53.fc30.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 5.3.16-200.fc30.x86_64 #1 SMP Fri Dec 13 17:48:38 UTC 2019 x86_64 x86_64 Alert Count 1 First Seen 2020-01-05 19:45:50 CET Last Seen 2020-01-05 19:45:50 CET Local ID cb92c9ce-13e6-446f-86af-037d214eddd0 Raw Audit Messages type=AVC msg=audit(1578249950.299:246): avc: denied { write } for pid=7840 comm="openfortivpn" name="resolv.conf" dev="tmpfs" ino=54438 scontext=system_u:system_r:openfortivpn_t:s0 tcontext=system_u:object_r:net_conf_t:s0 tclass=file permissive=0 Hash: openfortivpn,openfortivpn_t,net_conf_t,file,write Version-Release number of selected component: selinux-policy-3.14.3-53.fc30.noarch Additional info: component: selinux-policy reporter: libreport-2.11.3 hashmarkername: setroubleshoot kernel: 5.3.16-200.fc30.x86_64 type: libreport
Similar problem has been detected: When I enabled VPN, this AVC occured. hashmarkername: setroubleshoot kernel: 5.3.16-200.fc30.x86_64 package: selinux-policy-3.14.3-53.fc30.noarch reason: SELinux is preventing openfortivpn from 'write' accesses on the file /etc/resolv.conf. type: libreport
*** Bug 1788829 has been marked as a duplicate of this bug. ***
Similar problem has been detected: Attivando la vpn basata su fortinet hashmarkername: setroubleshoot kernel: 5.4.8-200.fc31.x86_64 package: selinux-policy-3.14.4-43.fc31.noarch reason: SELinux is preventing openfortivpn from 'write' accesses on the file /etc/resolv.conf. type: libreport
Similar problem has been detected: Connected a VPN based on Forticlient hashmarkername: setroubleshoot kernel: 5.4.10-200.fc31.x86_64 package: selinux-policy-3.14.4-43.fc31.noarch reason: SELinux is preventing openfortivpn from 'write' accesses on the file /etc/resolv.conf. type: libreport
Similar problem has been detected: Opened a fortivpn connection via the GNOME applet hashmarkername: setroubleshoot kernel: 5.4.12-200.fc31.x86_64 package: selinux-policy-3.14.4-44.fc31.noarch reason: SELinux is preventing openfortivpn from 'write' accesses on the file /etc/resolv.conf. type: libreport
commit f518d93075d1400fd34757cbb11f45766518ed59 (HEAD -> rawhide, origin/rawhide, origin/HEAD) Author: Nikola Knazekova <nknazeko> Date: Mon Jan 13 17:00:57 2020 +0100 Allow openfortivpn_t to manage net_conf_t files. Allow openfortivpn — client for PPP+SSL VPN tunnel services, to manage network config files. /etc/resolv.conf labeled as net_conf_t is used by openfortivpn for adding DNS name servers. Fixed Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1787944 commit 1a51196803354916c8655bce4431deabd80b50a0 Author: Nikola Knazekova <nknazeko> Date: Mon Jan 13 16:59:17 2020 +0100 Introduce boolean openfortivpn_can_network_connect. Boolean openfortivpn_can_network_connect is by default enabled and determines whether openfortivpn can connect to the TCP network.
FEDORA-2020-cde9529d3d has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-cde9529d3d
selinux-policy-3.14.3-57.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-cde9529d3d
FEDORA-2020-cde9529d3d has been pushed to the Fedora 30 stable repository. If problem still persists, please make note of it in this bug report.
I'm having the same problem
Rafael, What is your selinux-policy package version? Is the AVC denial the same as reported in this BZ?
selinux-policy-3.14.4-50.fc31.noarch
[reuber@stormy ~]$ journalctl -f -- Logs begin at Mon 2019-12-09 06:03:32 -03. -- ... abr 28 13:48:01 stormy.example.com geoclue[7467]: Failed to query location: Error resolving “location.services.mozilla.com”: Nome ou serviço desconhecido abr 28 13:48:01 stormy.example.com NetworkManager[933]: <info> [1588092481.9940] audit: op="connection-activate" uuid="34638d8f-9b52-4d2d-b4b4-203722702687" name="vpn.unimedfortaleza.com.br" pid=7398 uid=1000 result="success" abr 28 13:48:01 stormy.example.com NetworkManager[933]: <info> [1588092481.9989] vpn-connection[0x55d12e7f8360,34638d8f-9b52-4d2d-b4b4-203722702687,"vpn.unimedfortaleza.com.br",0]: Started the VPN service, PID 16485 abr 28 13:48:02 stormy.example.com NetworkManager[933]: <info> [1588092482.0080] vpn-connection[0x55d12e7f8360,34638d8f-9b52-4d2d-b4b4-203722702687,"vpn.unimedfortaleza.com.br",0]: Saw the service appear; activating connection abr 28 13:48:02 stormy.example.com NetworkManager[933]: <info> [1588092482.0646] vpn-connection[0x55d12e7f8360,34638d8f-9b52-4d2d-b4b4-203722702687,"vpn.unimedfortaleza.com.br",0]: VPN plugin: state changed: starting (3) abr 28 13:48:02 stormy.example.com NetworkManager[933]: <info> [1588092482.0646] vpn-connection[0x55d12e7f8360,34638d8f-9b52-4d2d-b4b4-203722702687,"vpn.unimedfortaleza.com.br",0]: VPN connection: (ConnectInteractive) reply received abr 28 13:48:02 stormy.example.com audit[16492]: AVC avc: denied { read } for pid=16492 comm="openfortivpn" name="resolv.conf" dev="dm-0" ino=655703 scontext=system_u:system_r:openfortivpn_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=0 abr 28 13:48:02 stormy.example.com NetworkManager[933]: ERROR: getaddrinfo: Name or service not known abr 28 13:48:02 stormy.example.com NetworkManager[933]: INFO: Closed connection to gateway. abr 28 13:48:02 stormy.example.com NetworkManager[933]: ERROR: connect: Connection refused abr 28 13:48:02 stormy.example.com NetworkManager[933]: INFO: Could not log out. abr 28 13:48:02 stormy.example.com NetworkManager[933]: <warn> [1588092482.0675] vpn-connection[0x55d12e7f8360,34638d8f-9b52-4d2d-b4b4-203722702687,"vpn.unimedfortaleza.com.br",0]: VPN plugin: failed: connect-failed (1) abr 28 13:48:02 stormy.example.com NetworkManager[933]: <warn> [1588092482.0675] vpn-connection[0x55d12e7f8360,34638d8f-9b52-4d2d-b4b4-203722702687,"vpn.unimedfortaleza.com.br",0]: VPN plugin: failed: connect-failed (1) abr 28 13:48:02 stormy.example.com NetworkManager[933]: <info> [1588092482.0676] vpn-connection[0x55d12e7f8360,34638d8f-9b52-4d2d-b4b4-203722702687,"vpn.unimedfortaleza.com.br",0]: VPN plugin: state changed: stopping (5) abr 28 13:48:02 stormy.example.com NetworkManager[933]: <info> [1588092482.0680] vpn-connection[0x55d12e7f8360,34638d8f-9b52-4d2d-b4b4-203722702687,"vpn.unimedfortaleza.com.br",0]: VPN plugin: state changed: stopped (6) abr 28 13:48:02 stormy.example.com NetworkManager[933]: <info> [1588092482.0709] vpn-connection[0x55d12e7f8360,34638d8f-9b52-4d2d-b4b4-203722702687,"vpn.unimedfortaleza.com.br",0]: VPN service disappeared
Rafael, in your case the there is a denial on accessing resolv.conf with the user_home_t type that is assigned to files in user's home directory. The path is not logged, but in case it was /etc, you can fix the type with: ls -lZ /etc/resolv.conf restorecon -v /etc/resolv.conf