Message-ID: <43eeed40-b1e6-798b-038c-d69febfbd77e@...2181...> Date: Tue, 29 Mar 2022 13:50:33 +0200 MIME-Version: 1.0 Content-Language: en-US References: <046f2279-a275-aa18-40d9-9808512a6651@...2669...> From: Antonio Quartulli In-Reply-To: Subject: Re: [Openvpn-devel] [ovpn-dco] can not delete tun interface automatically if option "user nobody" is used List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: Gert Doering , Timo Rothenpieler Cc: openvpn-devel@lists.sourceforge.net Hi, On 29/03/2022 13:05, Gert Doering wrote: > @Antonio, we should really investigate that capability stuff :-) I think this was already discussed somewhere else in the past. To talk to the netlink API the NET_ADMIN capability is required - no need to be root. Therefore, just grant this capability to the binary with: setcap cap_net_admin+eip /usr/sbin/openvpn and then launch it with any user you want (no need to launch as root and then drop to user nobody, unless there are other reasons for doing so). Just tested here a few minutes ago. Cheers, -- Antonio Quartulli