Skip to content

Issues with ifconfig, sockets, nmap, ping, nslookup, dig and others not working #69

Closed

Description

nmap:

root@localhost:/mnt/c/users/jdekoning# nmap google.com

Starting Nmap 6.40 ( http://nmap.org ) at 2016-04-08 12:37 UTC
route_dst_netlink: cannot create AF_NETLINK socket: Invalid argument

Ping:

root@localhost:/mnt/c/users/jdekoning# ping google.com
ping: icmp open socket: Socket type not supported

nslookup:

root@localhost:/mnt/c/users/jdekoning# nslookup google.com
socket.c:2447: setsockopt(20, SO_TIMESTAMP) failed: Invalid argument
socket.c:1915: internal_send: 10.142.23.200#53: Invalid argument
socket.c:2447: setsockopt(21, SO_TIMESTAMP) failed: Invalid argument
socket.c:1915: internal_send: 10.141.23.200#53: Invalid argument
socket.c:2447: setsockopt(22, SO_TIMESTAMP) failed: Invalid argument
socket.c:1915: internal_send: 10.130.23.100#53: Invalid argument

traceroute:

root@localhost:/mnt/c/users/jdekoning# traceroute 8.8.4.4
traceroute to 8.8.4.4 (8.8.4.4), 30 hops max, 60 byte packets
setsockopt IP_MTU_DISCOVER: Invalid argument

DIG:

root@localhost:/mnt/c/users/jdekoning# dig @8.8.4.4 google.com
socket.c:2447: setsockopt(20, SO_TIMESTAMP) failed: Invalid argument
socket.c:1915: internal_send: 8.8.4.4#53: Invalid argument

Activity

  1. 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
  2. Aneurin commented on Apr 8, 2016

    @Aneurin

    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.

  3. sunilmut commented on Apr 11, 2016

    @sunilmut
    Member

    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

  4. nianyush commented on Apr 26, 2016

    @nianyush

    so when this problem can be solved?

  5. sunilmut commented on Apr 26, 2016

    @sunilmut
    Member

    @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.

  6. MadcowD commented on May 1, 2016

    @MadcowD

    This issue is causing issues with libzmq and other socket libraries.

    Related issue is #134

  7. Deshke commented on Jul 17, 2016

    @Deshke

    any update on this? network is a rather big point and should work

  8. aseering commented on Jul 17, 2016

    @aseering
    Contributor

    A lot has changed since this ticket was last updated. It's probably be worth re-testing the specific issues reported here.

  9. ldanicel commented on Jul 17, 2016

    @ldanicel

    I just fresh installed 4 days ago and it acts the same.

  10. aseering commented on Jul 17, 2016

    @aseering
    Contributor

    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?

  11. aseering commented on Jul 17, 2016

    @aseering
    Contributor

    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.

  12. ldanicel commented on Jul 17, 2016

    @ldanicel

    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]

  13. 80 remaining items

  14. mr-ytseng commented on Feb 4, 2020

    @mr-ytseng

    It's not done yet 2020....

  15. RuiGuilherme commented on Feb 5, 2020

    @RuiGuilherme

    1909 - 18363.628 | (2020-02-05) same issue.

    ~ 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 
    

    ~ 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

    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
    
  16. Tommasov commented on Feb 5, 2020

    @Tommasov

    1909 - 18363.628 | (2020-02-05) same issue.
    ~ 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

    ~ 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
    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

    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

  17. otcamargo commented on Feb 21, 2020

    @otcamargo

    I was having these problems on my debian distro when trying to ping any ip and when installing gems respectively:

    ping: socket: Operation not permitted
    
    Failure to open IPv4 sockets: Permission denied
    Failure to open IPv6 sockets: Permission denied
    

    This solution worked for me:

    https://stackoverflow.com/questions/49800432/gem-cannot-access-rubygems-org/50349235#50349235

  18. rebcesp commented on Mar 19, 2020

    @rebcesp

    yet not fixed, march 2020

  19. dlakatos847 commented on May 12, 2020

    @dlakatos847

    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
    

    Why is this issue closed?

  20. fordan commented on May 12, 2020

    @fordan

    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.

  21. bitcrazed commented on May 12, 2020

    @bitcrazed
    Contributor

    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

  22. dlakatos847 commented on May 13, 2020

    @dlakatos847

    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

    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?

  23. dlakatos847 commented on May 22, 2020

    @dlakatos847

    I stand corrected, I unintentionally used WSL1. Windows Insider program, Windows Update and upgrading my Linux distro to WSL2 solved the problem. Thank you!

  24. bitcrazed commented on May 22, 2020

    @bitcrazed
    Contributor

    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.

  25. bitcrazed commented on May 22, 2020

    @bitcrazed
    Contributor

    image

    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.

  26. Hayvi commented on Sep 24, 2020

    @Hayvi

    yet not fixed, September 2020

  27. bitcrazed commented on Sep 24, 2020

    @bitcrazed
    Contributor

    @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.

  28. treysis commented on Jun 15, 2021

    @treysis

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions