Results 1 to 3 of 3

Thread: VPN - ERROR: Cannot ioctl TUNSETIFF tun0: Device or resource busy (errno=16)

  1. #1
    Join Date
    Jan 2011
    Beans
    14

    Question VPN - ERROR: Cannot ioctl TUNSETIFF tun0: Device or resource busy (errno=16)

    I am trying to connect to TunnelBear VPN, this uses certificates and user and password. After importing the configuration i try to run it from the UX but in syslog i see

    Code:
    Jun 7 09:10:06 bizmate-i7 NetworkManager[1735]: <info> [1717737006.9673] vpn[0x55c1f3a78230,38417925-e00b-4cab-bc9c-9d741c81a2fc,"TunnelBear_Italy"]: starting openvpn Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: WARNING: --keysize is DEPRECATED and will be removed in OpenVPN 2.6 Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: OpenVPN 2.5.9 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 29 2023 Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: library versions: OpenSSL 3.0.2 15 Mar 2022, LZO 2.10 Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: WARNING: --ns-cert-type is DEPRECATED. Use --remote-cert-tls instead. Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: TCP/UDP: Preserving recently used remote address: [AF_INET]98.98.148.148:443 Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: UDP link local: (not bound) Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: UDP link remote: [AF_INET]98.98.148.148:443 Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: NOTE: chroot will be delayed because of --client, --pull, or --up-delay Jun 7 09:10:07 bizmate-i7 nm-openvpn[41760]: NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay Jun 7 09:10:09 bizmate-i7 nm-openvpn[41760]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1549', remote='link-mtu 1570' Jun 7 09:10:09 bizmate-i7 nm-openvpn[41760]: WARNING: 'auth' is used inconsistently, local='auth [null-digest]', remote='auth SHA256' Jun 7 09:10:09 bizmate-i7 nm-openvpn[41760]: WARNING: 'comp-lzo' is present in remote config but missing in local config, remote='comp-lzo' Jun 7 09:10:09 bizmate-i7 nm-openvpn[41760]: [5469/server] Peer Connection Initiated with [AF_INET]98.98.148.148:443 Jun 7 09:10:10 bizmate-i7 nm-openvpn[41760]: sitnl_send: rtnl: generic error (-101): Network is unreachable Jun 7 09:10:10 bizmate-i7 nm-openvpn[41760]: ERROR: Cannot ioctl TUNSETIFF tun0: Device or resource busy (errno=16) Jun 7 09:10:10 bizmate-i7 nm-openvpn[41760]: Exiting due to fatal error Jun 7 09:10:10 bizmate-i7 NetworkManager[1735]: <warn> [1717737010.3175] vpn[0x55c1f3a78230,38417925-e00b-4cab-bc9c-9d741c81a2fc,"TunnelBear_Italy"]: dbus: failure: connect-failed (1)
    I have looked around and some non strictly ubuntu posts suggest that openvpn might need to be restarted and ensure the service is not blocking the port before starting it again and connecting. But this did not work. Also the network unreachable seems to be suggesting that i cannot connect to the VPN server but i doubt that is the actual error.

    If you have any suggestions please let me know . Also if you want to try it the linux configuration page is a bit outdated, you will need:
    - config file (I am trying to connect to the italian server) https://tunnelbear.s3.amazonaws.com/...ux/openvpn.zip
    - Add a line break after cert UserCertificate.crt and enter key PrivateKey.key . Save the file.
    - Download the Private Key here, unzip and add it to the openvpn folder.
    - Try setting the configuration up once more following the guide, and see if things work now.

  2. #2
    currentshaft Guest

    Re: VPN - ERROR: Cannot ioctl TUNSETIFF tun0: Device or resource busy (errno=16)

    I would probably start by addressing the warning messages and align configurations between server and client.

    Check to see for other services bound to utun0 - do you have multiple VPN processes trying to start?

    Take a packet capture with tcpdump locally and see if the server is responding as expected.

    Just some ideas of things to try.

  3. #3
    Join Date
    Jan 2011
    Beans
    14

    Re: VPN - ERROR: Cannot ioctl TUNSETIFF tun0: Device or resource busy (errno=16)

    Hi, thank you for the suggestion

    I made another attempt but instead of restarting openvpn i simply killed it. Once done i was able to connect to the VPN, I assume the openvpn is only needed if i actually run a gateway from my machine and not needed if i want to connect as a client.

    Anyhow it is working now

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •