Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPnP-IGD using the miniupnpc python package doesn't work. #2119

Closed
zadjii opened this issue May 17, 2017 · 4 comments
Closed

UPnP-IGD using the miniupnpc python package doesn't work. #2119

zadjii opened this issue May 17, 2017 · 4 comments

Comments

@zadjii
Copy link

zadjii commented May 17, 2017

15063 - Creator's Update

I'm trying to use the python version of miniupnp for IGD (port forwarding), and it seems as though it isn't working when hosted in WSL.

They have a test script here: link

Installation of the test script:

sudo pip install minipnpc
curl https://raw.githubusercontent.com/miniupnp/miniupnp/master/miniupnpc/testupnpigd.py > main.py
python main.py

This should print an address, eg http://67.171.123.456:12345
In another terminal, run curl http://67.171.123.456:12345 with the address from before. Or you can open it up in your browser. Or whatever you want - though my Android phone doesn't seem to be able to get the page.

Expected output:
image
(with your IP though)

What actually happens:
The curl just hangs.

I can see that the port is forwarded in the router's UPnP settings just the same as it is from the working version on my linux box on my desk, so I figure there's a chance there's some WSL has a part to play.

@sunjoong
Copy link

sunjoong commented May 17, 2017

@zadjii - Does your port, i.e., 12345, listen? I think you could check it by "netstat -aq" command. Open bash console and cmd console. Command "python main.py" in bash console and "netstat -aq | findstr 12345" in cmd console. In my case, #1498 (comment) , "It looks like your Anti-Virus was blocking the program from listening." You might not be in a similar case but... it could be better to check tcp port listen or not.

@zadjii
Copy link
Author

zadjii commented May 17, 2017

image
Curiously enough, netstat didn't show anything, though I was able to curl the tester using the internal port.

@sunjoong
Copy link

@zadjii - I said command netstat in cmd.exe console. There is an another issue of netstat, #1488, that I cannot be sure whether it be fixed. There seems many network related issues like #1554, #1498, #1385 and more. It could be helpful to collect log following #1853 (comment) for clarifying issue; In that comment, @sunilmut said the command "nc -4 -l 127.0.0.1 8000" but your tcp port is not 8000, so command like this - "netstat -qp tcp | findstr 12345" in cmd.exe console if your port be 123435.

@benhillis
Copy link
Member

Closing out old issues, if you're still having issues on newer versions of Windows please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants