{"id":1939,"date":"2011-08-17T18:50:54","date_gmt":"2011-08-17T18:50:54","guid":{"rendered":"https:\/\/supportex.net\/?p=1939"},"modified":"2019-05-10T19:58:21","modified_gmt":"2019-05-10T17:58:21","slug":"troubleshooting-open-tuntap-dev-devnettun","status":"publish","type":"post","link":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/","title":{"rendered":"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun"},"content":{"rendered":"<p>If you are getting error &#8216;<em>Cannot open TUN\/TAP dev \/dev\/net\/tun<\/em>&#8216; while starting <a href=\"http:\/\/openvpn.net\">OpenVPN<\/a> server, it means that you should load &#8216;tun&#8217; module which features TUN\/TAP device driver:<\/p>\n<blockquote><p>OpenVPN 2.1.1 i386-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Jan 26 2010<br \/>\nNOTE: the current &#8211;script-security setting may allow this configuration to call user-defined scripts<br \/>\nLZO compression initialized<br \/>\nNote: Cannot open TUN\/TAP dev \/dev\/net\/tun: No such device (errno=19)<br \/>\nNote: Attempting fallback to kernel 2.2 TUN\/TAP interface<br \/>\nCannot allocate TUN\/TAP dev dynamically<\/p><\/blockquote>\n<p>To load module you should use <em>modprobe<\/em> command:<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">modprobe tun<\/code><\/p>\n<p>If no error apeared you will be able to check it with <em>lsmod<\/em>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">[root@server1 ~]# lsmod | grep tun\ntun 14455 2\n[root@server1 ~]#<\/pre>\n<p>Afetr that you can start OpenVPN server:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">[root@server1 ~]# \/etc\/init.d\/openvpn start\nStarting openvpn: \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 [ OK ]\n[root@server1 ~]#<\/pre>\n<p>Note that if you use <a href=\"http:\/\/wiki.openvz.org\/Main_Page\">OpenVZ<\/a> -based VPS you might need to contact your provider or enable it in control panel.<\/p>\n<p><strong>Didn&#8217;t find the answer to your question? <a href=\"\/contacts\/\">Ask it<\/a> our administrators to reply we will publish on website.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are getting error &#8216;Cannot open TUN\/TAP dev \/dev\/net\/tun&#8216; while starting OpenVPN server, it means that you should load &#8216;tun&#8217; module which features TUN\/TAP device driver: OpenVPN 2.1.1 i386-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Jan 26 2010 NOTE: the current &#8211;script-security setting may allow this configuration to call user-defined scripts LZO compression initialized&hellip; <\/p>\n<div class=\"readmore-wrapper\"><a href=\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/\" class=\"more-link\">Read <\/a><\/div>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[152],"tags":[275,237],"class_list":["post-1939","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-openvpn"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun &#8211; Supportex.NET blog<\/title>\n<meta name=\"description\" content=\"How to fix &quot;Cannot open TUN\/TAP dev \/dev\/net\/tun&quot;\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun &#8211; Supportex.NET blog\" \/>\n<meta property=\"og:description\" content=\"How to fix &quot;Cannot open TUN\/TAP dev \/dev\/net\/tun&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/\" \/>\n<meta property=\"og:site_name\" content=\"Supportex.NET blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-08-17T18:50:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-10T17:58:21+00:00\" \/>\n<meta name=\"author\" content=\"Oleksii Tykhonov\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oleksii Tykhonov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/\"},\"author\":{\"name\":\"Oleksii Tykhonov\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251\"},\"headline\":\"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun\",\"datePublished\":\"2011-08-17T18:50:54+00:00\",\"dateModified\":\"2019-05-10T17:58:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/\"},\"wordCount\":161,\"commentCount\":0,\"keywords\":[\"linux\",\"openvpn\"],\"articleSection\":[\"linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/\",\"url\":\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/\",\"name\":\"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun &#8211; Supportex.NET blog\",\"isPartOf\":{\"@id\":\"https:\/\/supportex.net\/blog\/en\/#website\"},\"datePublished\":\"2011-08-17T18:50:54+00:00\",\"dateModified\":\"2019-05-10T17:58:21+00:00\",\"author\":{\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251\"},\"description\":\"How to fix \\\"Cannot open TUN\/TAP dev \/dev\/net\/tun\\\"\",\"breadcrumb\":{\"@id\":\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/supportex.net\/blog\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#website\",\"url\":\"https:\/\/supportex.net\/blog\/en\/\",\"name\":\"Supportex.NET blog\",\"description\":\"Server and network management company\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/supportex.net\/blog\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251\",\"name\":\"Oleksii Tykhonov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4fd5f58002717075c88963469b9babef?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4fd5f58002717075c88963469b9babef?s=96&d=mm&r=g\",\"caption\":\"Oleksii Tykhonov\"},\"url\":\"https:\/\/supportex.net\/blog\/author\/oleksiitykhonov\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun &#8211; Supportex.NET blog","description":"How to fix \"Cannot open TUN\/TAP dev \/dev\/net\/tun\"","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/","og_locale":"en_US","og_type":"article","og_title":"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun &#8211; Supportex.NET blog","og_description":"How to fix \"Cannot open TUN\/TAP dev \/dev\/net\/tun\"","og_url":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/","og_site_name":"Supportex.NET blog","article_published_time":"2011-08-17T18:50:54+00:00","article_modified_time":"2019-05-10T17:58:21+00:00","author":"Oleksii Tykhonov","twitter_misc":{"Written by":"Oleksii Tykhonov","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/#article","isPartOf":{"@id":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/"},"author":{"name":"Oleksii Tykhonov","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251"},"headline":"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun","datePublished":"2011-08-17T18:50:54+00:00","dateModified":"2019-05-10T17:58:21+00:00","mainEntityOfPage":{"@id":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/"},"wordCount":161,"commentCount":0,"keywords":["linux","openvpn"],"articleSection":["linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/","url":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/","name":"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun &#8211; Supportex.NET blog","isPartOf":{"@id":"https:\/\/supportex.net\/blog\/en\/#website"},"datePublished":"2011-08-17T18:50:54+00:00","dateModified":"2019-05-10T17:58:21+00:00","author":{"@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251"},"description":"How to fix \"Cannot open TUN\/TAP dev \/dev\/net\/tun\"","breadcrumb":{"@id":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/supportex.net\/blog\/2011\/08\/troubleshooting-open-tuntap-dev-devnettun\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/supportex.net\/blog\/en\/"},{"@type":"ListItem","position":2,"name":"Troubleshooting: Cannot open TUN\/TAP dev \/dev\/net\/tun"}]},{"@type":"WebSite","@id":"https:\/\/supportex.net\/blog\/en\/#website","url":"https:\/\/supportex.net\/blog\/en\/","name":"Supportex.NET blog","description":"Server and network management company","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/supportex.net\/blog\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/0690c26a0266603129fc15eae6243251","name":"Oleksii Tykhonov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4fd5f58002717075c88963469b9babef?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4fd5f58002717075c88963469b9babef?s=96&d=mm&r=g","caption":"Oleksii Tykhonov"},"url":"https:\/\/supportex.net\/blog\/author\/oleksiitykhonov\/"}]}},"_links":{"self":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/1939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/comments?post=1939"}],"version-history":[{"count":2,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/1939\/revisions"}],"predecessor-version":[{"id":3214,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/1939\/revisions\/3214"}],"wp:attachment":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/media?parent=1939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/categories?post=1939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/tags?post=1939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}