I have a router and a managed switch plus a couple of systems attached to those:
- Router: 192.168.10.200
- PC1: 192.168.10.1 (Some sort of embedded Linux)
- PC2: 192.168.10.35 (OpenSuse)
- PC3: 192.168.10.31 (Win 10 host)
- PC4: 192.168.10.32 (Xubuntu 16.04 VM)
From all but PC1 (which I can only configure to a touch display and send the data) I can ping all other machines in the network.
PC1 sends UDP packets on port 47555 to PC2 only plus broadcasts ADwin Config packets (that is destination IP here is 192.168.10.255) through its port 4710. I can intercept all packets from PC1 with Wireshark on PC3 but for some reason even after using netsh (a tool I just found out about) I can still only get ADwin Config packets (on port 4710) but no UDP.
I ran
netsh interface portproxy add v4tov4 listenaddress=192.168.10.1 listenport=47555 connectaddress=192.168.10.32 connectport=47555I'm not sure if its the arguments I've used or the fact that it's UDP we are talking about, or a combination of both.
Sadly I'm not allowed to change the iptables on PC2. Otherwise I would have just redirected incoming packets from there to the VM directly.
Any ideas how to fix this?
41 Answer
UDP is not a supported protocol for the netsh portproxy config. The default protocol is TCP, so your command would be proxying TCP traffic on that port.
The lack of UDP support is discussed in a github issue in the WSL repo.
If UDP was supported, the command to run would look like this:
netsh interface portproxy add v4tov4 listenaddress=192.168.10.1 listenport=47555 connectaddress=192.168.10.32 connectport=47555 protocol=udpUnfortunately, if you run that command, you'll get an error about an incorrect parameter:
PS C:\> netsh interface portproxy add v4tov4 listenaddress=192.168.10.1 listenport=47555 connectaddress=192.168.10.32 connectport=47555 protocol=udp
The parameter is incorrect.And, if you change the last part to protocol=tcp, you'll see that the command successfully sets up a TCP tunnel.
You can also tell that the default value is TCP by running it without arguments:
PS C:\> netsh interface portproxy add v4tov4
One or more essential parameters were not entered.
Verify the required parameters, and reenter them.
The syntax supplied for this command is not valid. Check help for the correct syntax.
Usage: add v4tov4 [listenport=]<integer>|<servicename> [connectaddress=]<IPv4 address>|<hostname> [[connectport=]<integer>|<servicename>] [[listenaddress=]<IPv4 address>|<hostname>] [[protocol=]tcp]
Parameters: Tag Value listenport - IPv4 port on which to listen. connectaddress - IPv4 address to which to connect. connectport - IPv4 port to which to connect. listenaddress - IPv4 address on which to listen. protocol - Protocol to use. Currently only TCP is supported.
Remarks: Adds an entry to listen on for IPv4 and proxy connect to via IPv4.(Notice the last line: [[protocol=]tcp].)