5

I entered the following line in the modules.conf file under the /etc/modules-load.d/modules.conf path:

alias char-major-10-200 tun

And then I typed the following command from the Debian 9.5 Linux prompt:

$ depmod -a

But I received the following error messages:

"depmod: ERROR: could not open directory /lib/modules/4.4.0-17134-Microsoft: 
 No such file or directory"

and

"depmod: FATAL: could not search modules: No such file or directory"

The above-given "alias" code, and the command that follows it, were found at the following link: "http://bochs.sourceforge.net/doc/docbook/user/config-tuntap.html."

I'm trying to run miredo_1.2.3-1.1_amd64 (a Teredo server, if I understand it correctly) to establish a regular tunnel connection under my Debian version 9.5 Linux operating system. The miredo "README" file states that "CONFIG_TUN" and "CONFIG_IPV6" are required.

Any suggestions?

4

From your /lib/modules message you present us, it is obvious you are using Debian GNU/Linux for WSL (for Windows 10).

Unfortunately, the WSL kernel/Windows HAL operates with under a different abstraction layer / differently under Windows, and won't support some more esoteric functionalities that we take for given in a "regular" Linux kernel Debian implementation.

If you want to run such a software that plays with more advanced IP sockets functionalities, you have to run Debian in a VM, and not in Debian WSL.

For people using Windows 10 Pro, they are better suited using Hyper V. For your case, running VirtualBox (free) or VMWare will allow you to use your Teredo server.

depmod -a also does not work because WSL is neither using a true Linux kernel, nor is capable of loading Linux kernel modules.

See also the WSL Faq

Can I run ALL Linux apps in WSL?

No! WSL is a tool aimed at enabling users who need them to run Bash and core Linux command-line tools on Windows.

From 18 things you should know about using Linux tools in Windows 10

WSL is a Linux distro, not a Linux kernel

WSL installs a Linux distro on your PC. The Linux binaries make their system calls as usual but, Turner explains, those syscalls just go to the Windows kernel instead.

From Microsoft WSL github https://github.com/Microsoft/WSL/issues/2340

So is tun going to be implemented at any stage?

Unlikely for now.... there is no way, given the design of WSL, for WSL to load native Linux Kernel Modules. The ABI facing userspace on Linux is kept pretty stable between Linux Kernels, but the kernel-facing ABI (for drivers and modules) is constantly changing and shifting.

and again MS Github WSL project https://github.com/Microsoft/WSL/issues/874

Looks like you are requesting tun / tap device support. I don't think it will be implemented.

This is going to need specific kernel-side attention, it's not just a matter of having the userspace tools working. the reason why RTNETELINK is giving an 'invalid argument' error is that the kernel side of the socket doesn't exist right now.

You might compile, use or run binaries all day long in the userland, if the Linux kernel and the full ABI/support is not there, they won't work while the MS team does not emulate all the functionalities.

Just a quick note: WSL does not even run iptables firewall rules, or is even capable of running the script command.

I will say it again, you do not have your regular Linux kernel there, you have got an emulation "kernel" written by Microsoft engineers, translating/emulating a subset of the Linux kernel ABI/calls to the Windows HAL. A subset good enough to allow you to run a large percentage of scripts and user-land-binaries that do not try to implement typical advanced server services.

| improve this answer | |
  • Thank you Rui F Rubeiro. I suppose that since I am running Microsoft Windows 10 ( Home ) edition, that I will not be able to use the "depmod -a" command. – user301393 Jul 20 '18 at 15:13
  • Also, does this ( regarding the previous statement, above ) mean that I will not be able to run miredo under Windows Subsystem for Linux ( WSL ) Debian version 9.5 Linux? – user301393 Jul 20 '18 at 15:17
  • Rui F Ribeiro, I have downloaded and configured VirtualBox Version 5.2.16 r123759 (Qt5.6.2), but when I click the "Start" button ( Normal Start ), or just the "Start" button, I receive the following error message: "FATAL: No bootable medium found! System halted." Any suggestions? – user301393 Jul 20 '18 at 19:37
  • You will have to get a DVD iso image of Debian installation and install it as in a new virtual computer. However, I advise not abusing this thread, and opening a new one with new questions. – Rui F Ribeiro Jul 20 '18 at 19:39
  • You should consider putting these details into another Q that discusses pros/cons of WSL. – slm Jan 26 '19 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy