Fully automated portforwarding !!!

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Fully automated portforwarding !!!

Post 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
Last edited by elypter on 17 Nov 2010, 15:26, edited 3 times in total.
yur sa'nok ngeyä
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Fully automated portforwarding !!!

Post 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.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Fully automated portforwarding !!!

Post 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?
yur sa'nok ngeyä
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Fully automated portforwarding !!!

Post 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.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Fully automated portforwarding !!!

Post 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.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Fully automated portforwarding !!!

Post 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.
yur sa'nok ngeyä
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Fully automated portforwarding !!!

Post 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.
yur sa'nok ngeyä
User avatar
Vike the Hube
Hitman
Hitman
Posts: 145
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Fully automated portforwarding !!!

Post 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.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Fully automated portforwarding !!!

Post 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.
yur sa'nok ngeyä
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Fully automated portforwarding !!!

Post 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.
yur sa'nok ngeyä
henrymonga111
Ped
Ped
Posts: 3
Joined: 26 Sep 2010, 09:47
GH nick: henrymonga111

Re: Fully automated portforwarding !!!

Post 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.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Fully automated portforwarding !!!

Post 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.
yur sa'nok ngeyä
henrymonga111
Ped
Ped
Posts: 3
Joined: 26 Sep 2010, 09:47
GH nick: henrymonga111

Re: Fully automated portforwarding !!!

Post 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
Attachments
JPEG.png
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Fully automated portforwarding !!!

Post 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
yur sa'nok ngeyä
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Fully automated portforwarding !!!

Post 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
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Fully automated portforwarding !!!

Post 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?
yur sa'nok ngeyä
henrymonga111
Ped
Ped
Posts: 3
Joined: 26 Sep 2010, 09:47
GH nick: henrymonga111

Re: Fully automated portforwarding !!!

Post 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.
Post Reply