WhitewaterFoundry / Fedora-Remix-for-WSL

Fedora Remix for Windows Subsystem for Linux.
Other
693 stars 51 forks source link

Pinging google.com says I need to set cap_net_raw+p capability or setuid #185

Open filbotblue opened 1 year ago

filbotblue commented 1 year ago

Describe the bug

A clear and concise description of what the bug is.

Fedora Remix for WSL was working earlier this month, but a VPN update was introduced for Global Protect VPN which has made DNS stop working inside the WSLv2 instance. I then rebooted, and received the following error when attempting to ping google.com.

To Reproduce

Steps to reproduce the behavior:

  1. Restart laptop, hard and start back up.
  2. Launch Windows Terminal.
  3. Open Fedora Remix for WSL, or type wsl
  4. Attempt to ping google.com.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

➜  dudleyp
> sudo ping google.com
[sudo] password for dudleyp:
ping: google.com: Name or service not known

➜  dudleyp
> ping google.com
ping: socktype: SOCK_RAW
ping: socket: Operation not permitted
ping: => missing cap_net_raw+p capability or setuid?

Additional context

Add any other context about the problem here.

Global Protect VPN was updated recently and the DNS seems to not resolve anymore.

Basic Troubleshooting Checklist

What other troubleshooting have you attempted?

I have disabled the VPN and the DNS started working. I have set the /etc/wsl.conf to not generate resolv.conf. This worked before, but our company updated the Global Protect VPN recently and stopped working.

Fedora Remix for WSL Version

Find: Settings->Apps->Apps & features->Fedora Remix for WSL Version->Advanced Options->Version.

Also, cat /etc/os-release

➜  dudleyp
> cat /etc/os-release
NAME="Fedora Remix for WSL"
VERSION="36"
ID=fedoraremixforwsl
ID_LIKE=fedora
VERSION_ID=36
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Remix for WSL"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
HOME_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
SUPPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
BUG_REPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues"
PRIVACY_POLICY_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/blob/master/PRIVACY.md"
FEDORA_REMIX_VERSION=36.0.5

Windows Build

Run 'systeminfo | findstr /C:"OS"' in Command Prompt and insert here:

For help on retrieving: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#check-your-build-number

C:\Users\dudleyp>systeminfo | findstr /C:"OS"
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19044 N/A Build 19044
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
OS Build Type:             Multiprocessor Free
BIOS Version:              HP Q90 Ver. 01.20.01, 2022-06-07
crramirez commented 1 year ago

Hello @filbotblue ,

Try this troubleshooting to manually set the DNS: https://gist.github.com/machuu/7663aa653828d81efbc2aaad6e3b1431#dns-resolution

You can also try this script: https://github.com/sakai135/wsl-vpnkit

ajmeese7 commented 11 months ago

The wsl-vpnkit solved this error for me, thanks a ton!!