Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install missing tun module and for Ubuntu 12.04/user-mode linux
sudo apt-get install uml-utilities build-essential linux-headers-`uname -r`
mkdir faketun
cd faketun
echo -e "#include <linux/module.h>\nstatic int start__module(void) {return 0;}\nstatic void end__module(void){return;}\nmodule_init(start__module);\nmodule_exit(end__module);">tun.c
echo -e "obj-m += tun.o\nall:\n\tmake -C /lib/modules/\$(shell uname -r)/build/ M=\$(PWD) modules\nclean:\n\tmake -C /lib/modules/\$(shell uname -r)/build/ M=\$(PWD) clean\nclean-files := Module.symvers">Makefile
sudo install tun.ko /lib/modules/`uname -r`/kernel/net/tun.ko
sudo depmod -a
sudo modprobe tun

This comment has been minimized.

Copy link

@erm3nda erm3nda commented May 24, 2015

Did not test before for a previous install of faketun? If it's installed drops a lot of unnecesary errors.
Im my particular case i got a lot of them. I've created a pastebin with the info. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.