Page 1 of 1

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

Posted: Wed Dec 20, 2023 8:40 pm
by brendan
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"

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

Posted: Wed Dec 20, 2023 11:07 pm
by brendan
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.