{"id":801,"date":"2021-10-21T15:47:32","date_gmt":"2021-10-21T09:47:32","guid":{"rendered":"https:\/\/mellowhost.com\/blog\/?p=801"},"modified":"2021-10-21T15:47:32","modified_gmt":"2021-10-21T09:47:32","slug":"error-cannot-open-tun-tap-dev-dev-net-tun-no-such-file-or-directory-errno2-lxc-lxd","status":"publish","type":"post","link":"https:\/\/mellowhost.com\/blog\/error-cannot-open-tun-tap-dev-dev-net-tun-no-such-file-or-directory-errno2-lxc-lxd.html","title":{"rendered":"ERROR: Cannot open TUN\/TAP dev \/dev\/net\/tun: No such file or directory (errno=2) &#8211; LXC\/LXD"},"content":{"rendered":"\n<p>If you are seeing the above error in LXC, you need to do two things.<\/p>\n\n\n\n<ol><li>Make sure the LXC container is running on privileged mode. <\/li><li>Run the following commands inside the container:<\/li><\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mknod \/dev\/net\/tun c 10 200<\/pre>\n\n\n\n<p>Now, you may run the OpenVPN command to start the VPN client:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">openvpn --pull-filter ignore redirect-gateway --config ovpn.ovpn\n\n# assumming your vpn config file is ovpn.ovpn<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you are seeing the above error in LXC, you need to do two things. Make sure the LXC container is running on privileged mode. Run the following commands inside the container: Now, you may run the OpenVPN command to start the VPN client:<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12,587,294,423],"tags":[591,596,598,597],"_links":{"self":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/801"}],"collection":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/comments?post=801"}],"version-history":[{"count":1,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/801\/revisions"}],"predecessor-version":[{"id":802,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/801\/revisions\/802"}],"wp:attachment":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/media?parent=801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/categories?post=801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/tags?post=801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}