Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPP not available #4201

Closed
yisonPylkita opened this issue Jun 20, 2019 · 20 comments
Closed

PPP not available #4201

yisonPylkita opened this issue Jun 20, 2019 · 20 comments
Assignees
Labels
wsl2 Issue/feature applies to WSL 2

Comments

@yisonPylkita
Copy link

Windows version: Microsoft Windows [Version 10.0.18917.1000]

I was trying to connect to a VPN and my client (openfortivpn) requires ppp.
After running pppd I got this error

➜  pppd
Couldn't open the /dev/ppp device: No such device or address
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.43-microsoft-standard/modules.dep.bin'
modprobe: FATAL: Module ppp_generic not found in directory /lib/modules/4.19.43-microsoft-standard                                                                                                                                                                                        pppd: Please load the ppp_generic kernel module.
@onomatopellan
Copy link

Yes, another thing the WSL2 linux kernel lacks right now. If you feel adventurous, in #4203 you have an example of how to reconfigure, compile and replace the kernel yourself.

@benhillis
Copy link
Member

Can you describe your scenario? Does connecting to the the VPN via Windows work?

@therealkenc
Copy link
Collaborator

Some wrongthinking VPNs use PPTP, sure, and there will always be Windows solutions for those. [There are Windows solutions for a lot of things...] But /dev/ppp and pppd has other use cases, like PPP over PTY. Problem with the long tail of the Linux kernel modules is there is a use case for all of them.

Not saying it should be enabled. Not saying it shouldn't. Saying it is a long long tail.

@yisonPylkita
Copy link
Author

@benhillis I tried connect to a VPN in Windows a few time in them past, but every time I failed. (fortinet client doesn't seem to support stuff like realm). So I used a VM with a Linux and I could connect without problems.

Yet working on Windows and using Linux VM at the same time is rather troublesome so I tried to switch to Windows entirely and use WSL whenever I need a CLI. This support for PPP is the only thing that holds me back from doing so.

@uishon
Copy link

uishon commented Jun 21, 2019

Same for me. Tried working with openfortivpn on wsl2 and got an error that pppd is not found. So, I went ahead, installed ppp (apt-get install ppp) and retried openfortivpn but got a read/write error. Ran it again in verbose mode to find the root cause and got this:

  ...
  DEBUG:  pppd_write thread
  ERROR:  read: Input/output error
  INFO:   Cancelling threads...
  DEBUG:  Waiting for pppd to exit...
  DEBUG:  waitpid: pppd exit status code 4
  ...

whereas exit code 4 means (from the manpage)

  4      The  kernel  does  not  support  PPP,  for  example, the PPP kernel driver is not included or cannot be
          loaded. 

Any plans to include ppp in wsl2?

@benhillis
Copy link
Member

Thanks for the information, I will get /dev/ppp added to the kernel config.

@benhillis benhillis self-assigned this Jun 22, 2019
@benhillis benhillis added fixinbound wsl2 Issue/feature applies to WSL 2 labels Jun 22, 2019
@uishon
Copy link

uishon commented Jun 22, 2019 via email

@dylman123
Copy link

Hi, any progress on this issue?

@therealkenc
Copy link
Collaborator

Yep, here. /dev/ppp is live on 18950, at least.

Although, that CONFIG_PPPOE is not set looks problematic, for some scenarios, anyway. FWIW this is how Ubuntu's native kernel ships.

$ grep PPP config-5.0.0-20-generic 
CONFIG_PPP=y
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPPOATM=m
CONFIG_PPPOE=m
CONFIG_PPPOL2TP=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m

@uishon
Copy link

uishon commented Aug 11, 2019

Just tried it out again - build 18956.
Seems like ppp is now supported by the kernel (thanks!) but still - openfortivpn is not working. Here is the openfortivpn log with the errors I'm getting now:

INFO:   Connected to gateway.
INFO:   Authenticated.
INFO:   Remote gateway has allocated a VPN.
ERROR:  read: Input/output error
INFO:   Cancelling threads...
ERROR:  pppd: Has detached, or otherwise the connection was successfully established and terminated at the peer's request.
INFO:   Terminated pppd.
INFO:   Closed connection to gateway.
INFO:   Logged out.

When checking the pppd log, I see the following error:

Couldn't set tty to PPP discipline: Invalid argument

Any idea?

@Biswa96
Copy link

Biswa96 commented Aug 11, 2019

I found that CONFIG_PPP_SYNC_TTY is not set in WSL/Linux kernel config.

@uishon
Copy link

uishon commented Aug 11, 2019

Thanks. If it helps, here is the strace output - strace.log.

@therealkenc
Copy link
Collaborator

I found that CONFIG_PPP_SYNC_TTY is not set in WSL/Linux kernel config.

Correct, I linked that in my previous post. None of the suboptions are set, and needless to say, anything that depends on the suboption being available (here, arbitrarily, openfortivpn and CONFIG_PPP_SYNC_TTY) isn't going to work.

All of them are available, either as a module or =y in native Ubuntu.

# CONFIG_PPP is not set
CONFIG_PPP=y
# CONFIG_PPP_BSDCOMP is not set
# CONFIG_PPP_DEFLATE is not set
# CONFIG_PPP_FILTER is not set
# CONFIG_PPP_MPPE is not set
# CONFIG_PPP_MULTILINK is not set
# CONFIG_PPPOE is not set
# CONFIG_PPP_ASYNC is not set
# CONFIG_PPP_SYNC_TTY is not set

@Biswa96
Copy link

Biswa96 commented Aug 18, 2019

FYI, those options are now enabled in WSL2-Linux-Kernel repository in linux-msft-wsl-4.19.y branch, see the commit on Aug 17, 2019.

@uishon
Copy link

uishon commented Oct 7, 2019

Just checked it with insiders build 18995. openfortivpn works 👍. Thanks.

@therealkenc
Copy link
Collaborator

Great thanks for the confirm.

@francovp
Copy link

francovp commented Oct 16, 2019

I'm on build 18999 and it doesn't work. I'm still receiving
pppd: The kernel does not support PPP

I need to use WSL2 to make it work?

@uishon
Copy link

uishon commented Oct 18, 2019 via email

@francovp
Copy link

francovp commented Oct 18, 2019

Its working now, I think it's because I was using WSL1. I switch to WSL2 and now is working fine :)

@uishon
Copy link

uishon commented Oct 18, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wsl2 Issue/feature applies to WSL 2
Projects
None yet
Development

No branches or pull requests

8 participants