What should I do if the Windows and Virtualbox port number mapping fails?

  

When running Ubuntu system in Virtualbox virtual machine, it is sometimes necessary to implement internal mirror communication between host PC and virtual machine through port mapping. The port corresponds to the service inside the virtual machine. These ports will be mapped during the Virtualbox startup phase. However, in some machines in Windows, port mapping fails. What should I do if the Windows and Virtualbox port number mapping fails?

Port mapping failed log is as follows:

00: 00: 01.125577 NAT: set redirect UDP host 0.0.0.0:6000 = "guest 10.0.2.15:6000

00:00:01.125748 NAT: can‘t create datagram socket

00:00:01.125763 NAT: failed to redirect UDP 0.0.0.0:6000 =》 10.0.2.15:6000

00 :00:01.125774 NAT: set redirect TCP host 0.0.0.0:6555 =" guest 10.0.2.15:5555

00:00:01.125897 NAT: failed to redirect TCP 0.0.0.0:6555 =》 10.0.2.15 :5555

Analysis:

1. The port number mapping here does not occupy the official port number assigned by Windows, and all the port numbers are invalidated by the Windows service.

2. View all the ports being used through netstat -ano, the port number of the port is not found to be occupied

3. The above two points are excluded, then check the environment of the Windows system itself, and verify Found that you can fix this problem with a repair tool. That is due to the environment of Windows itself.

Specific Fix: Repair Winsock & DNS Cache

The function description is as follows:

This will clear the stored DNS cache in Windows. When the DNS becomes corrupt you will not be Flushing and rebuilding the DNS will fix that problem.

Also resets winsock entries & resets TCP/IP stack.

These extra commands are run on Windows vista and Newer.

After executing the following commands and restarting, you can fix the port number mapping failure. This is not only limited to the port mapping used by Virtualbox. Any other software that uses port mapping and fails can be considered. Use the following commands to fix:

netsh winsock reset all

netsh int 6to4 reset all

netsh int ipv4 reset all

netsh int ipv6 reset all

netsh int httpstunnel reset all

netsh int isatap reset all

netsh int portproxy reset all

netsh int tcp reset all

netsh int teredo reset all

As these commands from Windows repair tool in one

If you have other Windows problems can try to use this tool to fix the mirror.

The above is the processing method for the failure of Windows and Virtualbox port number mapping. When encountering this problem, the user can refer to the above introduction to analyze the cause and find a solution.

Copyright © Windows knowledge All Rights Reserved