1

i installed Tun using:

modprobe tun

then did:

lsmod | grep tun
tun                    83840  0

Please how to make Tun running at reboot?

This is written on Hamachi website:

...Then add tun to the list of modules by using your favorite text editor and Create /etc/modules-load.d/tun.conf 

#Load tun module at boot.
tun

But this folder foes not exist in my /etc

Is it wise to add line "modprobe tun" into /etc/rc.local ?

16851556
  • 436
  • 2
  • 7
  • 19
  • Why do you need it running at reboot? What tool are you using that isn't auto-loading it as needed? – Zoredache Oct 24 '13 at 17:14
  • 1
    Some person requested it, and i assigned it to his virtual machine (openvz) – 16851556 Oct 25 '13 at 08:24
  • I assume you have seen this page? http://openvz.org/VPN_via_the_TUN/TAP_device. It has some suggestions – Zoredache Oct 25 '13 at 15:24
  • Yes, but i have not found on how to autostart it on boot. – 16851556 Oct 25 '13 at 21:24
  • You saw the line that said `To make sure that tun module will be automatically loaded on every reboot you can also add it or into /etc/modules.conf (on RHEL see /etc/sysconfig/modules/ directory`? Since you are using Centos the RHEL setting probably applies to you. – Zoredache Oct 25 '13 at 21:50
  • in the /etc/sysconfig/modules im unsure what should be the filecontent to properly load Tun – 16851556 Oct 26 '13 at 11:07
  • i just need to start it (modprobe tun) – 16851556 Oct 26 '13 at 14:07

1 Answers1

1

Is there a file named /etc/modules ? If yes, you can edit to add tun there

For CentOS check this out http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-kernel-modules-persistant.html

Execute these 2 commands will create the rc.modules with command to load the tun module at startup

echo modprobe tun >> /etc/rc.modules
chmod +x /etc/rc.modules
Wutiphong
  • 109
  • 3