{"id":228,"date":"2009-10-16T14:35:09","date_gmt":"2009-10-16T18:35:09","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=228"},"modified":"2013-03-20T08:40:05","modified_gmt":"2013-03-20T12:40:05","slug":"howto-enable-tun-module-on-a-vps","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/howto-enable-tun-module-on-a-vps","title":{"rendered":"Howto: Enable TUN module on a VPS for VPN"},"content":{"rendered":"<p><strong>TUN module is required to configure VPN (Virtual Private Network) tunneling<\/strong> on a VPS,. The TUN module has to be enabled on the Hardware node as well as on the VPS from the node itself.\u00a0 <strong>Login to your Host server and execute the following command:<\/strong><\/p>\n<p><strong>First check if the TUN module is enabled on the hardware node:<\/strong><\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"><strong><code>lsmod | grep tun<\/code><\/strong><\/span><\/pre>\n<\/blockquote>\n<p>If not, <strong>load the module using modprobe<\/strong>:<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"><strong><code>modprobe tun<\/code><\/strong><\/span><\/pre>\n<\/blockquote>\n<p>Now, <strong>enable the TUN module on a VPS:<\/strong><\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"><strong>vzctl set VEID --devices c:10:200:rw --save\r\nvzctl exec VEID mkdir -p \/dev\/net\r\nvzctl exec VEID\u00a0 mknod \/dev\/net\/tun c 10 200\r\nvzctl exec VEID\u00a0 chmod 600 \/dev\/net\/tun<\/strong><\/span><\/pre>\n<\/blockquote>\n<p><strong>where, VEID is the VPS ID<\/strong> you want to enable the TUN module on. Once done, you can configure VPN on the VPS using any available vpn server like OpenVPN.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TUN module is required to configure VPN (Virtual Private Network) tunneling on a VPS,. The TUN module has to be enabled on the Hardware node as well as on the VPS from the node itself.\u00a0 Login to your Host server and execute the following command:<br \/>\nFirst check if the TUN module is enabled on the hardware node:<\/p>\n<p>lsmod | grep tun<\/p>\n<p>If not, load the module using modprobe:<\/p>\n<p>modprobe tun<\/p>\n<p>Now, enable the TUN module on a VPS:<\/p>\n<p>vzctl set VEID &#8211;devices c:10:200:rw &#8211;save<br \/>\nvzctl exec VEID mkdir -p \/dev\/net<br \/>\nvzctl exec VEID\u00a0 mknod \/dev\/net\/tun c [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[256,258,259,254,257,255],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/228"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=228"}],"version-history":[{"count":8,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":2117,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions\/2117"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}