2

I have been facing an unusual problem with my VirtualBox NAT settings. I have scoured the Unix SE Forums but was unable to find a similar issue reported. I did find one but it was from 2009 and related to Corporate Proxy.

Details :

  • Windows 7 Host running VirtualBox 5.1.0
  • Multiple Guest OS - Ubuntu, Fedora, CentOS (All Fresh Installations)
  • Home Network, No Perimeter Firewall
  • Using NAT (Intel PRO/1000 MT Desktop Adapter)
  • From the Guest I am able to Ping external FQDDNs. Which means DNS and Ping is working

Issue : Unable to Browse any Website

Sometime ago I had played a little with the 'VBoxManage modifyvm' settings in order to solve a Bridging related issue. I think I may have messed up something which is causing my new issue.

I have tried to re-install VirtualBox but it looks like the previous settings are getting saved somewhere which I am unable to remove and unable to 'Reset to Default' the VBox settings.

Troubleshooting Done :

Changed Adapter to PCnet Fast3 Tried Changing IPs, DNS

IP : 192.168.10.15 Default Gateway: 192.168.10.2 DNS: 192.168.10.3

tcpdump Captures :

While Pinging to Yahoo.com (Getting Replies) :

root@localhost anish]# tcpdump -i enp0s3
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp0s3, link-type EN10MB (Ethernet), capture size 65535 bytes
19:28:20.650985 IP 192.168.10.15.45804 > 192.168.10.3.domain: 1534+ A? yahoo.com. (27)
19:28:20.653043 IP 192.168.10.15.35280 > 192.168.10.3.domain: 47054+ PTR? 3.10.168.192.in-addr.arpa. (43)
19:28:20.661250 IP 192.168.10.3.domain > 192.168.10.15.45804: 1534 3/0/0 A 98.138.253.109, A 98.139.183.24, A 206.190.36.45 (75)
19:28:20.661833 IP 192.168.10.15 > ir1.fp.vip.ne1.yahoo.com: ICMP echo request, id 3431, seq 1, length 64
19:28:20.942937 IP ir1.fp.vip.ne1.yahoo.com > 192.168.10.15: ICMP echo reply, id 3431, seq 1, length 64

When trying to Browse through Firefox (Gateway sends Net Unreachable ICMP) :

19:29:31.562448 IP 192.168.10.15.38893 > 192.168.10.3.domain: 32749+ A? www.google.com. (32)
19:29:31.562562 IP 192.168.10.15.38893 > 192.168.10.3.domain: 48885+ AAAA? www.google.com. (32)
19:29:31.670159 IP 192.168.10.15.52571 > 192.168.10.3.domain: 60173+ A? www.google.com. (32)
19:29:31.670261 IP 192.168.10.15.52571 > 192.168.10.3.domain: 14907+ AAAA? www.google.com. (32)
19:29:35.937594 IP 192.168.10.3.domain > 192.168.10.15.55703: 53252 NXDomain 0/0/0 (43)
19:29:35.937995 IP 192.168.10.3.domain > 192.168.10.15.38893: 32749 1/0/0 A 216.58.196.196 (48)
19:29:35.938025 IP 192.168.10.3.domain > 192.168.10.15.38893: 48885 NotImp 0/0/0 (32)
19:29:35.938371 IP 192.168.10.3.domain > 192.168.10.15.52571: 60173 1/0/0 A 216.58.196.196 (48)
19:29:35.938408 IP 192.168.10.3.domain > 192.168.10.15.52571: 14907 NotImp 0/0/0 (32)
19:29:35.938865 IP 192.168.10.15.33663 > 192.168.10.3.domain: 46127+ PTR? 15.10.168.192.in-addr.arpa. (44)
19:29:35.940003 IP 192.168.10.15.46468 > kul06s14-in-f4.1e100.net.http: Flags [S], seq 4014962253, win 14600, options [mss 1460,sackOK,TS val 1649927 ecr 0,nop,wscale 7], length 0
19:29:35.941228 IP 192.168.10.2 > 192.168.10.15: ICMP net kul06s14-in-f4.1e100.net unreachable, length 36
19:29:35.941377 IP 192.168.10.15.46469 > kul06s14-in-f4.1e100.net.http: Flags [S], seq 613107971, win 14600, options [mss 1460,sackOK,TS val 1649928 ecr 0,nop,wscale 7], length 0
19:29:35.941857 IP 192.168.10.15.46470 > kul06s14-in-f4.1e100.net.http: Flags [S], seq 717756838, win 14600, options [mss 1460,sackOK,TS val 1649929 ecr 0,nop,wscale 7], length 0
19:29:35.942613 IP 192.168.10.2 > 192.168.10.15: ICMP net kul06s14-in-f4.1e100.net unreachable, length 36

Could someone please guide me in resolving this ? Alternatively, is there any way to take VBox to a 'Default Settings' state ?

Any help would be greatly appreciated, as I have been only troubleshooting VBox related issues since the past couple of days rather than doing any actual work on my Guest VM's.

1

I was finally able to resolve this issue. Actually, its just a temporary fix as of now till I figure out more.

It looks like VBox settings and VM settings are fine, it is my Windows Host network configuration causing the issue.

I checked further and found that even though I was getting ICMP and DNS resolution, my TCP traffic was not working.

I found it by trying to :

root@KaliOrc:~# telnet google.com 80
Trying 216.58.199.174...
telnet: Unable to connect to remote host: Network is unreachable

Then on my Windows Host I did a :

netsh winsock reset

Which apparently resolved the issue ! I was able to Browse and test everything as working.

root@KaliOrc:~# telnet google.com 80
Trying 216.58.199.174...
Connected to google.com.
Escape character is '^]'.

Now every time I reboot my Host, I have to reset winsock for my VM's to be able to browse.

If anyone can shed some light on the root cause it would be great because I will be able to work out a permanent solution.

Anyone having similar problems for which the above 'fix' is not working, please go through the below ticket on VBox which has a ton of information :

https://www.virtualbox.org/ticket/13292

0

On my system, this was caused by the "hardening" for VirtualBox. There was a DLL injected by Sophos into the winsock stack and virtualbox would not support it.

netsh winsock reset - was a temporary fix.

But to permanently fix I had to update my machine's root certificate list so that the DLL (a genuine one) was now recognised by virtualbox as valid.

0

This is probably the first and only forum question which provided a decisive lead to solve my similar problem.

The winsock reset command also worked in my case. I had a VirtualBox ubuntu image, ran with Vagrant, for which ssh didn't work. On further inspection, I noticed that the host network was completely inaccessible from the guest. 2 fixes helped:

  1. config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] added to the Vagrant file (this option can also be set using VBoxManage), which resulted only in pings working (google.com, security.ubuntu.com).
  2. netsh winsock reset, which resulted in everything else working. I'm currently studying the logs to identify possible issues with the "hardening" towards DLLs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.