You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issues with ifconfig, sockets, nmap, ping, nslookup, dig and others not working #69
Reacted by Mads Syrak Larsen, Audrius, firstC, Alexandre Alapetite, Saumya Majumder, inxomnyaa, bmayen, sheepdestroyer, Yang Peng, William Hutson and 61 more
Reacted by Milos Ivanovic, ionstorm, Kagami Sascha Rosylight, Ashley, Ryan Chan, Caleb Wyllie, Max Mathys, Christopher Ngo, Eugene Ivanchenko, Anton and 10 more
Reacted by fishouttah20, William Guss, frnkblk, Zeno Zeng, Daniel Aleksandersen, darkdragon-001, firstC, inxomnyaa, Konstantin, Max Mathys and 2 more
changed the title [-]Issues with socket.c nmap,ping and nslookup not working. [/-][+]Issues with socket.c: nmap,ping,nslookup,dig and others not working. [/+]on Apr 8, 2016
All of the ones which produce "socket.c: 1915: internal_send ..." are BIND tools that don't seem to work here. You can install the Knot DNS equivalents which do, using apt-get install knot-host knot-dnsutils, to get working dig and host at least, though it doesn't seem like there's a Knot nslookup.
For the rest, it looks like only certain types of sockets can be created. Maybe raw sockets aren't permitted so we can only open TCP and UDP sockets? You would at least expect ICMP to be available though.
Yes, NETLINK sockets are currently not implemented. ICMP is also currently not supported. UDP and TCP sockets should work fine though. We will be tracking\prioritizing which features to light up next by looking at the feedback provided at the wpdev portal. We appreciate your feedback and please make sure to provide it through the wpdev portal as well. Looks like there is already a post tracking this which you can up vote (or add a new one):
@xiaoyu9964 Thanks for your patience and we understand that not having basic network tools working, can be frustrating. That being said, support for RAW/ICMPv4 sockets are being checked in our development branch. That should unblock ping. ping6 still doesn't work. We are working to unblock these scenarios as well in future. Meanwhile, please help us prioritize this by up voting this specific request in the User Voice page. Thanks again for trying WSL and providing feedback.
This issue is actually an aggregation of a bunch of bugs, some of which are known to be fixed. Could you please include your specific Windows build and which of the issues on this ticket you tested?
ping looks to be ok but still has some spookie latencies reported, like:
ping google.com
PING google.com (82.76.231.25) 56(84) bytes of data.
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=1 ttl=61 time=0.518 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=2 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=3 ttl=61 time=2.52 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=4 ttl=61 time=2.36 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=5 ttl=61 time=2.00 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=6 ttl=61 time=2.50 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=7 ttl=61 time=2.53 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=8 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=9 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=10 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=11 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=12 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=13 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=14 ttl=61 time=2.41 ms
windows build is Microsoft Windows [Version 10.0.14388]
Reacted by Akshit Jindal, Craig Woodward, Sourav Ghosh, Roger Filmyer, Matěj Račinský, haidescs, donnol and Unknown6656
Starting Nmap 7.70 ( https://nmap.org ) at 2020-02-05 13:19 -02
Problem binding to interface , errno: 92
socket_bindtodevice: Protocol not available
Problem binding to interface , errno: 92
WSL is just as it sounds: too good to be true. On OpenSuSE Leap 15.1, WSL2 root shell:
# mtr 1.1.1.1
Failure to open IPv4 sockets: Permission denied
Failure to open IPv6 sockets: Permission denied
mtr: Failure to start mtr-packet: Invalid argument
WSL is just as it sounds: too good to be true. On OpenSuSE Leap 15.1, WSL2 root shell:
Works for me under Ubuntu. I also just downloaded OpenSuSE Leap 15.1, changed it to WSL 2 and it worked fine for me as root. May want to do a wsl -l -v to verify your distro is set to use version 2.
I have a feeling your openSUSE may be running on WSL1
Rich Turner (@bitcrazed) You may be right, since the help is shown for wsl -l -v. Am I correct that Windows 10 2004 will bring WSL2 and a fix for this problem at the end of this month?
I stand corrected, I unintentionally used WSL1. Windows Insider program, Windows Update and upgrading my Linux distro to WSL2 solved the problem. Thank you!
As per the most passionately requests from the Linux community, we avoid automatically affecting your distros and apps - we don't upgrade your WSL distro instances, nor the binaries within them, and we do not auto-upgrade your WSL1 distros to WSL2 - that's something we leave to the user to perform via wsl.exe.
This MAY change in the future when WSL2 is provides >100% of WSL1's capabilities, but for now, while WSL1 and WSL2 have some different capabilities and behaviors, we leave it to you.
POLITE NOTE - please note that this issue is closed: if you have further issues with networking tech on WSL, please file a new issue with specific details about the issue you're seeing. Thanks.
@ghzwael Please note that, as stated, this issue is closed.
We recommend that you adopt WSL2 (and convert any existing distro installations to WSL instances) which will provide you with much more compatibility and near-native performance.
Rich Turner (@bitcrazed) Is this a joke? IPv6 still not really working in WSL2...so, to use networking tools, I should upgrade to WSL2 which breaks networking all together? That's no solution.
Activity
[-]Issues with socket.c nmap,ping and nslookup not working. [/-][+]Issues with socket.c: nmap,ping,nslookup,dig and others not working. [/+]Aneurin commentedon Apr 8, 2016
All of the ones which produce "socket.c: 1915: internal_send ..." are BIND tools that don't seem to work here. You can install the Knot DNS equivalents which do, using
apt-get install knot-host knot-dnsutils, to get workingdigandhostat least, though it doesn't seem like there's a Knotnslookup.For the rest, it looks like only certain types of sockets can be created. Maybe raw sockets aren't permitted so we can only open TCP and UDP sockets? You would at least expect ICMP to be available though.
sunilmut commentedon Apr 11, 2016
Yes, NETLINK sockets are currently not implemented. ICMP is also currently not supported. UDP and TCP sockets should work fine though. We will be tracking\prioritizing which features to light up next by looking at the feedback provided at the wpdev portal. We appreciate your feedback and please make sure to provide it through the wpdev portal as well. Looks like there is already a post tracking this which you can up vote (or add a new one):
https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13383789-enable-network-interface-enumeraration
nianyush commentedon Apr 26, 2016
so when this problem can be solved?
sunilmut commentedon Apr 26, 2016
@xiaoyu9964 Thanks for your patience and we understand that not having basic network tools working, can be frustrating. That being said, support for RAW/ICMPv4 sockets are being checked in our development branch. That should unblock ping. ping6 still doesn't work. We are working to unblock these scenarios as well in future. Meanwhile, please help us prioritize this by up voting this specific request in the User Voice page. Thanks again for trying WSL and providing feedback.
MadcowD commentedon May 1, 2016
This issue is causing issues with libzmq and other socket libraries.
Related issue is #134
Deshke commentedon Jul 17, 2016
any update on this? network is a rather big point and should work
aseering commentedon Jul 17, 2016
A lot has changed since this ticket was last updated. It's probably be worth re-testing the specific issues reported here.
ldanicel commentedon Jul 17, 2016
I just fresh installed 4 days ago and it acts the same.
aseering commentedon Jul 17, 2016
This issue is actually an aggregation of a bunch of bugs, some of which are known to be fixed. Could you please include your specific Windows build and which of the issues on this ticket you tested?
aseering commentedon Jul 17, 2016
In particular, off the top of my head, ping is #18 and libzmq is #185.
Note that both are fixed with caveats; more details are available on those tickets.
ldanicel commentedon Jul 17, 2016
traceroute, mtr, ifconfig, ip, route, tcpdump, nmap are not functioning at all
`
root@CASH:~# mtr google.com
mtr: unable to get raw sockets.
root@CASH:~# traceroute google.com
traceroute to google.com (82.76.231.39), 30 hops max, 60 byte packets
setsockopt IP_MTU_DISCOVER: Invalid argument
root@CASH:~# nmap -O google.com
Starting Nmap 6.40 ( http://nmap.org ) at 2016-07-18 00:13 DST
route_dst_netlink: cannot bind AF_NETLINK socket: Invalid argument
root@CASH:~# route -n
/proc/net/route: No such file or directory
INET (IPv4) not configured in this system.
root@CASH:~# ip addr show
SO_SNDBUF: Invalid argument
root@CASH:~# tcpdump
tcpdump: getifaddrs: Invalid argument
`
ping looks to be ok but still has some spookie latencies reported, like:
ping google.com
PING google.com (82.76.231.25) 56(84) bytes of data.
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=1 ttl=61 time=0.518 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=2 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=3 ttl=61 time=2.52 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=4 ttl=61 time=2.36 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=5 ttl=61 time=2.00 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=6 ttl=61 time=2.50 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=7 ttl=61 time=2.53 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=8 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=9 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=10 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=11 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=12 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=13 ttl=61 time=0.000 ms
64 bytes from 82-76-231-25.rdsnet.ro (82.76.231.25): icmp_seq=14 ttl=61 time=2.41 ms
windows build is Microsoft Windows [Version 10.0.14388]
80 remaining items
mr-ytseng commentedon Feb 4, 2020
It's not done yet 2020....
RuiGuilherme commentedon Feb 5, 2020
1909 - 18363.628 | (2020-02-05) same issue.
~ mtr 1.1.1.1
~ ping 1.1.1.1
ping: socket: Operation not permitted~ tcptraceroute 1.1.1.1
libnet_init() failed: libnet_open_raw4(): SOCK_RAW allocation failed: Permission denied~ nmap 192.168.0.151
Tommasov commentedon Feb 5, 2020
mtr and nmap needs administrator privileges, open bash as admin and you can use them.
Ping should work even if the terminal is not elevated
otcamargo commentedon Feb 21, 2020
I was having these problems on my debian distro when trying to ping any ip and when installing gems respectively:
This solution worked for me:
https://stackoverflow.com/questions/49800432/gem-cannot-access-rubygems-org/50349235#50349235
rebcesp commentedon Mar 19, 2020
yet not fixed, march 2020
dlakatos847 commentedon May 12, 2020
WSL is just as it sounds: too good to be true. On OpenSuSE Leap 15.1, WSL2 root shell:
Why is this issue closed?
fordan commentedon May 12, 2020
Works for me under Ubuntu. I also just downloaded OpenSuSE Leap 15.1, changed it to WSL 2 and it worked fine for me as root. May want to do a wsl -l -v to verify your distro is set to use version 2.
bitcrazed commentedon May 12, 2020
David Lakatos (@dlakatos847) - from a Windows PowerShell / Cmd, could you run
wsl -l -v?I have a feeling your openSUSE may be running on WSL1
dlakatos847 commentedon May 13, 2020
Rich Turner (@bitcrazed) You may be right, since the help is shown for
wsl -l -v. Am I correct that Windows 10 2004 will bring WSL2 and a fix for this problem at the end of this month?dlakatos847 commentedon May 22, 2020
I stand corrected, I unintentionally used WSL1. Windows Insider program, Windows Update and upgrading my Linux distro to WSL2 solved the problem. Thank you!
bitcrazed commentedon May 22, 2020
As per the most passionately requests from the Linux community, we avoid automatically affecting your distros and apps - we don't upgrade your WSL distro instances, nor the binaries within them, and we do not auto-upgrade your WSL1 distros to WSL2 - that's something we leave to the user to perform via wsl.exe.
This MAY change in the future when WSL2 is provides >100% of WSL1's capabilities, but for now, while WSL1 and WSL2 have some different capabilities and behaviors, we leave it to you.
bitcrazed commentedon May 22, 2020
Hayvi commentedon Sep 24, 2020
yet not fixed, September 2020
bitcrazed commentedon Sep 24, 2020
@ghzwael Please note that, as stated, this issue is closed.
We recommend that you adopt WSL2 (and convert any existing distro installations to WSL instances) which will provide you with much more compatibility and near-native performance.
treysis commentedon Jun 15, 2021
Rich Turner (@bitcrazed) Is this a joke? IPv6 still not really working in WSL2...so, to use networking tools, I should upgrade to WSL2 which breaks networking all together? That's no solution.