When running multiple "dat share" only the first port is accessible from outside
mitar opened this issue · 4 comments
Slight followup to #945. I noticed that if I run dat share
multiple times on my machine, only the first instance (the one using the default port) can be accessible from outside, but others are not (connection time outs).
I have INPUT policy ACCEPT on a machine testing it, but the machine is behind a NAT. I looked at upnp mappings on my router and it was empty. It is a cheap router, so maybe something is not being displayed, because I would expect that at least the first instance is seen there?
My guess is that maybe upnp uses the same service name for all instances so it confuses something and only the first port gets mapped?
Interesting find. AFAIK Dat's not using upnp, it's using UDP hole-punching. Is that correct @mafintosh ?
That's then probably a reason why I could not find anything in the upnp list on the router. :-)
But data transmissions go over TCP, no? How are those ports opened on NAT?
(So I was testing with a server open and my computer behind NAT, so one peer is available for direct connections.)
Dat uses both TCP and UTP (which is built on UDP). TCP only gets used (afaik) within a LAN and when transacting with public peers like Hashbase. UTP gets used on everything.
14.0.2 now accepts hole punching, so hopefully your computers will be discoverable now without explicit port forwarding. Please try it and let us know!