3 ms·
TL;DR: If you're running a third party AV+firewall like Kaspersky or Bitdefender, you may find that the shell has no Internet access. Until today I've had prob
by fencepost 10y ago
TL;DR: If you're running a third party AV+firewall like Kaspersky or Bitdefender, you may find that the shell has no Internet access.
Until today I've had problems with doing apt-get update / apt-get upgrade, but I finally took the time to track down some fixes.
First, apt-get was attempting to use IPv6 and having issues. Fixing problem 2 might have also resolved this, but I didn't go back to check it. The fix for this is to force it to IPv4, probably with a file "/etc/apt/apt.conf.d/99force-ipv4" containing the text:
Acquire::ForceIPv4 "true";
You can also specify that as a one-time thing on the apt-get command line with -o
The second issue was lack of Internet connectivity from within the shell. The most notable thing initially with this was inability to run apt-get update, but even after a workaround let me do updates this remains an issue so you may be able to edit local documents but not do anything requiring a connection. Apparently there are known issues with some firewalls - not clear if it's only third-party ones, but I've seen Kaspersky mentioned and I had problems with Bitdefender. The workaround is to disable the firewall (on a trusted network obviously) but that's only good for updating and doesn't resolve the issue. I saw a development post from early November, 2016 about changes to how some things are changing to allow better compatibility, but I'm not sure how long those changes will take to propagate or whether they're a fix or just something to let firewall makers do their own better fixes.
Hopefully this info will help some folks - even if not now, just by remembering later "there was something about firewalls....."
- fencepost 10y agoAn update after I dug into this a bit - turns out this has been resolved by many of the AV vendors, so updating from Bitdefender 2016 to Bitdefender 2017 (should be free if your Bitdefender install is connected to "Bitdefender Central" - just sign in, click the Install button at the top right to download the newer installer, then install to do the upgrade). Multiple other third-party AVs have also updated to either recognize directly or to have a checkbox option to allow WSL programs access. The github issue for this is https://github.com/Microsoft/BashOnWindows/issues/475 https://github.com/Microsoft/BashOnWindows/issues/475