Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
25% Recurring Discount on NVMe VPS
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Operation not Permitted on TUN Device?

SilvengaSilvenga Member
edited January 2014 in Help

So I've had this server for a week or two. I connect all my servers to a private virtual network for security. But 3 days ago my OpenVPN tunnel went down to my network. I went to debug and found this:

TUN was working, but then just stopped. This is the error given:

# openvpn --mktun --dev tun0
Fri Jan 10 19:58:53 2014 Note: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted (errno=1)
Fri Jan 10 19:58:53 2014 Cannot ioctl TUNSETPERSIST(1) tun0: Bad file descriptor (errno=9)
Fri Jan 10 19:58:53 2014 Exiting

TUN is enabled:

# ls -l /dev/net/tun
crw-rw-rwT 1 root root 10, 200 Jan 10 16:45 /dev/net/tun

# cat /dev/net/tun
cat: /dev/net/tun: File descriptor in bad state

I contacted my provider to fix the issue. He reported that he followed these steps on my container:
http://openvz.org/VPN_via_the_TUN/TAP_device

There was no change and the ticket is now categorized under "Server Related Queue".

Is there solution or fix that any has found? And is there a way to figure out if this is my issue or my provider's? Or any other helpful information.

Thanks for any assistance.

Comments

  • Even though tun/tap is enabled in OpenVZ, you can't create persistent devices, which is what you're doing with the command "openvpn --mktun --dev tun0".

  • @petris

    Thanks, but that was only an example, that is not what I am trying to do. The same error is found within the logs of OpenVPN on startup. (I could be wrong but OpenVPN calls that command on startup anyway).

  • Whoa, fixed by running "rm /dev/net/tun" and re-enable tun. Why does that work?

Sign In or Register to comment.