ERROR: Cannot ioctl TUNSETIFF tap0: Invalid argument (errno=22)

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
brendan
OpenVPN Power User
Posts: 110
Joined: Wed Oct 19, 2011 1:19 am

ERROR: Cannot ioctl TUNSETIFF tap0: Invalid argument (errno=22)

Post by brendan » Wed Dec 20, 2023 8:40 pm

i am trying to bring up what used to be a working config, and am running into an issue. i am starting openvpn and it fails with the error:

ERROR: Cannot ioctl TUNSETIFF tap0: Invalid argument (errno=22)

the os is fedora 38, fully updated, and i have systemd-networkd configure the bridge and tap0 interfaces. i have an up and down script, but i dont think they are needed. is there anything i am missing or doing wrong in the configs?

Code: Select all

# TAP Config on UDP/1194
mode server
tls-server
local sslvpn-tap.bpk2.com
port 1194
management 127.0.0.1 7505
proto udp
dev mktun
dev tap0
script-security 2
up TapUp.sh
ca ca.crt
cert sslvpn.crt
key sslvpn.key
tls-crypt-v2 v2crypt-server.key force-cookie
dh dh.pem
cipher AES-256-GCM
askpass phrase
auth sha256
auth-nocache
server-bridge
push "redirect-gateway def1"
push "route-gateway dhcp"
passtos
keepalive 10 120
fast-io
user nobody
group nobody
ping-timer-rem
persist-tun
persist-key
verb 4
mute 20
plugin /usr/lib64/openvpn/plugins/openvpn-auth-ldap.so "/etc/openvpn/auth/ldap.conf"

brendan
OpenVPN Power User
Posts: 110
Joined: Wed Oct 19, 2011 1:19 am

Re: ERROR: Cannot ioctl TUNSETIFF tap0: Invalid argument (errno=22)

Post by brendan » Wed Dec 20, 2023 11:07 pm

nevermind. i stopped configuring the tap interface in systemd-networkd and things are working now. the up/down script does what i need and things are now working.

Post Reply