What's new

OpenVPN ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

sunmast

New Around Here
Hi,

Today I'm setting up my RT-N66W router as a openvpn client from start up script. When testing the simplest static key configuration, I encountered this error:

wei@RT-N66W:/jffs/vpn# openvpn dy.conf
Sun Mar 13 21:57:05 2016 OpenVPN 2.3.8 mipsel-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Dec 24 2015
Sun Mar 13 21:57:05 2016 library versions: OpenSSL 1.0.2e 3 Dec 2015, LZO 2.08
Sun Mar 13 21:57:05 2016 WARNING: file 'static.key' is group or others accessible
Sun Mar 13 21:57:05 2016 ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Sun Mar 13 21:57:05 2016 Exiting due to fatal error

I was using the same configuration which was used on a Ubuntu server which works fine for years, but here it complains cannot open TUN/TAP devices.

Any ideals? Thanks!
 
As the error says, you are missing the tun interface. This is automatically created by the router if you use its built-in OpenVPN support - there's little reason for you to manually do everything. But if you must:

Code:
modprobe tun
openvpn --mktun --dev tun1
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Top