Created
February 12, 2014 16:34
-
-
Save jmnwong/8959194 to your computer and use it in GitHub Desktop.
Install missing tun module and for Ubuntu 12.04/user-mode linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
make | |
sudo install tun.ko /lib/modules/`uname -r`/kernel/net/tun.ko | |
sudo depmod -a | |
sudo modprobe tun |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hmm this doesn't worked on linux kernel
5.4.0-1063-aws