[qbittorrent] Mullvad vpn : udp4 permission denied

Description
Long-time user. Addon doesn't start after the 4.6.2 updates. I did read the breaking changes but fail to see what I need to do.  I see the info about required password but the migration script did not add any. Tried adding QBT_PASSWORD: homeassistant into the config, to no avail. I use network SMB share and Mullvad VPN, have for years. HA 2023.12.1 as a Proxmox VM.
Reproduction steps
1. start addon

Addon Logs
2023-12-11 05:16:22 [INFO] Starting OpenVPN...
--------------------
2023-12-11 05:16:22 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations.
2023-12-11 05:16:22 WARNING: file '/config/openvpn/mullvad_cz_prg_credentials.conf' is group or others accessible
2023-12-11 05:16:22 OpenVPN 2.6.5 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2023-12-11 05:16:22 library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2023-12-11 05:16:22 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-11 05:16:22 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 05:16:22 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-11 05:16:22 UDPv4 link local: (not bound)
2023-12-11 05:16:22 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 05:16:22 TLS: Initial packet from [AF_INET]<IP_ADDRESS>:1301, sid=7d24ce38 94fb0e7a
2023-12-11 05:16:22 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-11 05:16:22 VERIFY OK: depth=2, C=SE, ST=Gotaland, L=Gothenburg, O=Amagicom AB, OU=Mullvad, CN=Mullvad Root CA v2<EMAIL_ADDRESS>2023-12-11 05:16:22 VERIFY OK: depth=1, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=Mullvad Intermediate CA v6<EMAIL_ADDRESS>2023-12-11 05:16:22 VERIFY KU OK
2023-12-11 05:16:22 Validating certificate extended key usage
2023-12-11 05:16:22 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-11 05:16:22 VERIFY EKU OK
2023-12-11 05:16:22 VERIFY OK: depth=0, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=cz-prg-ovpn-101.mullvad.net<EMAIL_ADDRESS>2023-12-11 05:16:22 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-12-11 05:16:22 [cz-prg-ovpn-101.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:1301
2023-12-11 05:16:22 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-11 05:16:22 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-11 05:16:23 SENT CONTROL [cz-prg-ovpn-101.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-11 05:16:24 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:1301::1002/64 fdda:d0d0:cafe:1301::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 2,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-11 05:16:24 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-11 05:16:24 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-11 05:16:24 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-11 05:16:24 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-11 05:16:24 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:1301::1002/64 fdda:d0d0:cafe:1301::'
2023-12-11 05:16:24 OPTIONS IMPORT: --socket-flags option modified
2023-12-11 05:16:24 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-11 05:16:24 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-11 05:16:24 OPTIONS IMPORT: route options modified
2023-12-11 05:16:24 OPTIONS IMPORT: route-related options modified
2023-12-11 05:16:24 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-11 05:16:24 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-11 05:16:24 ROUTE_GATEWAY <IP_ADDRESS>/<IP_ADDRESS> IFACE=eth0 HWADDR=02:42:ac:1e:21:05
2023-12-11 05:16:24 TUN/TAP device tun0 opened
2023-12-11 05:16:24 /sbin/ip link set dev tun0 up mtu 1500
2023-12-11 05:16:24 /sbin/ip link set dev tun0 up
2023-12-11 05:16:24 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-11 05:16:24 /sbin/ip route add <IP_ADDRESS>/32 via <IP_ADDRESS>
2023-12-11 05:16:24 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-11 05:16:24 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-11 05:16:24 Initialization Sequence Completed
2023-12-11 05:16:24 Data Channel: cipher 'AES-256-GCM', peer-id: 2
2023-12-11 05:16:24 Timers: ping 10, ping-restart 60
2023-12-11 05:16:24 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-11 05:16:25 [INFO] Adding localhost as route via docker eth0
2023-12-11 05:16:25 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-11 05:16:25 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-11 05:16:25 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-11 05:16:25 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-11 05:16:25 [INFO] Adding additional incoming port 59595 for eth0
2023-12-11 05:16:25 [INFO] Adding additional incoming port 6882 for eth0
2023-12-11 05:16:25 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-11 05:16:25 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-11 05:16:25 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-11 05:16:25 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-11 05:16:25 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 90-dns_set.sh: executing...
2023-12-11 05:16:25 write UDPv4 []: Operation not permitted (fd=3,code=1)
[05:16:35] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
2023-12-11 05:16:35 write UDPv4 []: Operation not permitted (fd=3,code=1)
[05:16:45] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
2023-12-11 05:16:45 write UDPv4 []: Operation not permitted (fd=3,code=1)
[05:16:55] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
[05:16:55] WARNING: No valid DNS were found. Using default router (or HA) dns servers.
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing...
2023-12-11 05:16:55 write UDPv4 []: Operation not permitted (fd=3,code=1)
[05:16:55] INFO: Downloads can be found in /mnt/Public/Downloads
2023-12-11 05:17:06 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-11 05:17:16 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-11 05:17:24 [cz-prg-ovpn-101.mullvad.net] Inactivity timeout (--ping-restart), restarting
2023-12-11 05:17:24 SIGUSR1[soft,ping-restart] received, process restarting
2023-12-11 05:17:24 Restart pause, 1 second(s)
2023-12-11 05:17:25 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-11 05:17:25 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 05:17:25 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-11 05:17:25 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-11 05:17:25 UDPv4 link local: (not bound)
2023-12-11 05:17:25 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 05:17:25 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-11 05:17:28 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-11 05:17:32 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-11 05:17:40 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-11 05:17:56 write UDPv4 []: Operation not permitted (fd=3,code=1)

### Architecture

amd64

### OS

Virtual Machine

Yeah, the issue is that the backups do not work as the new version shuffles files and directories around :)

Yes... this is due to HomeAssistant way of handling config folders... Mmh I'll see how to solve that ASAP. Probably keep the new folders structure (that is the long term solution) but move back to previous upstream container to have a fast solution

Ok, so the initial error is with ping -c 1 "<IP_ADDRESS>" &> /dev/null. This seems to mean that internet is not reachable.
Would you have time to do a test for me? In my Filebrowser addon, open /addon_configs/db21ed7f_qbittorrent/, add a file named qbittorrent.sh with the content below, and reboot. It should appear at top of your log : to see if internet being inaccessible is due to the container itself or the code. Thanks!!!
#!/bin/bash
echo "ping"
ping -c 1 <IP_ADDRESS>

This is quite frustrating I tested on 3 machines (hyperV VM amd64 ; rpi4 aarch64 ; devcontainer) and they all worked with the below log :
[cont-init.d] 01-custom_script.sh: exited 0.
[cont-init.d] 01-environment.sh: executing...
2023-12-11 15:40:39 [INFO] LAN_NETWORK defined as 'localhost,<IP_ADDRESS>,<IP_ADDRESS>/16,<IP_ADDRESS>/16'
2023-12-11 15:40:39 [INFO] Docker network defined as <IP_ADDRESS>/23
2023-12-11 15:40:39 [INFO] PUID defined as 0
2023-12-11 15:40:39 [INFO] PGID defined as 0
2023-12-11 15:40:39 [INFO] An user with PUID 0 already exists in /etc/passwd, nothing to do.
2023-12-11 15:40:39 [INFO] VPN_ENABLED defined as 'yes'
2023-12-11 15:40:39 [INFO] VPN_TYPE defined as 'openvpn'
2023-12-11 15:40:39 [WARNING] NAME_SERVERS not defined (via -e NAME_SERVERS), defaulting to CloudFlare and Google name servers
2023-12-11 15:40:39 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-11 15:40:39 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-11 15:40:39 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-11 15:40:39 [INFO] Adding <IP_ADDRESS> to resolv.conf
[cont-init.d] 01-environment.sh: exited 0.
[cont-init.d] 02-vpn.sh: executing...
2023-12-11 15:40:39 [INFO] Choosen VPN config: 'Netherlands_freeopenvpn_tcp.ovpn'
2023-12-11 15:40:39 [INFO] Using credentials from /config/openvpn/Netherlands_freeopenvpn_tcp_credentials.conf
dos2unix: converting file /config/openvpn/Netherlands_freeopenvpn_tcp.ovpn to Unix format...
2023-12-11 15:40:39 [INFO] VPN remote line defined as 'nl1.freeopenvpn.org 433 tcp-client'
2023-12-11 15:40:39 [INFO] VPN_REMOTE defined as 'nl1.freeopenvpn.org'
2023-12-11 15:40:39 [INFO] VPN_PORT defined as '433'
2023-12-11 15:40:39 [INFO] VPN_PROTOCOL defined as 'tcp-client'
2023-12-11 15:40:39 [INFO] VPN_DEVICE_TYPE defined as 'tun0'
2023-12-11 15:40:39 [INFO] Starting OpenVPN...
--------------------
2023-12-11 15:40:39 WARNING: file '/config/openvpn/Netherlands_freeopenvpn_tcp_credentials.conf' is group or others accessible
2023-12-11 15:40:39 OpenVPN 2.6.5 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2023-12-11 15:40:39 library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2023-12-11 15:40:39 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-11 15:40:39 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:433
2023-12-11 15:40:39 Attempting to establish TCP connection with [AF_INET]<IP_ADDRESS>:433
2023-12-11 15:40:39 TCP connection established with [AF_INET]<IP_ADDRESS>:433
2023-12-11 15:40:39 TCPv4_CLIENT link local: (not bound)
2023-12-11 15:40:39 TCPv4_CLIENT link remote: [AF_INET]<IP_ADDRESS>:433
2023-12-11 15:40:39 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-11 15:40:39 VERIFY OK: depth=1, O=64fb4adcd10e761180851414, CN=64fb4adcd10e761180851418
2023-12-11 15:40:39 NOTE: --mute triggered...
2023-12-11 15:40:39 6 variation(s) on previous 3 message(s) suppressed by --mute
2023-12-11 15:40:39 [64fb4aded10e761180851426] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:433
2023-12-11 15:40:52 TUN/TAP device tun0 opened
2023-12-11 15:40:52 /sbin/ip link set dev tun0 up mtu 1500
2023-12-11 15:40:52 /sbin/ip link set dev tun0 up
2023-12-11 15:40:52 /sbin/ip addr add dev tun0 <IP_ADDRESS>/24
2023-12-11 15:40:52 Initialization Sequence Completed
2023-12-11 15:40:52 Data Channel: cipher 'AES-128-GCM', peer-id: 0, compression: 'stub'
2023-12-11 15:40:52 NOTE: --mute triggered...
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-11 15:40:52 [INFO] Adding localhost as route via docker eth0
2023-12-11 15:40:52 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-11 15:40:52 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-11 15:40:52 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-11 15:40:52 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-11 15:40:52 [INFO] Adding additional incoming port 59595 for eth0
2023-12-11 15:40:52 [INFO] Adding additional incoming port 6882 for eth0
2023-12-11 15:40:52 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-11 15:40:52 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-11 15:40:52 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-11 15:40:52 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-11 15:40:52 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 90-dns_set.sh: executing...
[15:40:52] INFO: DNS SERVERS set to <IP_ADDRESS> <IP_ADDRESS>
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing...
[15:40:52] INFO: Downloads can be found in /share/qBittorrent
[15:40:52] INFO: Whitelisted subsets will not require a password : localhost,<IP_ADDRESS>,<IP_ADDRESS>/16,<IP_ADDRESS>/16
[15:40:52] INFO: WEBUI username set to admin
[15:40:52] INFO: Alternate UI enabled : vuetorrent. If webui don't work, disable this option
[15:40:57] INFO: Default username/password : admin/homeassistant. Please change your password on first connection
[15:40:57] INFO: Configuration can be found in /config/qBittorrent/config/
[cont-init.d] 91-qbittorrent_configuration.sh: exited 0.
[cont-init.d] 92-qbit_manage.sh: executing...
[cont-init.d] 92-qbit_manage.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2023-12-11 15:40:57 [INFO] Log file /config/qBittorrent/data/logs/qbittorrent.log doesn't exist. Creating it...
2023-12-11 15:40:57 [INFO] Logfile created. Logging to /config/qBittorrent/data/logs/qbittorrent.log
2023-12-11 15:40:57 [INFO] Trying to ping <IP_ADDRESS> and <IP_ADDRESS> over the docker interface for 500ms each...
Terminated
Terminated
2023-12-11 15:40:59 [INFO] Success: Could not connect. This means the firewall is most likely working properly.
2023-12-11 15:40:59 [INFO] qBittorrent started with PID 1464
2023-12-11 15:40:59 [INFO] HEALTH_CHECK_HOST is not set. Using default host one.one.one.one
[15:41:00] INFO: Starting NGinx...
[15:41:02] INFO: VPN is up and running with ip <IP_ADDRESS>, based in country : NL

Would you have a longer log with what happends prior to openvpn starting? I think the issue is that the local ip is not correctly detected

I've pushed a new version that removes the "route-nopull" instruction that was added by default ; please let me know if it helps

4.6.2-13wireguard_openvpn does the very same thing:
`--------------------
2023-12-11 17:38:43 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations.
2023-12-11 17:38:43 WARNING: file '/config/openvpn/mullvad_cz_prg_credentials.conf' is group or others accessible
2023-12-11 17:38:43 OpenVPN 2.6.5 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2023-12-11 17:38:43 library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2023-12-11 17:38:43 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-11 17:38:43 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 17:38:43 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-11 17:38:43 UDPv4 link local: (not bound)
2023-12-11 17:38:43 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 17:39:43 [UNDEF] Inactivity timeout (--ping-restart), restarting
2023-12-11 17:39:43 SIGUSR1[soft,ping-restart] received, process restarting
2023-12-11 17:39:43 Restart pause, 1 second(s)
2023-12-11 17:39:44 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-11 17:39:44 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 17:39:44 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-11 17:39:44 UDPv4 link local: (not bound)
2023-12-11 17:39:44 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 17:40:44 [UNDEF] Inactivity timeout (--ping-restart), restarting
2023-12-11 17:40:44 SIGUSR1[soft,ping-restart] received, process restarting
2023-12-11 17:40:44 Restart pause, 1 second(s)
2023-12-11 17:40:45 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-11 17:40:45 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 17:40:45 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-11 17:40:45 UDPv4 link local: (not bound)
2023-12-11 17:40:45 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301
2023-12-11 17:40:45 TLS: Initial packet from [AF_INET]<IP_ADDRESS>:1301, sid=d109b532 71817cee
2023-12-11 17:40:45 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-11 17:40:45 VERIFY OK: depth=2, C=SE, ST=Gotaland, L=Gothenburg, O=Amagicom AB, OU=Mullvad, CN=Mullvad Root CA v2<EMAIL_ADDRESS>2023-12-11 17:40:45 VERIFY OK: depth=1, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=Mullvad Intermediate CA v6<EMAIL_ADDRESS>2023-12-11 17:40:45 VERIFY KU OK
2023-12-11 17:40:45 Validating certificate extended key usage
2023-12-11 17:40:45 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-11 17:40:45 VERIFY EKU OK
2023-12-11 17:40:45 VERIFY OK: depth=0, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=cz-prg-ovpn-101.mullvad.net<EMAIL_ADDRESS>2023-12-11 17:40:45 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-12-11 17:40:45 [cz-prg-ovpn-101.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:1301
2023-12-11 17:40:45 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-11 17:40:45 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-11 17:40:46 SENT CONTROL [cz-prg-ovpn-101.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-11 17:40:47 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:1301::1003/64 fdda:d0d0:cafe:1301::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 3,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-11 17:40:47 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-11 17:40:47 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-11 17:40:47 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-11 17:40:47 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-11 17:40:47 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:1301::1003/64 fdda:d0d0:cafe:1301::'
2023-12-11 17:40:47 OPTIONS IMPORT: --socket-flags option modified
2023-12-11 17:40:47 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-11 17:40:47 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-11 17:40:47 OPTIONS IMPORT: route options modified
2023-12-11 17:40:47 OPTIONS IMPORT: route-related options modified
2023-12-11 17:40:47 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-11 17:40:47 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-11 17:40:47 ROUTE_GATEWAY <IP_ADDRESS>/<IP_ADDRESS> IFACE=eth0 HWADDR=02:42:ac:1e:21:05
2023-12-11 17:40:47 TUN/TAP device tun0 opened
2023-12-11 17:40:47 /sbin/ip link set dev tun0 up mtu 1500
2023-12-11 17:40:47 /sbin/ip link set dev tun0 up
2023-12-11 17:40:47 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-11 17:40:47 /sbin/ip route add <IP_ADDRESS>/32 via <IP_ADDRESS>
2023-12-11 17:40:47 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-11 17:40:47 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-11 17:40:47 Initialization Sequence Completed
2023-12-11 17:40:47 Data Channel: cipher 'AES-256-GCM', peer-id: 3
2023-12-11 17:40:47 Timers: ping 10, ping-restart 60
2023-12-11 17:40:47 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-11 17:40:48 [INFO] Adding localhost as route via docker eth0
2023-12-11 17:40:48 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-11 17:40:48 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-11 17:40:48 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-11 17:40:48 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-11 17:40:48 [WARNING] Error adding route for <IP_ADDRESS>/16. The web interface won't be reachable for the affected network
2023-12-11 17:40:48 [INFO] Adding additional incoming port 59595 for eth0
2023-12-11 17:40:48 [INFO] Adding additional incoming port 6882 for eth0
2023-12-11 17:40:48 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-11 17:40:48 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-11 17:40:48 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-11 17:40:48 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-11 17:40:48 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 90-dns_set.sh: executing...
2023-12-11 17:40:48 write UDPv4 []: Operation not permitted (fd=3,code=1)
[17:40:58] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
2023-12-11 17:40:58 write UDPv4 []: Operation not permitted (fd=3,code=1)
[17:41:08] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
2023-12-11 17:41:09 write UDPv4 []: Operation not permitted (fd=3,code=1)
[17:41:18] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
[17:41:18] WARNING: No valid DNS were found. Using default router (or HA) dns servers.
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing...
[17:41:18] INFO: Downloads can be found in /mnt/Public/Downloads
2023-12-11 17:41:19 write UDPv4 []: Operation not permitted (fd=3,code=1)`

How can I get the entire log? This is all I see in HA. Do you still want me to try the troubleshooting with Filebrowser?

Hi, I have matured my thoughts since then. Currently what I would propose :

Please try the latest version that removes the route-nopull from your ovpn config (or remove it yourself)
Please look if you have a proto directive in your ovpn config. Currently, the upstream container assumes "UDP" which could be the source of the issue. To avoid that, you could try adding proto tcp4 in your ovpn config to see if it makes a difference

What is weird is that the ovpn resets every time I restart the QB addon. "Proto" reverts back to UDP.

This is my ovpn file:
client
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
verb 3
remote-cert-tls server
ping 10
ping-restart 60
sndbuf 524288
rcvbuf 524288
cipher AES-256-CBC
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA
proto tcp4

reneg-sec 0
fast-io
remote-random
remote <IP_ADDRESS> 1301 # cz-prg-001
remote <IP_ADDRESS> 1301 # cz-prg-ovpn-101
remote <IP_ADDRESS> 1301 # cz-prg-ovpn-102
remote <IP_ADDRESS> 1301 # cz-prg-002
remote <IP_ADDRESS> 1301 # cz-prg-005
remote <IP_ADDRESS> 1301 # cz-prg-004
remote <IP_ADDRESS> 1301 # cz-prg-003
pull-filter ignore "route-ipv6"
pull-filter ignore "ifconfig-ipv6"
<ca>
-----BEGIN CERTIFICATE-----

REDACTED

-----END CERTIFICATE-----
</ca>

Thanks ; clearly it thinks you need to use UDP. I'll investigate tomorrow why the script doesn't take into account your tcp. It's this script in line 130 that ma'ages it : https://github.com/Trigus42/alpine-qbittorrentvpn/blob/master/rootfs/etc/cont-init.d/02-vpn.sh

Would you have time to do a test for me? In my Filebrowser addon, open /addon_configs/db21ed7f_qbittorrent/, add a file named qbittorrent.sh with the content below, and reboot. It should appear at top of your log : to see if internet being inaccessible is due to the container itself or the code. Thanks!!!
The script will be called by 01-custom_script.sh, therefore prior to the 02-vpn.sh script. It will allow to check that the issue is really whey the udp value in the config.ovpn and not with the addon itself.
#!/bin/bash
echo "ping"
ping -c 1 <IP_ADDRESS>

In my case as I've mentioned in the HA forums, the issue is with "networkdisks" option, not openvpn. There is nothing is logs that may indicate a problem. I've seen all the aforementioned errors too but then I just removed the "networkdisks" and restarted add-on, eventually it starts normally. However as soon as I add networkdisks back, the add-on doesn't go beyond login window

In my case as I've mentioned in the HA forums, the issue is with "networkdisks" option, not openvpn. There is nothing is logs that may indicate a problem. I've seen all the aforementioned errors too but then I just removed the "networkdisks" and restarted add-on, eventually it starts normally. However as soon as I add networkdisks back, the add-on doesn't go beyond login window

Hi , please create a separate issue thread as your symptoms are different and as said on the forum I CANNOT help you without a log! Thanks

Would you have time to do a test for me? In my Filebrowser addon, open /addon_configs/db21ed7f_qbittorrent/, add a file named qbittorrent.sh with the content below, and reboot. It should appear at top of your log : to see if internet being inaccessible is due to the container itself or the code. Thanks!!!
The script will be called by 01-custom_script.sh, therefore prior to the 02-vpn.sh script. It will allow to check that the issue is really whey the udp value in the config.ovpn and not with the addon itself.
#!/bin/bash
echo "ping"
ping -c 1 <IP_ADDRESS>

here's the output:
s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...

-----------------------------------------------------------
 Add-on: Qbittorrent
 qBittorrent is a bittorrent client
-----------------------------------------------------------
 Add-on version: 4.6.2-13wireguard_openvpn
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.2  (amd64 / qemux86-64)
 Home Assistant Core: 2023.12.1
 Home Assistant Supervisor: 2023.11.6
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons
-----------------------------------------------------------
 Defining permissions for main user :
User UID: 0
User GID : 0
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 00-global_migration.sh: executing...
... moved files from /config/openvpn to /addon_configs/db21ed7f-qbittorrent/openvpn
[cont-init.d] 00-global_migration.sh: exited 0.
[cont-init.d] 00-global_var.sh: executing...
DNS_server='<IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS>'
LAN_NETWORK='localhost,<IP_ADDRESS>,<IP_ADDRESS>/16,<IP_ADDRESS>/16'
PGID='0'
PUID='0'
QBT_USERNAME='stooovie'
SavePath='/mnt/Public/Downloads'
VPN_ENABLED='yes'
VPN_PASSWORD=******
VPN_TYPE='openvpn'
VPN_USERNAME='1770151644487821'
certfile='fullchain.pem'
cifspassword='Sassword2'
cifsusername='stooovie'
customUI='vuetorrent'
keyfile='privkey.pem'
networkdisks='//<IP_ADDRESS>/Public'
qbit_manage='false'
ssl='false'
[cont-init.d] 00-global_var.sh: exited 0.
[cont-init.d] 00-ipleak.sh: executing...
[cont-init.d] 00-ipleak.sh: exited 0.
[cont-init.d] 00-local_mounts.sh: executing...
[cont-init.d] 00-local_mounts.sh: exited 0.
[cont-init.d] 00-openvpn.sh: executing...
[cont-init.d] 00-openvpn.sh: exited 0.
[cont-init.d] 00-smb_mounts.sh: executing...
[11:13:20] WARNING: ------------------------
[11:13:20] WARNING: This is a new code, please report any issues on https://github.com/alexbelgium/hassio-addons
[11:13:20] WARNING: ------------------------
Mounting smb share(s)...
... using PUID 0 and PGID 0
... mounting //<IP_ADDRESS>/Public

... mounting //<IP_ADDRESS>/Public
[11:13:21] INFO: ...... //<IP_ADDRESS>/Public successfully mounted to /mnt/Public with options ,uid=0,gid=0,iocharset=utf8
[cont-init.d] 00-smb_mounts.sh: exited 0.
[cont-init.d] 01-config_yaml.sh: executing...
Setting permissions for the config.yaml directory

Load environment variables from /config/config.yaml if existing
If accessing the file with filebrowser it should be mapped to /addon_configs/db21ed7f-qbittorrent/config.yaml
---------------------------------------------------------
Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables

... no env variables found, exiting
[cont-init.d] 01-config_yaml.sh: exited 0.
[cont-init.d] 01-custom_script.sh: executing...
Execute /config/qbittorrent.sh if existing
---------------------------------------------------------
If accessing the file with filebrowser it should be mapped to /config/*-qbittorrent/qbittorrent.sh
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
... script found, executing
dos2unix: converting file /config/qbittorrent.sh to Unix format...
ping
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=117 time=9.88 ms

--- <IP_ADDRESS> ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 9.878/9.878/9.878/0.000 ms
[cont-init.d] 01-custom_script.sh: exited 0.
[cont-init.d] 01-environment.sh: executing...
2023-12-12 11:13:21 [INFO] LAN_NETWORK defined as 'localhost,<IP_ADDRESS>,<IP_ADDRESS>/16,<IP_ADDRESS>/16'
2023-12-12 11:13:21 [INFO] Docker network defined as <IP_ADDRESS>/23
2023-12-12 11:13:21 [INFO] PUID defined as 0
2023-12-12 11:13:21 [INFO] PGID defined as 0
2023-12-12 11:13:21 [INFO] An user with PUID 0 already exists in /etc/passwd, nothing to do.
2023-12-12 11:13:21 [INFO] VPN_ENABLED defined as 'yes'
2023-12-12 11:13:21 [INFO] VPN_TYPE defined as 'openvpn'
2023-12-12 11:13:21 [WARNING] NAME_SERVERS not defined (via -e NAME_SERVERS), defaulting to CloudFlare and Google name servers
2023-12-12 11:13:21 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-12 11:13:21 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-12 11:13:21 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-12 11:13:21 [INFO] Adding <IP_ADDRESS> to resolv.conf
[cont-init.d] 01-environment.sh: exited 0.
[cont-init.d] 02-vpn.sh: executing...
2023-12-12 11:13:21 [INFO] Choosen VPN config: 'mullvad_cz_prg.ovpn'
2023-12-12 11:13:21 [INFO] Using credentials from /config/openvpn/mullvad_cz_prg_credentials.conf
dos2unix: converting file /config/openvpn/mullvad_cz_prg.ovpn to Unix format...
2023-12-12 11:13:21 [INFO] VPN remote line defined as '<IP_ADDRESS> 1301 # cz-prg-001'
2023-12-12 11:13:21 [INFO] VPN_REMOTE defined as '<IP_ADDRESS>'
2023-12-12 11:13:21 [INFO] VPN_PORT defined as '1301'
2023-12-12 11:13:21 [INFO] VPN_PROTOCOL defined as 'udp'
2023-12-12 11:13:21 [INFO] VPN_DEVICE_TYPE defined as 'tun0'
2023-12-12 11:13:21 [INFO] Starting OpenVPN...
--------------------
2023-12-12 11:13:21 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations.
2023-12-12 11:13:21 WARNING: file '/config/openvpn/mullvad_cz_prg_credentials.conf' is group or others accessible
2023-12-12 11:13:21 OpenVPN 2.6.5 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2023-12-12 11:13:21 library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2023-12-12 11:13:21 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-12 11:13:21 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 11:13:21 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-12 11:13:21 UDPv4 link local: (not bound)
2023-12-12 11:13:21 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 11:14:21 [UNDEF] Inactivity timeout (--ping-restart), restarting
2023-12-12 11:14:21 SIGUSR1[soft,ping-restart] received, process restarting
2023-12-12 11:14:21 Restart pause, 1 second(s)
2023-12-12 11:14:22 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-12 11:14:22 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 11:14:22 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-12 11:14:22 UDPv4 link local: (not bound)
2023-12-12 11:14:22 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 11:21:09 TLS: Initial packet from [AF_INET]<IP_ADDRESS>:1301, sid=960fcdc6 ac90f1c0
2023-12-12 11:21:09 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-12 11:21:09 VERIFY OK: depth=2, C=SE, ST=Gotaland, L=Gothenburg, O=Amagicom AB, OU=Mullvad, CN=Mullvad Root CA v2<EMAIL_ADDRESS>2023-12-12 11:21:09 VERIFY OK: depth=1, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=Mullvad Intermediate CA v6<EMAIL_ADDRESS>2023-12-12 11:21:09 VERIFY KU OK
2023-12-12 11:21:09 Validating certificate extended key usage
2023-12-12 11:21:09 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-12 11:21:09 VERIFY EKU OK
2023-12-12 11:21:09 VERIFY OK: depth=0, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=cz-prg-ovpn-102.mullvad.net<EMAIL_ADDRESS>2023-12-12 11:21:09 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-12-12 11:21:09 [cz-prg-ovpn-102.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:1301
2023-12-12 11:21:09 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-12 11:21:09 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-12 11:21:10 SENT CONTROL [cz-prg-ovpn-102.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-12 11:21:11 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:1301::1005/64 fdda:d0d0:cafe:1301::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 5,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-12 11:21:11 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-12 11:21:11 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-12 11:21:11 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-12 11:21:11 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-12 11:21:11 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:1301::1005/64 fdda:d0d0:cafe:1301::'
2023-12-12 11:21:11 OPTIONS IMPORT: --socket-flags option modified
2023-12-12 11:21:11 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-12 11:21:11 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-12 11:21:11 OPTIONS IMPORT: route options modified
2023-12-12 11:21:11 OPTIONS IMPORT: route-related options modified
2023-12-12 11:21:11 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-12 11:21:11 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-12 11:21:11 ROUTE_GATEWAY <IP_ADDRESS>/<IP_ADDRESS> IFACE=eth0 HWADDR=02:42:ac:1e:21:05
2023-12-12 11:21:11 TUN/TAP device tun0 opened
2023-12-12 11:21:11 /sbin/ip link set dev tun0 up mtu 1500
2023-12-12 11:21:11 /sbin/ip link set dev tun0 up
2023-12-12 11:21:11 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-12 11:21:11 /sbin/ip route add <IP_ADDRESS>/32 via <IP_ADDRESS>
2023-12-12 11:21:11 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-12 11:21:11 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-12 11:21:11 Initialization Sequence Completed
2023-12-12 11:21:11 Data Channel: cipher 'AES-256-GCM', peer-id: 5
2023-12-12 11:21:11 Timers: ping 10, ping-restart 60
2023-12-12 11:21:11 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-12 11:21:11 [INFO] Adding localhost as route via docker eth0
2023-12-12 11:21:11 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-12 11:21:11 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-12 11:21:11 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-12 11:21:11 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-12 11:21:11 [WARNING] Error adding route for <IP_ADDRESS>/16. The web interface won't be reachable for the affected network
2023-12-12 11:21:11 [INFO] Adding additional incoming port 59595 for eth0
2023-12-12 11:21:11 [INFO] Adding additional incoming port 6882 for eth0
2023-12-12 11:21:11 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-12 11:21:11 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-12 11:21:12 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-12 11:21:12 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-12 11:21:12 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 90-dns_set.sh: executing...
2023-12-12 11:21:12 write UDPv4 []: Operation not permitted (fd=3,code=1)
[11:21:22] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
2023-12-12 11:21:22 write UDPv4 []: Operation not permitted (fd=3,code=1)
[11:21:32] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
2023-12-12 11:21:32 write UDPv4 []: Operation not permitted (fd=3,code=1)
[11:21:42] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
[11:21:42] WARNING: No valid DNS were found. Using default router (or HA) dns servers.
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing...
[11:21:42] INFO: Downloads can be found in /mnt/Public/Downloads
2023-12-12 11:21:43 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-12 11:21:53 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-12 11:22:03 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-12 11:22:11 [cz-prg-ovpn-102.mullvad.net] Inactivity timeout (--ping-restart), restarting
2023-12-12 11:22:11 SIGUSR1[soft,ping-restart] received, process restarting
2023-12-12 11:22:11 Restart pause, 1 second(s)
2023-12-12 11:22:12 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-12 11:22:12 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 11:22:12 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-12 11:22:12 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-12 11:22:12 UDPv4 link local: (not bound)
2023-12-12 11:22:12 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 11:22:12 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-12 11:22:14 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-12 11:22:18 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-12 11:22:26 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-12 11:22:42 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-12 11:23:12 [UNDEF] Inactivity timeout (--ping-restart), restarting
2023-12-12 11:23:12 SIGUSR1[soft,ping-restart] received, process restarting
2023-12-12 11:23:12 Restart pause, 1 second(s)
2023-12-12 11:23:13 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-12 11:23:13 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 11:23:13 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-12 11:23:13 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-12 11:23:13 UDPv4 link local: (not bound)
2023-12-12 11:23:13 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301

Perfect, thanks! It confirms that ping works, then fails when openvpn is up. So the hypothesis of it being due to UDP in the config.ovpn is quite likely.
Could you please then try to put this code in /addon_configs/db21ed7f_qbittorrent/qbittorrent.sh
#!/bin/bash
echo "Adding proto to ovpn config"
if [ -d /config/openvpn ]; then
  for files in /config/openvpn/*.ovpn; do
    sed -i "/proto/d" "$files"
    sed -i "5a proto tcp" "$files"
  done
fi

if [ -d /homeassistant/openvpn ]; then
  for files in /homeassistant/openvpn/*.ovpn; do
    sed -i "/proto/d" "$files"
    sed -i "5a proto tcp" "$files"
  done
fi

echo "Forcing VPN_PROTOCOL to tdp"
sed -i "/\${VPN_PROTOCOL}/i export VPN_PROTOCOL=tdp" /etc/cont-init.d/02-vpn.sh

Perfect, thanks! It confirms that ping works, then fails when openvpn is up. So the hypothesis of it being due to UDP in the config.ovpn is quite likely.
Could you please then try to put this code in /addon_configs/db21ed7f_qbittorrent/qbittorrent.sh
#!/bin/bash
echo "Adding proto to ovpn config"
if [ -d /config/openvpn ]; then
  for files in /config/openvpn/*.ovpn; do
    sed -i "/proto/d" "$files"
    sed -i "5a proto tcp" "$files"
  done
fi

if [ -d /homeassistant/openvpn ]; then
  for files in /homeassistant/openvpn/*.ovpn; do
    sed -i "/proto/d" "$files"
    sed -i "5a proto tcp" "$files"
  done
fi

echo "Forcing VPN_PROTOCOL to tcp"
sed -i "/\${VPN_PROTOCOL}/i export VPN_PROTOCOL=tcp" /etc/cont-init.d/02-vpn.sh

With the new script I see this:
2023-12-12 15:32:10 Restart pause, 1 second(s)
2023-12-12 15:32:11 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-12 15:32:11 NOTE: --fast-io is disabled since we are not using UDP
2023-12-12 15:32:11 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 15:32:11 Socket Buffers: R=[131072->1048576] S=[16384->1048576]
2023-12-12 15:32:11 Attempting to establish TCP connection with [AF_INET]<IP_ADDRESS>:1301
2023-12-12 15:34:11 TCP: connect to [AF_INET]<IP_ADDRESS>:1301 failed: Operation timed out
2023-12-12 15:34:11 SIGUSR1[connection failed(soft),connection-failed] received, process restarting
2023-12-12 15:34:11 Restart pause, 1 second(s)
2023-12-12 15:34:12 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-12 15:34:12 NOTE: --fast-io is disabled since we are not using UDP
2023-12-12 15:34:12 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 15:34:12 Socket Buffers: R=[131072->1048576] S=[16384->1048576]
2023-12-12 15:34:12 Attempting to establish TCP connection with [AF_INET]<IP_ADDRESS>:1301
2023-12-12 15:34:12 TCP: connect to [AF_INET]<IP_ADDRESS>:1301 failed: Connection refused
2023-12-12 15:34:12 SIGUSR1[connection failed(soft),connection-failed] received, process restarting
2023-12-12 15:34:12 Restart pause, 1 second(s)
2023-12-12 15:34:13 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-12 15:34:13 NOTE: --fast-io is disabled since we are not using UDP
2023-12-12 15:34:13 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-12 15:34:13 Socket Buffers: R=[131072->1048576] S=[16384->1048576]
2023-12-12 15:34:13 Attempting to establish TCP connection with [AF_INET]<IP_ADDRESS>:1301

I have paid for a mullvad account and can replicate with your exact setup. Therefore I'll be able to provide a solution. A quick one could be to use the TCP config instead of UDP, but I'll see for another solution.

Oh man, so much work for you... Do you have a tip jar or something?

ahah, well you know I do it for the fun of it mostly, I'm the kind of guy who doesn't like not to understand things ;-) but I do have a tip jar on my github homepage ("Sponsor") and any coffee is always appreciated :-p
And already just being able to replicate your error was a small victory for me, although I'm not sure when I'll have a solution up

I might be a complete eejit but I only see "Sponsoring" which is where I see you sponsor Frenck but no way for me to tip you :)

Edit : I've tried the TCP script too and it doesn't work either ; so it's really an element about Mullvad itself. Well I'll check again. I wonder if it's not because in my previous container I was binding at the app level, while this new container binds at the container level which is much more secure. So no quick solution yet ;-)
Thanks! The link is actually here : https://www.buymeacoffee.com/alexbelgium

(is there a better way to get the entire log? the way HA just crops to a certain number of lines is silly)
2023-12-13 15:36:36 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-13 15:36:36 [INFO] Adding <IP_ADDRESS> to resolv.conf
[cont-init.d] 01-environment.sh: exited 0.
[cont-init.d] 02-vpn.sh: executing...
2023-12-13 15:36:37 [INFO] Choosen VPN config: 'mullvad_cz_prg.ovpn'
2023-12-13 15:36:37 [INFO] Using credentials from /config/openvpn/mullvad_cz_prg_credentials.conf
dos2unix: converting file /config/openvpn/mullvad_cz_prg.ovpn to Unix format...
2023-12-13 15:36:37 [INFO] VPN remote line defined as '<IP_ADDRESS> 1301 # cz-prg-001'
2023-12-13 15:36:37 [INFO] VPN_REMOTE defined as '<IP_ADDRESS>'
2023-12-13 15:36:37 [INFO] VPN_PORT defined as '1301'
2023-12-13 15:36:37 [INFO] VPN_PROTOCOL defined as 'udp'
2023-12-13 15:36:37 [INFO] VPN_DEVICE_TYPE defined as 'tun0'
2023-12-13 15:36:37 [INFO] Starting OpenVPN...
--------------------
2023-12-13 15:36:37 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations.
2023-12-13 15:36:37 WARNING: file '/config/openvpn/mullvad_cz_prg_credentials.conf' is group or others accessible
2023-12-13 15:36:37 OpenVPN 2.6.5 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2023-12-13 15:36:37 library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2023-12-13 15:36:37 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-13 15:36:37 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1301
2023-12-13 15:36:37 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-13 15:36:37 UDPv4 link local: (not bound)
2023-12-13 15:36:37 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1301
2023-12-13 15:36:37 TLS: Initial packet from [AF_INET]<IP_ADDRESS>:1301, sid=1bc1898d 920bf047
2023-12-13 15:36:37 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-13 15:36:37 VERIFY OK: depth=2, C=SE, ST=Gotaland, L=Gothenburg, O=Amagicom AB, OU=Mullvad, CN=Mullvad Root CA v2<EMAIL_ADDRESS>2023-12-13 15:36:37 VERIFY OK: depth=1, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=Mullvad Intermediate CA v6<EMAIL_ADDRESS>2023-12-13 15:36:37 VERIFY KU OK
2023-12-13 15:36:37 Validating certificate extended key usage
2023-12-13 15:36:37 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-13 15:36:37 VERIFY EKU OK
2023-12-13 15:36:37 VERIFY OK: depth=0, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=cz-prg-ovpn-102.mullvad.net<EMAIL_ADDRESS>2023-12-13 15:36:37 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-12-13 15:36:37 [cz-prg-ovpn-102.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:1301
2023-12-13 15:36:37 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-13 15:36:37 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-13 15:36:38 SENT CONTROL [cz-prg-ovpn-102.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-13 15:36:39 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:1301::100b/64 fdda:d0d0:cafe:1301::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 11,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-13 15:36:39 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-13 15:36:39 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-13 15:36:39 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-13 15:36:39 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-13 15:36:39 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:1301::100b/64 fdda:d0d0:cafe:1301::'
2023-12-13 15:36:39 OPTIONS IMPORT: --socket-flags option modified
2023-12-13 15:36:39 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-13 15:36:39 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-13 15:36:39 OPTIONS IMPORT: route options modified
2023-12-13 15:36:39 OPTIONS IMPORT: route-related options modified
2023-12-13 15:36:39 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-13 15:36:39 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-13 15:36:39 ROUTE_GATEWAY <IP_ADDRESS>/<IP_ADDRESS> IFACE=eth0 HWADDR=02:42:ac:1e:21:05
2023-12-13 15:36:39 TUN/TAP device tun0 opened
2023-12-13 15:36:39 /sbin/ip link set dev tun0 up mtu 1500
2023-12-13 15:36:39 /sbin/ip link set dev tun0 up
2023-12-13 15:36:39 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-13 15:36:39 /sbin/ip route add <IP_ADDRESS>/32 via <IP_ADDRESS>
2023-12-13 15:36:39 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-13 15:36:39 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-13 15:36:39 Initialization Sequence Completed
2023-12-13 15:36:39 Data Channel: cipher 'AES-256-GCM', peer-id: 11
2023-12-13 15:36:39 Timers: ping 10, ping-restart 60
2023-12-13 15:36:39 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-13 15:36:40 [INFO] Adding localhost as route via docker eth0
2023-12-13 15:36:40 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-13 15:36:40 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-13 15:36:40 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-13 15:36:40 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-13 15:36:40 [WARNING] Error adding route for <IP_ADDRESS>/16. The web interface won't be reachable for the affected network
2023-12-13 15:36:40 [INFO] Adding additional incoming port 59595 for eth0
2023-12-13 15:36:40 [INFO] Adding additional incoming port 6882 for eth0
2023-12-13 15:36:40 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-13 15:36:40 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-13 15:36:42 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-13 15:36:42 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-13 15:36:42 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 10-test_vpn.sh: executing...
2023-12-13 15:36:42 write UDPv4 []: Operation not permitted (fd=3,code=1)
[15:36:52] WARNING: Can't connect, trying with TDP
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
2023-12-13 15:36:52 event_wait : Interrupted system call (fd=-1,code=4)
2023-12-13 15:36:52 /sbin/ip route del <IP_ADDRESS>/32
2023-12-13 15:36:52 /sbin/ip route del <IP_ADDRESS>/1
2023-12-13 15:36:52 /sbin/ip route del <IP_ADDRESS>/1
2023-12-13 15:36:52 Closing TUN/TAP interface
2023-12-13 15:36:52 /sbin/ip addr del dev tun0 <IP_ADDRESS>/16
2023-12-13 15:36:53 SIGTERM[hard,] received, process exiting
[s6-finish] sending all processes the KILL signal and exiting.

Perhaps it is working on version <16>.
Please try as such :

Delete your current ovpn files
download a fresh version of the mullvad files from the website, and extracted it in /addon_configs/xxx-qbittorrent/openvpn using the filebrowser addon
restart the addon

It doesn't work each time but the first boot after adding the new files work
Here is the content of my ovpn (I downloaded the udp one and modified the extension from conf to ovpn) :
client
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
verb 3
remote-cert-tls server
ping 10
ping-restart 60
sndbuf 524288
rcvbuf 524288
cipher AES-256-GCM
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384
proto udp
ca mullvad_ca.crt
script-security 2
up /config/openvpn/update-resolv-conf
down /config/openvpn/update-resolv-conf
fast-io
remote-random
remote <IP_ADDRESS> 1197 # cz-prg-ovpn-101
remote <IP_ADDRESS> 1197 # cz-prg-ovpn-102

ahah we posted at exactly the same time. so it's booting when using fresh mullvad configuration files, now I'm trying to understand why it doesn't work anymore on reboot

it's not booting for me:
023-12-13 15:49:56 [cz-prg-ovpn-101.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:1300
2023-12-13 15:49:56 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-13 15:49:56 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-13 15:49:57 SENT CONTROL [cz-prg-ovpn-101.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-13 15:49:57 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:1300::1001/64 fdda:d0d0:cafe:1300::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 2,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-13 15:49:57 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-13 15:49:57 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-13 15:49:57 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-13 15:49:57 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-13 15:49:57 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:1300::1001/64 fdda:d0d0:cafe:1300::'
2023-12-13 15:49:57 OPTIONS IMPORT: --socket-flags option modified
2023-12-13 15:49:57 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-13 15:49:57 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-13 15:49:57 OPTIONS IMPORT: route options modified
2023-12-13 15:49:57 OPTIONS IMPORT: route-related options modified
2023-12-13 15:49:57 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-13 15:49:57 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-13 15:49:57 ROUTE_GATEWAY <IP_ADDRESS>/<IP_ADDRESS> IFACE=eth0 HWADDR=02:42:ac:1e:21:05
2023-12-13 15:49:57 TUN/TAP device tun0 opened
2023-12-13 15:49:57 /sbin/ip link set dev tun0 up mtu 1500
2023-12-13 15:49:57 /sbin/ip link set dev tun0 up
2023-12-13 15:49:57 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-13 15:49:57 /sbin/ip route add <IP_ADDRESS>/32 via <IP_ADDRESS>
2023-12-13 15:49:57 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-13 15:49:57 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-13 15:49:57 Initialization Sequence Completed
2023-12-13 15:49:57 Data Channel: cipher 'AES-256-GCM', peer-id: 2
2023-12-13 15:49:57 Timers: ping 10, ping-restart 60
2023-12-13 15:49:57 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-13 15:49:57 [INFO] Adding localhost as route via docker eth0
2023-12-13 15:49:57 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-13 15:49:57 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-13 15:49:57 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-13 15:49:57 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-13 15:49:57 [WARNING] Error adding route for <IP_ADDRESS>/16. The web interface won't be reachable for the affected network
2023-12-13 15:49:57 [INFO] Adding additional incoming port 59595 for eth0
2023-12-13 15:49:57 [INFO] Adding additional incoming port 6882 for eth0
2023-12-13 15:49:57 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-13 15:49:57 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-13 15:49:58 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-13 15:49:58 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-13 15:49:58 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 10-test_vpn.sh: executing...
2023-12-13 15:49:58 write UDPv4 []: Operation not permitted (fd=3,code=1)
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
2023-12-13 15:49:58 event_wait : Interrupted system call (fd=-1,code=4)
2023-12-13 15:49:58 /sbin/ip route del <IP_ADDRESS>/32
2023-12-13 15:49:58 /sbin/ip route del <IP_ADDRESS>/1
2023-12-13 15:49:58 /sbin/ip route del <IP_ADDRESS>/1
2023-12-13 15:49:58 Closing TUN/TAP interface
2023-12-13 15:49:58 /sbin/ip addr del dev tun0 <IP_ADDRESS>/16
2023-12-13 15:49:58 SIGTERM[hard,] received, process exiting
[s6-finish] sending all processes the KILL signal and exiting.

Alex, it's exactly the same even when I disable VPN in the QB addon config and restart it... That's very weird innit?
2023-12-13 17:43:18 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-13 17:43:18 [INFO] Adding <IP_ADDRESS> to resolv.conf
[cont-init.d] 01-environment.sh: exited 0.
[cont-init.d] 02-vpn.sh: executing...
2023-12-13 17:43:18 [INFO] Choosen VPN config: 'mullvad_cz_prg.ovpn'
2023-12-13 17:43:18 [INFO] Using credentials from /config/openvpn/mullvad_cz_prg_credentials.conf
dos2unix: converting file /config/openvpn/mullvad_cz_prg.ovpn to Unix format...
2023-12-13 17:43:18 [INFO] VPN remote line defined as '<IP_ADDRESS> 1300 # cz-prg-ovpn-102'
2023-12-13 17:43:18 [INFO] VPN_REMOTE defined as '<IP_ADDRESS>'
2023-12-13 17:43:18 [INFO] VPN_PORT defined as '1300'
2023-12-13 17:43:18 [INFO] VPN_PROTOCOL defined as 'udp'
2023-12-13 17:43:18 [INFO] VPN_DEVICE_TYPE defined as 'tun0'
2023-12-13 17:43:18 [INFO] Starting OpenVPN...
--------------------
2023-12-13 17:43:18 Note: option tun-ipv6 is ignored because modern operating systems do not need special IPv6 tun handling anymore.
2023-12-13 17:43:18 WARNING: file '/config/openvpn/mullvad_cz_prg_credentials.conf' is group or others accessible
2023-12-13 17:43:18 OpenVPN 2.6.5 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2023-12-13 17:43:18 library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2023-12-13 17:43:18 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-13 17:43:18 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1300
2023-12-13 17:43:18 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-13 17:43:18 UDPv4 link local: (not bound)
2023-12-13 17:43:18 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1300
2023-12-13 17:43:18 TLS: Initial packet from [AF_INET]<IP_ADDRESS>:1300, sid=434c8dd7 52dfae5f
2023-12-13 17:43:18 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-13 17:43:18 VERIFY OK: depth=2, C=SE, ST=Gotaland, L=Gothenburg, O=Amagicom AB, OU=Mullvad, CN=Mullvad Root CA v2<EMAIL_ADDRESS>2023-12-13 17:43:18 VERIFY OK: depth=1, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=Mullvad Intermediate CA v6<EMAIL_ADDRESS>2023-12-13 17:43:18 VERIFY KU OK
2023-12-13 17:43:18 Validating certificate extended key usage
2023-12-13 17:43:18 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-13 17:43:18 VERIFY EKU OK
2023-12-13 17:43:18 VERIFY OK: depth=0, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=cz-prg-ovpn-102.mullvad.net<EMAIL_ADDRESS>2023-12-13 17:43:18 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-12-13 17:43:18 [cz-prg-ovpn-102.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:1300
2023-12-13 17:43:18 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-13 17:43:18 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-13 17:43:19 SENT CONTROL [cz-prg-ovpn-102.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-13 17:43:20 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:1300::100a/64 fdda:d0d0:cafe:1300::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 10,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-13 17:43:20 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-13 17:43:20 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-13 17:43:20 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-13 17:43:20 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-13 17:43:20 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:1300::100a/64 fdda:d0d0:cafe:1300::'
2023-12-13 17:43:20 OPTIONS IMPORT: --socket-flags option modified
2023-12-13 17:43:20 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-13 17:43:20 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-13 17:43:20 OPTIONS IMPORT: route options modified
2023-12-13 17:43:20 OPTIONS IMPORT: route-related options modified
2023-12-13 17:43:20 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-13 17:43:20 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-13 17:43:20 ROUTE_GATEWAY <IP_ADDRESS>/<IP_ADDRESS> IFACE=eth0 HWADDR=02:42:ac:1e:21:05
2023-12-13 17:43:20 TUN/TAP device tun0 opened
2023-12-13 17:43:20 /sbin/ip link set dev tun0 up mtu 1500
2023-12-13 17:43:20 /sbin/ip link set dev tun0 up
2023-12-13 17:43:20 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-13 17:43:20 /sbin/ip route add <IP_ADDRESS>/32 via <IP_ADDRESS>
2023-12-13 17:43:20 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-13 17:43:20 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-13 17:43:20 Initialization Sequence Completed
2023-12-13 17:43:20 Data Channel: cipher 'AES-256-GCM', peer-id: 10
2023-12-13 17:43:20 Timers: ping 10, ping-restart 60
2023-12-13 17:43:20 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-13 17:43:20 [INFO] Adding localhost as route via docker eth0
2023-12-13 17:43:20 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-13 17:43:20 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-13 17:43:20 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-13 17:43:20 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-13 17:43:20 [WARNING] Error adding route for <IP_ADDRESS>/16. The web interface won't be reachable for the affected network
2023-12-13 17:43:20 [INFO] Adding additional incoming port 59595 for eth0
2023-12-13 17:43:20 [INFO] Adding additional incoming port 6882 for eth0
2023-12-13 17:43:20 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-13 17:43:20 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-13 17:43:21 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-13 17:43:21 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-13 17:43:21 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 10-test_vpn.sh: executing...
[cont-init.d] 10-test_vpn.sh: exited 0.
[cont-init.d] 90-dns_set.sh: executing...
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
2023-12-13 17:43:29 event_wait : Interrupted system call (fd=-1,code=4)
2023-12-13 17:43:29 /sbin/ip route del <IP_ADDRESS>/32
2023-12-13 17:43:29 /sbin/ip route del <IP_ADDRESS>/1
2023-12-13 17:43:29 /sbin/ip route del <IP_ADDRESS>/1
2023-12-13 17:43:29 Closing TUN/TAP interface
2023-12-13 17:43:29 /sbin/ip addr del dev tun0 <IP_ADDRESS>/16
2023-12-13 17:43:29 SIGTERM[hard,] received, process exiting
[s6-finish] sending all processes the KILL signal and exiting.

Mmh this is not logical only VPN_ENABLE has a purpose now, the other is just converted to this one in the migration script. So, now mullvad starts consistently with no udpv4 errors anymore in my latest Bryson, simply by adding a 5 seconds latency between vpn config and network config... Please let me know how version 18 goes!

Looks I'm SOL... I'll probably have to go without VPN and hope for the best.
[cont-init.d] 01-environment.sh: exited 0.
[cont-init.d] 02-vpn.sh: executing...
2023-12-13 23:11:02 [INFO] Choosen VPN config: 'mullvad_cz_prg.ovpn'
2023-12-13 23:11:02 [INFO] Using credentials from /config/openvpn/mullvad_cz_prg_credentials.conf
dos2unix: converting file /config/openvpn/mullvad_cz_prg.ovpn to Unix format...
2023-12-13 23:11:02 [INFO] VPN remote line defined as '<IP_ADDRESS> 1300 # cz-prg-ovpn-102'
2023-12-13 23:11:02 [INFO] VPN_REMOTE defined as '<IP_ADDRESS>'
2023-12-13 23:11:02 [INFO] VPN_PORT defined as '1300'
2023-12-13 23:11:02 [INFO] VPN_PROTOCOL defined as 'udp'
2023-12-13 23:11:02 [INFO] VPN_DEVICE_TYPE defined as 'tun0'
2023-12-13 23:11:02 [INFO] Starting OpenVPN...
--------------------
2023-12-13 23:11:02 Note: option tun-ipv6 is ignored because modern operating systems do not need special IPv6 tun handling anymore.
2023-12-13 23:11:02 WARNING: file '/config/openvpn/mullvad_cz_prg_credentials.conf' is group or others accessible
2023-12-13 23:11:02 OpenVPN 2.6.5 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2023-12-13 23:11:02 library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2023-12-13 23:11:02 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-13 23:11:02 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1300
2023-12-13 23:11:02 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-13 23:11:02 UDPv4 link local: (not bound)
2023-12-13 23:11:02 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1300
2023-12-13 23:11:02 TLS: Initial packet from [AF_INET]<IP_ADDRESS>:1300, sid=39eb5242 ae7ee60f
2023-12-13 23:11:02 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-13 23:11:02 VERIFY OK: depth=2, C=SE, ST=Gotaland, L=Gothenburg, O=Amagicom AB, OU=Mullvad, CN=Mullvad Root CA v2<EMAIL_ADDRESS>2023-12-13 23:11:02 VERIFY OK: depth=1, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=Mullvad Intermediate CA v6<EMAIL_ADDRESS>2023-12-13 23:11:02 VERIFY KU OK
2023-12-13 23:11:02 Validating certificate extended key usage
2023-12-13 23:11:02 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-13 23:11:02 VERIFY EKU OK
2023-12-13 23:11:02 VERIFY OK: depth=0, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=cz-prg-ovpn-101.mullvad.net<EMAIL_ADDRESS>2023-12-13 23:11:02 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-12-13 23:11:02 [cz-prg-ovpn-101.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:1300
2023-12-13 23:11:02 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-13 23:11:02 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-13 23:11:03 SENT CONTROL [cz-prg-ovpn-101.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-13 23:11:04 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:1300::1009/64 fdda:d0d0:cafe:1300::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 9,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-13 23:11:04 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-13 23:11:04 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-13 23:11:04 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-13 23:11:04 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-13 23:11:04 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:1300::1009/64 fdda:d0d0:cafe:1300::'
2023-12-13 23:11:04 OPTIONS IMPORT: --socket-flags option modified
2023-12-13 23:11:04 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-13 23:11:04 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-13 23:11:04 OPTIONS IMPORT: route options modified
2023-12-13 23:11:04 OPTIONS IMPORT: route-related options modified
2023-12-13 23:11:04 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-13 23:11:04 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-13 23:11:04 ROUTE_GATEWAY <IP_ADDRESS>/<IP_ADDRESS> IFACE=eth0 HWADDR=02:42:ac:1e:21:05
2023-12-13 23:11:04 TUN/TAP device tun0 opened
2023-12-13 23:11:04 /sbin/ip link set dev tun0 up mtu 1500
2023-12-13 23:11:04 /sbin/ip link set dev tun0 up
2023-12-13 23:11:04 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-13 23:11:04 /sbin/ip route add <IP_ADDRESS>/32 via <IP_ADDRESS>
2023-12-13 23:11:04 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-13 23:11:04 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-13 23:11:04 Initialization Sequence Completed
2023-12-13 23:11:04 Data Channel: cipher 'AES-256-GCM', peer-id: 9
2023-12-13 23:11:04 Timers: ping 10, ping-restart 60
2023-12-13 23:11:04 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-13 23:11:09 [INFO] Adding localhost as route via docker eth0
2023-12-13 23:11:09 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-13 23:11:09 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-13 23:11:09 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-13 23:11:09 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-13 23:11:09 [WARNING] Error adding route for <IP_ADDRESS>/16. The web interface won't be reachable for the affected network
2023-12-13 23:11:09 [INFO] Adding additional incoming port 59595 for eth0
2023-12-13 23:11:09 [INFO] Adding additional incoming port 6882 for eth0
2023-12-13 23:11:09 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-13 23:11:09 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-13 23:11:09 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-13 23:11:09 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-13 23:11:09 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 10-test_vpn.sh: executing...
2023-12-13 23:11:09 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-13 23:11:09 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-13 23:11:19 write UDPv4 []: Operation not permitted (fd=3,code=1)
[23:11:19] WARNING: Can't connect even with TDP, reverting to default
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
2023-12-13 23:11:20 event_wait : Interrupted system call (fd=-1,code=4)
2023-12-13 23:11:20 /sbin/ip route del <IP_ADDRESS>/32
2023-12-13 23:11:20 /sbin/ip route del <IP_ADDRESS>/1
2023-12-13 23:11:20 /sbin/ip route del <IP_ADDRESS>/1
2023-12-13 23:11:20 Closing TUN/TAP interface
2023-12-13 23:11:20 /sbin/ip addr del dev tun0 <IP_ADDRESS>/16
2023-12-13 23:11:20 SIGTERM[hard,] received, process exiting
[s6-finish] sending all processes the KILL signal and exiting.

Well there is the transmission add-on with openvpn too ; but perhaps it's due to the speed of the machine and 5 seconds is not enough... I'll try to set mullvad on my amd64 VM instead of the rpi4 where I did those tests

I don't really need Mullvad. If you have good experience with a different VPN, I can try that. I really like QBITTORRENT.

Actually I never use a vpn with qbittorrent ;-) Living on the edge ;-)
So - I've just installed qbittorrent from scratch on a VM machine.
After several checks and comparing, logs, I found that remote <IP_ADDRESS> 1301 # cz-prg-ovpn-102 always failed, and remote <IP_ADDRESS> 1301 # cz-prg-ovpn-101 always succeeded! So removing the cz-prg-ovpn-102 from the ovpn instructions actually now allows to avoid all UDPv4 errors on my system in a consistent way

Stuck on this, even with the 102 server removed from the ovpn. I'm starting to think something else is amiss:
2023-12-14 09:44:03 [INFO] PGID defined as 0
2023-12-14 09:44:03 [INFO] An user with PUID 0 already exists in /etc/passwd, nothing to do.
2023-12-14 09:44:03 [INFO] VPN_ENABLED defined as 'yes'
2023-12-14 09:44:03 [INFO] VPN_TYPE defined as 'openvpn'
2023-12-14 09:44:03 [WARNING] NAME_SERVERS not defined (via -e NAME_SERVERS), defaulting to CloudFlare and Google name servers
2023-12-14 09:44:03 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-14 09:44:03 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-14 09:44:03 [INFO] Adding <IP_ADDRESS> to resolv.conf
2023-12-14 09:44:03 [INFO] Adding <IP_ADDRESS> to resolv.conf
[cont-init.d] 01-environment.sh: exited 0.
[cont-init.d] 02-vpn.sh: executing...
2023-12-14 09:44:03 [INFO] Choosen VPN config: 'mullvad_cz_prg.ovpn'
2023-12-14 09:44:03 [INFO] Using credentials from /config/openvpn/mullvad_cz_prg_credentials.conf
dos2unix: converting file /config/openvpn/mullvad_cz_prg.ovpn to Unix format...
2023-12-14 09:44:03 [INFO] VPN remote line defined as '<IP_ADDRESS> 1300 # cz-prg-ovpn-101'
2023-12-14 09:44:03 [INFO] VPN_REMOTE defined as '<IP_ADDRESS>'
2023-12-14 09:44:03 [INFO] VPN_PORT defined as '1300'
2023-12-14 09:44:03 [INFO] VPN_PROTOCOL defined as 'udp'
2023-12-14 09:44:03 [INFO] VPN_DEVICE_TYPE defined as 'tun0'
2023-12-14 09:44:03 [INFO] Starting OpenVPN...
--------------------
2023-12-14 09:44:03 Note: option tun-ipv6 is ignored because modern operating systems do not need special IPv6 tun handling anymore.
2023-12-14 09:44:03 WARNING: file '/config/openvpn/mullvad_cz_prg_credentials.conf' is group or others accessible
2023-12-14 09:44:03 OpenVPN 2.6.5 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2023-12-14 09:44:03 library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2023-12-14 09:44:03 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-14 09:44:03 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:1300
2023-12-14 09:44:03 Socket Buffers: R=[212992->1048576] S=[212992->1048576]
2023-12-14 09:44:03 UDPv4 link local: (not bound)
2023-12-14 09:44:03 UDPv4 link remote: [AF_INET]<IP_ADDRESS>:1300
2023-12-14 09:44:03 TLS: Initial packet from [AF_INET]<IP_ADDRESS>:1300, sid=dd13cccc 5c52ceab
2023-12-14 09:44:03 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-14 09:44:03 VERIFY OK: depth=2, C=SE, ST=Gotaland, L=Gothenburg, O=Amagicom AB, OU=Mullvad, CN=Mullvad Root CA v2<EMAIL_ADDRESS>2023-12-14 09:44:03 VERIFY OK: depth=1, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=Mullvad Intermediate CA v6<EMAIL_ADDRESS>2023-12-14 09:44:03 VERIFY KU OK
2023-12-14 09:44:03 Validating certificate extended key usage
2023-12-14 09:44:03 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-14 09:44:03 VERIFY EKU OK
2023-12-14 09:44:03 VERIFY OK: depth=0, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=cz-prg-ovpn-101.mullvad.net<EMAIL_ADDRESS>2023-12-14 09:44:03 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-12-14 09:44:03 [cz-prg-ovpn-101.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:1300
2023-12-14 09:44:03 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-14 09:44:03 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-14 09:44:04 SENT CONTROL [cz-prg-ovpn-101.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-14 09:44:05 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:1300::1001/64 fdda:d0d0:cafe:1300::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 1,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-14 09:44:05 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-14 09:44:05 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-14 09:44:05 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-14 09:44:05 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-14 09:44:05 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:1300::1001/64 fdda:d0d0:cafe:1300::'
2023-12-14 09:44:05 OPTIONS IMPORT: --socket-flags option modified
2023-12-14 09:44:05 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-14 09:44:05 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-14 09:44:05 OPTIONS IMPORT: route options modified
2023-12-14 09:44:05 OPTIONS IMPORT: route-related options modified
2023-12-14 09:44:05 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-14 09:44:05 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-14 09:44:05 ROUTE_GATEWAY <IP_ADDRESS>/<IP_ADDRESS> IFACE=eth0 HWADDR=02:42:ac:1e:21:05
2023-12-14 09:44:05 TUN/TAP device tun0 opened
2023-12-14 09:44:05 /sbin/ip link set dev tun0 up mtu 1500
2023-12-14 09:44:05 /sbin/ip link set dev tun0 up
2023-12-14 09:44:05 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-14 09:44:05 /sbin/ip route add <IP_ADDRESS>/32 via <IP_ADDRESS>
2023-12-14 09:44:05 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-14 09:44:05 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-14 09:44:05 Initialization Sequence Completed
2023-12-14 09:44:05 Data Channel: cipher 'AES-256-GCM', peer-id: 1
2023-12-14 09:44:05 Timers: ping 10, ping-restart 60
2023-12-14 09:44:05 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 02-wpn.sh: executing...
... waiting until vpn is up
[cont-init.d] 02-wpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-14 09:44:10 [INFO] Adding localhost as route via docker eth0
2023-12-14 09:44:10 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-14 09:44:10 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-14 09:44:11 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-14 09:44:11 [INFO] Adding <IP_ADDRESS>/24 as route via docker eth0
2023-12-14 09:44:11 [WARNING] Error adding route for <IP_ADDRESS>/24. The web interface won't be reachable for the affected network
2023-12-14 09:44:11 [INFO] Adding additional incoming port 59595 for eth0
2023-12-14 09:44:11 [INFO] Adding additional incoming port 6882 for eth0
2023-12-14 09:44:11 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-14 09:44:11 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-14 09:44:11 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-14 09:44:11 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-14 09:44:11 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 90-dns_set.sh: executing...
[09:44:11] INFO: DNS SERVERS set to <IP_ADDRESS> <IP_ADDRESS>
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing...
[09:44:11] INFO: Downloads can be found in /mnt/Public/Downloads

Crazy ; it's working now on both my VM and rpi ;-) Do you have a blank line at the end of your ovpn file ?

There's some craziness going on. I decided to start from scratch, uninstalled the addon, deleted the /addon_configs/db21ed7f_qbittorrent folder, reinstalled.
And yet, I see Choosen VPN config: 'mullvad_cz_prg.ovpn' THAT FILE SHOULD NOT EXIST. I go back to /addon_configs/db21ed7f_qbittorrent and sure enough, all the old files are there, even when I deleted the entire folder before reinstalling the addon.
I have absolutely no idea what's going on.

ahahah ; well probably you still have your remanent files from the previous installations (accessible in Filebrowser through the /homeassistant/openvpn and /homeassistant/addons_config/qBittorrent). My code is not removing them for backward compatibility.

Ok so back to square one. Completely deleted both /homeassistant/openvpn and /homeassistant/addons_config/qBittorrent, uninstalled qb addon, downloaded Mullvad OVPN, got this:
2023-12-14 10:14:03 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-14 10:14:04 VERIFY OK: depth=2, C=SE, ST=Gotaland, L=Gothenburg, O=Amagicom AB, OU=Mullvad, CN=Mullvad Root CA v2<EMAIL_ADDRESS>2023-12-14 10:14:04 VERIFY OK: depth=1, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=Mullvad Intermediate CA v6<EMAIL_ADDRESS>2023-12-14 10:14:04 VERIFY KU OK
2023-12-14 10:14:04 Validating certificate extended key usage
2023-12-14 10:14:04 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-14 10:14:04 VERIFY EKU OK
2023-12-14 10:14:04 VERIFY OK: depth=0, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=cz-prg-ovpn-101.mullvad.net<EMAIL_ADDRESS>2023-12-14 10:14:04 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-12-14 10:14:04 [cz-prg-ovpn-101.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:1300
2023-12-14 10:14:04 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-14 10:14:04 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-14 10:14:05 SENT CONTROL [cz-prg-ovpn-101.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-14 10:14:06 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:1300::1001/64 fdda:d0d0:cafe:1300::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 1,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-14 10:14:06 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-14 10:14:06 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-14 10:14:06 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-14 10:14:06 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-14 10:14:06 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:1300::1001/64 fdda:d0d0:cafe:1300::'
2023-12-14 10:14:06 OPTIONS IMPORT: --socket-flags option modified
2023-12-14 10:14:06 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-14 10:14:06 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-14 10:14:06 OPTIONS IMPORT: route options modified
2023-12-14 10:14:06 OPTIONS IMPORT: route-related options modified
2023-12-14 10:14:06 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-14 10:14:06 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-14 10:14:06 ROUTE_GATEWAY <IP_ADDRESS>/<IP_ADDRESS> IFACE=eth0 HWADDR=02:42:ac:1e:21:05
2023-12-14 10:14:06 TUN/TAP device tun0 opened
2023-12-14 10:14:06 /sbin/ip link set dev tun0 up mtu 1500
2023-12-14 10:14:06 /sbin/ip link set dev tun0 up
2023-12-14 10:14:06 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-14 10:14:06 /config/openvpn/update-resolv-conf tun0 1500 0 <IP_ADDRESS> <IP_ADDRESS> init
dhcp-option DNS <IP_ADDRESS>
2023-12-14 10:14:06 /sbin/ip route add <IP_ADDRESS>/32 via <IP_ADDRESS>
2023-12-14 10:14:06 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-14 10:14:06 /sbin/ip route add <IP_ADDRESS>/1 via <IP_ADDRESS>
2023-12-14 10:14:06 Initialization Sequence Completed
2023-12-14 10:14:06 Data Channel: cipher 'AES-256-GCM', peer-id: 1
2023-12-14 10:14:06 Timers: ping 10, ping-restart 60
2023-12-14 10:14:06 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 02-wpn.sh: executing...
... waiting until vpn is up
[cont-init.d] 02-wpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-14 10:14:11 [INFO] Adding localhost as route via docker eth0
2023-12-14 10:14:11 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-14 10:14:11 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-14 10:14:11 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-14 10:14:11 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-14 10:14:11 [WARNING] Error adding route for <IP_ADDRESS>/16. The web interface won't be reachable for the affected network
2023-12-14 10:14:11 [INFO] Adding additional incoming port 59595 for eth0
2023-12-14 10:14:11 [INFO] Adding additional incoming port 6882 for eth0
2023-12-14 10:14:11 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-14 10:14:11 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-14 10:14:11 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-14 10:14:11 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-14 10:14:11 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 90-dns_set.sh: executing...
2023-12-14 10:14:12 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-14 10:14:15 write UDPv4 []: Operation not permitted (fd=3,code=1)
[10:14:22] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
2023-12-14 10:14:22 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-14 10:14:25 write UDPv4 []: Operation not permitted (fd=3,code=1)
[10:14:32] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
[10:14:32] WARNING: No valid DNS were found. Using default router (or HA) dns servers.
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing...
[10:14:32] INFO: Downloads can be found in /share/qBittorrent
[10:14:32] INFO: Whitelisted subsets will not require a password : localhost,<IP_ADDRESS>,<IP_ADDRESS>/16,<IP_ADDRESS>/16
[10:14:32] INFO: WEBUI username set to admin
[10:14:32] INFO: Alternate UI enabled : vuetorrent. If webui don't work, disable this option
2023-12-14 10:14:32 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-14 10:14:32 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-14 10:14:34 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-14 10:14:34 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-14 10:14:35 write UDPv4 []: Operation not permitted (fd=3,code=1)
curl: (3) URL rejected: Malformed input to a URL function
[cont-init.d] 91-qbittorrent_configuration.sh: exited 3.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
2023-12-14 10:14:37 event_wait : Interrupted system call (fd=-1,code=4)
2023-12-14 10:14:37 /sbin/ip route del <IP_ADDRESS>/32
2023-12-14 10:14:37 /sbin/ip route del <IP_ADDRESS>/1
2023-12-14 10:14:37 /sbin/ip route del <IP_ADDRESS>/1
2023-12-14 10:14:37 Closing TUN/TAP interface
2023-12-14 10:14:37 /sbin/ip addr del dev tun0 <IP_ADDRESS>/16
2023-12-14 10:14:37 /config/openvpn/update-resolv-conf tun0 1500 0 <IP_ADDRESS> <IP_ADDRESS> init
2023-12-14 10:14:37 SIGTERM[hard,] received, process exiting
[s6-finish] sending all processes the KILL signal and exiting.

changed ovpn from UDP to TCP, deleted the offending 102 server, restarted, got this:
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 02-wpn.sh: executing...
... waiting until vpn is up
[cont-init.d] 02-wpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing...
2023-12-14 10:18:41 [INFO] Adding localhost as route via docker eth0
2023-12-14 10:18:41 [WARNING] Error adding route for localhost. The web interface won't be reachable for the affected network
2023-12-14 10:18:41 [INFO] Adding <IP_ADDRESS> as route via docker eth0
2023-12-14 10:18:41 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-14 10:18:41 [INFO] Adding <IP_ADDRESS>/16 as route via docker eth0
2023-12-14 10:18:41 [WARNING] Error adding route for <IP_ADDRESS>/16. The web interface won't be reachable for the affected network
2023-12-14 10:18:41 [INFO] Adding additional incoming port 59595 for eth0
2023-12-14 10:18:41 [INFO] Adding additional incoming port 6882 for eth0
2023-12-14 10:18:41 [INFO] Adding additional outgoing port 59595 for eth0
2023-12-14 10:18:41 [INFO] Adding additional outgoing port 6882 for eth0
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 03-nginx_ssl.sh: executing...
[cont-init.d] 03-nginx_ssl.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing...
2023-12-14 10:18:42 [WARNING] ENABLE_SSL is set to no, SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-14 10:18:42 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-14 10:18:42 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing...
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] 90-dns_set.sh: executing...
2023-12-14 10:18:42 write UDPv4 []: Operation not permitted (fd=3,code=1)
[10:18:52] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
2023-12-14 10:18:52 write UDPv4 []: Operation not permitted (fd=3,code=1)
[10:19:02] WARNING: DNS <IP_ADDRESS> was requested but can't be pinged. It won't be used
[10:19:02] WARNING: No valid DNS were found. Using default router (or HA) dns servers.
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing...
[10:19:02] INFO: Downloads can be found in /share/qBittorrent
[10:19:02] INFO: Whitelisted subsets will not require a password : localhost,<IP_ADDRESS>,<IP_ADDRESS>/16,<IP_ADDRESS>/16
[10:19:02] INFO: WEBUI username set to admin
[10:19:02] INFO: Alternate UI enabled : vuetorrent. If webui don't work, disable this option
2023-12-14 10:19:02 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-14 10:19:02 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-14 10:19:05 write UDPv4 []: Operation not permitted (fd=3,code=1)
2023-12-14 10:19:05 write UDPv4 []: Operation not permitted (fd=3,code=1)
curl: (3) URL rejected: Malformed input to a URL function
[cont-init.d] 91-qbittorrent_configuration.sh: exited 3.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
2023-12-14 10:19:07 event_wait : Interrupted system call (fd=-1,code=4)
2023-12-14 10:19:07 /sbin/ip route del <IP_ADDRESS>/32
2023-12-14 10:19:07 /sbin/ip route del <IP_ADDRESS>/1
2023-12-14 10:19:07 /sbin/ip route del <IP_ADDRESS>/1
2023-12-14 10:19:07 Closing TUN/TAP interface
2023-12-14 10:19:07 /sbin/ip addr del dev tun0 <IP_ADDRESS>/16
2023-12-14 10:19:07 /config/openvpn/update-resolv-conf tun0 1500 0 <IP_ADDRESS> <IP_ADDRESS> init
2023-12-14 10:19:08 SIGTERM[hard,] received, process exiting
[s6-finish] sending all processes the KILL signal and exiting.

So this is probably not gonna work anymore, too bad... Thanks for your time.

Or I'll try with wireguard instead of ovpn

Nope:

watch out that it is the crazyiness of Home Assistant itself : the /config folder IN the qbittorrent addon is mapped to the folder /addon_configs/xxx-qbittorrent in other HA addons such as my filebrowser addon. So a /config (such as from the core-ssh) would not be the same as a /config from inside the addon...
btw : have you tried with UDP (the normal openvpn files) but just adding a blank line at the end ?
To be sure to access the right place I would recommend that either you use portainer for direct container access ; or use either my Filebrowser addon or any native terminal from HA to access the /addons_config/xxx-qbittorrent folder

Wow, that is crazy. When wireguard is in the right place, i get this:
2023-12-14 11:03:19 [INFO] Choosen VPN config: 'cz-prg-wg-101.conf'
dos2unix: converting file /config/wireguard/cz-prg-wg-101.conf to Unix format...
2023-12-14 11:03:19 [INFO] VPN remote line defined as '<IP_ADDRESS>:51820'
2023-12-14 11:03:19 [INFO] VPN_REMOTE defined as '<IP_ADDRESS>'
2023-12-14 11:03:19 [INFO] VPN_PORT defined as '51820'
2023-12-14 11:03:19 [INFO] VPN_PROTOCOL set as 'udp', since WireGuard is always udp.
2023-12-14 11:03:19 [INFO] VPN_DEVICE_TYPE set as 'cz-prg-wg-101'
2023-12-14 11:03:19 [ERROR] Trying to run in unprivileged mode but net.ipv4.conf.all.src_valid_mark = 0
[cont-init.d] 02-vpn.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Trying empty line in ovpn next, thats even more insane :)))

qbittorrent started but can't access the webui. anyway to revert to an earlier version?

It seems there is quite too many issues with this upstream version, so I think i'll drop back wireguard support and revert to the previous version.

Hi, I'll revert to the previous upstream image middle of next week due to the many bugs with the new upstream image

That's great, thank you!

I've tried pushing back the old code but although mullvad was working on my new addon version I can't get it to work on the old code ;-)

That's weird, I was using it with Mullvad for like a year 😂🥲 I'll try fishing out some old backups or something

It's perhaps my config and yours would work!

Well, it doesn't ;)
The default Mullvad config is UDP, is TCP preferred?
set to 1500
2023-12-22 13:08:01 TUN/TAP device tun0 opened
2023-12-22 13:08:01 /sbin/ip link set dev tun0 up mtu 1500
2023-12-22 13:08:01 /sbin/ip link set dev tun0 up
2023-12-22 13:08:01 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-22 13:08:01 /sbin/ip link set dev tun0 up mtu 1500
2023-12-22 13:08:01 /sbin/ip link set dev tun0 up
2023-12-22 13:08:01 /sbin/ip -6 addr add fdda:d0d0:cafe:1300::1009/64 dev tun0
RTNETLINK answers: Permission denied
2023-12-22 13:08:01 Linux ip -6 addr add failed: external program exited with error status: 2
2023-12-22 13:08:01 Exiting due to fatal error

With TCP is says "AUTH: Received control message: AUTH_FAILED,[TOO_MANY_CONNECTIONS] This Mullvad account is already used by the maximum number of simultaneous connections"...
the VPN is literally used by this QB client, and that's it. That's probably some caching BS on Mullvad's side. Oh well.

Same with TCP 80

And when I add "pull-filter ignore "route-ipv6"
pull-filter ignore "ifconfig-ipv6" as per my own advice wioth a similar issue a year ago, I get "AUTH: Received control message: AUTH_FAILED,[TOO_MANY_CONNECTIONS] This Mullvad account is already used by the maximum number of simultaneous connections" even when this QB instance is literally the only thing that uses my Mullvad acct.
I think this is a confluence of multiple things, and as such almost impossible to fix.

Hi, you probably have the right Solution but the code previously spammed the mullvad server which led to a temporary ip ban. If you retry in an hour it should remove that message!

Nope, the Mullvad "too many connections" is when their servers get repeatedly hammered by the addon, so it ultimately fails.
This is going on: https://github.com/alexbelgium/hassio-addons/issues/1127#issuecomment-1867654120

So I was indeed placing the new VPN config files in the wrong folder AGAIN (/config/openvpn) - please update the addon's docs as they tell me to put it in /config/openvpn) :) But even in the correct folder it does THIS
crond: crond (busybox 1.36.1) started, log level 5
100000000000000100000000000000100000000000000100000000000000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
100000000000000000000000000000000000000000000000000000000000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
100000000000000000000000000000000000000000000000000000000000
001000000000000000000000
11111111111111111111111111111111
111111111111
1111111
100000000000000000000000000000000000000000000000000000000000
000100000000000000000000
11111111111111111111111111111111
111111111111
0000001
100000000000000000000000000000000000000000000000000000000000
000001000000000000000000
01000000000000000000000000000000
111111111111
1111111
2023-12-22 17:30:04 Note: option tun-ipv6 is ignored because modern operating systems do not need special IPv6 tun handling anymore.
2023-12-22 17:30:04 Multiple --up scripts defined.  The previously configured script is overridden.
2023-12-22 17:30:04 Multiple --down scripts defined.  The previously configured script is overridden.
2023-12-22 17:30:04 OpenVPN 2.6.8 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
2023-12-22 17:30:04 library versions: OpenSSL 3.1.4 24 Oct 2023, LZO 2.10
2023-12-22 17:30:04 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-22 17:30:04 TCP/UDP: Preserving recently used remote address: [AF_INET]<IP_ADDRESS>:80
2023-12-22 17:30:04 Socket Buffers: R=[131072->1048576] S=[16384->1048576]
2023-12-22 17:30:04 Attempting to establish TCP connection with [AF_INET]<IP_ADDRESS>:80
2023-12-22 17:30:04 TCP connection established with [AF_INET]<IP_ADDRESS>:80
2023-12-22 17:30:04 TCPv4_CLIENT link local: (not bound)
2023-12-22 17:30:04 TCPv4_CLIENT link remote: [AF_INET]<IP_ADDRESS>:80
2023-12-22 17:30:04 TLS: Initial packet from [AF_INET]<IP_ADDRESS>:80, sid=63c8bf7f 96b11db2
2023-12-22 17:30:04 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-22 17:30:04 VERIFY OK: depth=2, C=SE, ST=Gotaland, L=Gothenburg, O=Amagicom AB, OU=Mullvad, CN=Mullvad Root CA v2<EMAIL_ADDRESS>2023-12-22 17:30:04 VERIFY OK: depth=1, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=Mullvad Intermediate CA v6<EMAIL_ADDRESS>2023-12-22 17:30:04 VERIFY KU OK
2023-12-22 17:30:04 Validating certificate extended key usage
2023-12-22 17:30:04 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-22 17:30:04 VERIFY EKU OK
2023-12-22 17:30:04 VERIFY OK: depth=0, C=SE, ST=Gotaland, O=Amagicom AB, OU=Mullvad, CN=cz-prg-ovpn-102.mullvad.net<EMAIL_ADDRESS>2023-12-22 17:30:04 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, peer certificate: 4096 bits RSA, signature: RSA-SHA256, peer temporary key: 253 bits X25519
2023-12-22 17:30:04 [cz-prg-ovpn-102.mullvad.net] Peer Connection Initiated with [AF_INET]<IP_ADDRESS>:80
2023-12-22 17:30:04 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-12-22 17:30:04 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-12-22 17:30:05 SENT CONTROL [cz-prg-ovpn-102.mullvad.net]: 'PUSH_REQUEST' (status=1)
2023-12-22 17:30:05 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS <IP_ADDRESS>,redirect-gateway def1 bypass-dhcp,route-ipv6 0000::/2,route-ipv6 4000::/2,route-ipv6 8000::/2,route-ipv6 C000::/2,route-gateway <IP_ADDRESS>,topology subnet,socket-flags TCP_NODELAY,ifconfig-ipv6 fdda:d0d0:cafe:80::1005/64 fdda:d0d0:cafe:80::,ifconfig <IP_ADDRESS> <IP_ADDRESS>,peer-id 2,cipher AES-256-GCM,protocol-flags cc-exit tls-ekm dyn-tls-crypt,tun-mtu 1500'
2023-12-22 17:30:05 Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
2023-12-22 17:30:05 Options error: option 'redirect-gateway' cannot be used in this context ([PUSH-OPTIONS])
2023-12-22 17:30:05 Pushed option removed by filter: 'route-ipv6 0000::/2'
2023-12-22 17:30:05 Pushed option removed by filter: 'route-ipv6 4000::/2'
2023-12-22 17:30:05 Pushed option removed by filter: 'route-ipv6 8000::/2'
2023-12-22 17:30:05 Pushed option removed by filter: 'route-ipv6 C000::/2'
2023-12-22 17:30:05 Pushed option removed by filter: 'ifconfig-ipv6 fdda:d0d0:cafe:80::1005/64 fdda:d0d0:cafe:80::'
2023-12-22 17:30:05 OPTIONS IMPORT: --socket-flags option modified
2023-12-22 17:30:05 Socket flags: TCP_NODELAY=1 succeeded
2023-12-22 17:30:05 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-22 17:30:05 OPTIONS IMPORT: route-related options modified
2023-12-22 17:30:05 OPTIONS IMPORT: tun-mtu set to 1500
2023-12-22 17:30:05 TUN/TAP device tun0 opened
2023-12-22 17:30:05 /sbin/ip link set dev tun0 up mtu 1500
2023-12-22 17:30:05 /sbin/ip link set dev tun0 up
2023-12-22 17:30:05 /sbin/ip addr add dev tun0 <IP_ADDRESS>/16
2023-12-22 17:30:05 /etc/openvpn/up.sh tun0 1500 0 <IP_ADDRESS> <IP_ADDRESS> init
2023-12-22 17:30:05 Initialization Sequence Completed
2023-12-22 17:30:05 Data Channel: cipher 'AES-256-GCM', peer-id: 2
2023-12-22 17:30:05 Timers: ping 10, ping-restart 60
2023-12-22 17:30:05 Protocol options: protocol-flags cc-exit tls-ekm dyn-tls-crypt
s6-notifyoncheck: fatal: s6-supervise not running.
100000000000000100000000000000100000000000000100000000000000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
100000000000000000000000000000000000000000000000000000000000
111111111111111111111111
11111111111111111111111111111111
111111111111
1111111
100000000000000000000000000000000000000000000000000000000000
001000000000000000000000
11111111111111111111111111111111
111111111111
1111111
100000000000000000000000000000000000000000000000000000000000
000100000000000000000000
11111111111111111111111111111111
111111111111
0000001
100000000000000000000000000000000000000000000000000000000000
000001000000000000000000
01000000000000000000000000000000
111111111111
1111111

that's new... hanging on this for minutes now

In the new version it works on my system :)

and what do you use for mullvad? TCP? UDP? some advanced adjustments?

Here is my config :
client
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
verb 3
remote-cert-tls server
ping 10
ping-restart 60
sndbuf 524288
rcvbuf 524288
cipher AES-256-GCM
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384
proto tcp
auth-user-pass mullvad_userpass.txt
ca /etc/openvpn/mullvad_ca.crt
tun-ipv6
script-security 2
remote-random
remote <IP_ADDRESS> 443 # cz-prg-ovpn-101
remote <IP_ADDRESS> 443 # cz-prg-ovpn-102

Hey! Your config works!
i was served this
client
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
verb 3
remote-cert-tls server
ping 10
ping-restart 60
sndbuf 524288
rcvbuf 524288
cipher AES-256-GCM
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384
proto tcp
auth-user-pass mullvad_userpass.txt
ca mullvad_ca.crt
tun-ipv6
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
remote-random
remote <IP_ADDRESS> 80 # cz-prg-ovpn-102
remote <IP_ADDRESS> 80 # cz-prg-ovpn-101
🤷

Thanks ; so the difference is that I added the path to the certificate (i think otherwise there is a message saying that the file is not found) and I removed the up and down. Probably I can automatize this !

I tried with your script changing only ca mullvad_ca.crt to ca /etc/openvpn/mullvad_ca.crt and it worked too!

it's all rather brittle and hard to diagnose, but we've made it .) thanks!

Ok now I'll avoid touching the core code :) I'll just add some elements to robust the code (such as automatic corrections of files path) and probably also implement wire guard but as an addon without touching to the OpenVPN code. Thanks very much for bearing with all this mess ! Enjoy the addon !

thank you for sticking with it :) i do enjoy it very much