Page 1 of 1

Fully automated portforwarding !!!

Posted: 30 Aug 2010, 18:39
by elypter
I don't know why nobody has come up with this before but for many router models there is a possibility to do port forwarding completely automated. Basically its done via igp. That should work with every router with activated upnp.
these routers(and probably many more) support upnp:
http://miniupnp.free.fr/devicelist.php
http://ccgi.mgillespie.plus.com/upnp/test.php
and probably also these:
http://support.xbox.com/support/en/us/x ... pment.aspx

I'm not the biggest fried of upnp but this is a situation where it would be very useful.
I made a little executable that uses http://miniupnp.free.fr/

download: Elypter's Fast Forward-offline
for clearing: Elypter's Un Forward-offline
mirrors:
http://www.filefront.com/17523509/elypt ... rward.exe/ elypters_fastforward
http://www.filefront.com/17523591/elypt ... orward.exe elypters_unforward

Re: Fully automated portforwarding !!!

Posted: 30 Aug 2010, 20:04
by Sektor
Nice program. I wanted to add UPnP support to GH but I never got it working properly. I disabled my port forwarding, enabled UPnP, ran your program and it worked on my CISCO DPQ3925 cable modem.

DirectPlay already supports UPnP but it tries to forward port 47624 to 255.255.255.255 and many routers don't support forwarding to broadcast addresses so it breaks hosting even on LAN. It also has other problems that Vike should explain sometime since I forgot. I'm curious if DirectPlay will try to override your rules with it's own sometimes.

On my Windows 7 PC, unpnp.exe says UPnP is enabled but it stops responding when I click disable. I know how to disable it manually, I was just curious if that program was still compatible with all Windows versions.

I tried upnpc-static.exe -l

upnpc : miniupnpc library test client. (c) 2006-2010 Thomas Bernard

127 UDP 2361->192.168.0.10:2361 'libminiupnpc' '0.0.0.0'
GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)

It gets up to port 2361 and then displays an index error.

Re: Fully automated portforwarding !!!

Posted: 30 Aug 2010, 22:05
by elypter
on my win 7 64 machine upnp works, so i think it's theoretical platform independent. but doesn't work always.

strange that the list command fails ...
have you also tried upnpc-shared.exe ? and do you know what is the difference between those 2 exes?

Re: Fully automated portforwarding !!!

Posted: 30 Aug 2010, 22:43
by Sektor
I tried both but there's no difference since static means the library/DLL is embedded in the exe and shared means it's separate. It might be my router returning that error, perhaps it doesn't allow that many ports.

Re: Fully automated portforwarding !!!

Posted: 06 Sep 2010, 10:37
by Sektor
I haven't tested this extensively but I know DirectPlay tries to use UPnP already and gets it wrong. You might have to run this AFTER you start GTA2 and not just before.

Re: Fully automated portforwarding !!!

Posted: 06 Sep 2010, 12:57
by elypter
i never saw this built-in pf of direct play in action. Does it require the service that is turned off with that unpnp tool http://www.grc.com/unpnp/unpnp.htm ?
in that case the problem could be solved by disabling it before. otherwise i it would require to know if dplay touches existing upnp and classic pfs.
I heared of 2 positive cases where the tool worked now but an implementation in gamehunter would be the better way i think. It could profit from an interface and can be combined with dxport functionality. if you can use c libs there is one available: http://miniupnp.free.fr/libnatpmp.html. otherwise you need to read info from STDOUT.

Re: Fully automated portforwarding !!!

Posted: 12 Sep 2010, 02:10
by elypter
i would be interested if the upnp portforwardings are remembered by most routers and what happens when the client pc has a dynamic ip and fastforward is executed a second time with different ip. So when you hear about port issues a while after using fastforward successfully please post it here.

Re: Fully automated portforwarding !!!

Posted: 12 Sep 2010, 08:32
by Vike the Hube
Normally UPnP port forwards have an expiry, maybe of 2 hours or so. Some routers keep them till something overrides them though. As for overriding, some routers add both (which is obviously bad) or overwrite them (which is bad too). The key thing is that most routers are different, even different windows versions are different I think. For example I'm pretty sure DirectPlay does not use UPnP on all operating systems, maybe only Vista and up. That would also explain why you haven't seen it before. Normally it doesn't work with 47624 (because most routers bungle the broadcast address, normally 47624 -> broadcast), but still you only need 47624 when hosting (I think) which in turn explains why a lot of people can join but not host.

Re: Fully automated portforwarding !!!

Posted: 12 Sep 2010, 17:50
by elypter
ok. hmm, it might be useful to also make a tool for deleting and checking the portforwardings.

the windows UPnP seems to be weired but if you turn it off it should not be a problem anymore. miniupnp does not depend on the windows service.

Re: Fully automated portforwarding !!!

Posted: 14 Sep 2010, 03:34
by elypter
fast forward now deletes all gta2 relevant upnp forwardings before setting up new ones.
i also made elypters_unforward.exe to make it possible to clean up everything easily.

Re: Fully automated portforwarding !!!

Posted: 01 Nov 2010, 17:56
by henrymonga111
Hey can someone tell me how long does it take to wait for the portwarding to finished? I've downloaded Elypter's Fast Forward
and it takes soooo long. Also i would like to no is it ok to do something else search the internet while it doing portforwarding.

Re: Fully automated portforwarding !!!

Posted: 01 Nov 2010, 18:25
by elypter
henrymonga111 wrote:Hey can someone tell me how long does it take to wait for the portwarding to finished? I've downloaded Elypter's Fast Forward
and it takes soooo long. Also i would like to no is it ok to do something else search the internet while it doing portforwarding.
it usually takes less than five minutes. you can do something else while letting this work.
In future i will probably change the behavior so that you can see the progress.

Re: Fully automated portforwarding !!!

Posted: 01 Nov 2010, 21:58
by henrymonga111
elypter if u can fix my problem, please help. when it finished portforwarding, i created a game then I pressed a key in cmd and it pointed me to http://www.utorrent.com/testport?port=2300


And port didn't open. It telling me this

Re: Fully automated portforwarding !!!

Posted: 01 Nov 2010, 22:16
by elypter
If it takes long it usually should work. If it doesn't work you should get something like no upnp device found.
If it looks like it worked but you cannot join or host you should try unpnp.

if you cannot get it working with this automatic forwarding tool try to do it manually.

everything you need should be in this tutorial:
http://elypter.net84.net/forum/index.php?topic=8.0

Re: Fully automated portforwarding !!!

Posted: 02 Nov 2010, 11:10
by BenMillard
Henry, thanks for providing a relevant screenshot and good description of the problem.

Elypter, why do you have a forum? Just put your tutorial in the first message of this topic, after the download link. Our corporate firewall blocks your forum, incidentally. :D

Re: Fully automated portforwarding !!!

Posted: 02 Nov 2010, 16:06
by elypter
That forum is mainly for the tutorials. It is easier to manage them when i have full control over the forum. It is a fast and easy alternative for an cms. The initial reason why i made up a forum was testing some things and comparing forum software.

Btw: why does a firewall block a smf forum? it is on the same host as the rest of the site. Or is that blocked too?

Re: Fully automated portforwarding !!!

Posted: 10 Nov 2010, 23:56
by henrymonga111
Ben_Millard i have no problem with it now, all my ports are now opened. And I would like to say thank u for making this useful software.