Jump to content


Photo

UDP port probs


  • Please log in to reply
10 replies to this topic

#1 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 20 June 2012 - 02:38 PM

Okay so I made a UDP example using Http2 dll. It works locally. BUT

None of my friends could join my game.

I could not join their game, because they were using routers and did not/could not/didn't want to forward their ports.

I could only join one friends game, because he could forward his UDP port. So the thing works. I just dont understand how Hovertank allows me to host. Is it because it has a server list, and uses autoport finding, and places the host port on the server list? I didn't know 39dll could do that. Or is it hole punching? Everyone has a different interpretation of what hole punching is.

Is there a way to see which UDP ports are open? I tried netstat -an. Is netstat -anop UDP what I need? Every port I try on http://www.canyouseeme.org/ says connection refused.

Things you should know

- I have Firewall disabled.

- I am able to host TCP games

- I can host Hovertank3d, which says it uses UDP

- I cannot forward any of my ports, because I am using a crappy Siemens Speedstream 4100 modem.

Edited by PoniesForPeace, 20 June 2012 - 03:41 PM.

  • 0

#2 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 26 June 2012 - 08:04 PM

Okay so I made a UDP example using Http2 dll. It works locally. BUT

None of my friends could join my game.

I could not join their game, because they were using routers and did not/could not/didn't want to forward their ports.

I could only join one friends game, because he could forward his UDP port. So the thing works. I just dont understand how Hovertank allows me to host. Is it because it has a server list, and uses autoport finding, and places the host port on the server list? I didn't know 39dll could do that. Or is it hole punching? Everyone has a different interpretation of what hole punching is.

Is there a way to see which UDP ports are open? I tried netstat -an. Is netstat -anop UDP what I need? Every port I try on http://www.canyouseeme.org/ says connection refused.

Things you should know

- I have Firewall disabled.

- I am able to host TCP games

- I can host Hovertank3d, which says it uses UDP

- I cannot forward any of my ports, because I am using a crappy Siemens Speedstream 4100 modem.

all you have to do to your firewall is to make it have the port open and the program to have privaleges to pass in/out.
I found this from portforward.com forum:

Just got off the phone with Tier 2 support at ATT. Port forwarding is NOT possible with this modem. I have to buy a router and use bridge mode on the modem.

so you can't portforward that modem. sorry. Posted Image
just wanted to let you know. Posted Image
  • 0

#3 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 26 June 2012 - 09:30 PM


Okay so I made a UDP example using Http2 dll. It works locally. BUT

None of my friends could join my game.

I could not join their game, because they were using routers and did not/could not/didn't want to forward their ports.

I could only join one friends game, because he could forward his UDP port. So the thing works. I just dont understand how Hovertank allows me to host. Is it because it has a server list, and uses autoport finding, and places the host port on the server list? I didn't know 39dll could do that. Or is it hole punching? Everyone has a different interpretation of what hole punching is.

Is there a way to see which UDP ports are open? I tried netstat -an. Is netstat -anop UDP what I need? Every port I try on http://www.canyouseeme.org/ says connection refused.

Things you should know

- I have Firewall disabled.

- I am able to host TCP games

- I can host Hovertank3d, which says it uses UDP

- I cannot forward any of my ports, because I am using a crappy Siemens Speedstream 4100 modem.

all you have to do to your firewall is to make it have the port open and the program to have privaleges to pass in/out.
I found this from portforward.com forum:

Just got off the phone with Tier 2 support at ATT. Port forwarding is NOT possible with this modem. I have to buy a router and use bridge mode on the modem.

so you can't portforward that modem. sorry. Posted Image
just wanted to let you know. Posted Image


I have my firewall completely disabled though.
  • 0

#4 PrimuS

PrimuS

    GMC Member

  • GMC Member
  • 92 posts
  • Version:GM8.1

Posted 26 June 2012 - 09:43 PM

Well yeah, your ports have to be forwarded in order to play like any UDP-based game i know, unless it uses UPnP or something. Maybe your modem has that (i highly doubt tho, as you can't even forward ports).
Hovertank may use TCP for things like connection requests, so it becomes easier to somehow establish a UDP connection after you actually get into the server (dunno how, maybe hole punching indeed), or use UDP when TCP transfer is not possible/in reverse. There was a 39dll script here at GMC that could check if the specified port is open right from your game by connecting to canyouseeme, so you could use that, but that's too slow for checking about 20k ports.
Seems the problem is entirely in your modem, so you can like use Hamachi to play that stuff. Also, have you tried hosting any other UDP games?

Edited by PrimuS, 26 June 2012 - 09:54 PM.

  • 0

#5 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 26 June 2012 - 10:34 PM



<snip!>

all you have to do to your firewall is to make it have the port open and the program to have privaleges to pass in/out.
I found this from portforward.com forum:

Just got off the phone with Tier 2 support at ATT. Port forwarding is NOT possible with this modem. I have to buy a router and use bridge mode on the modem.

so you can't portforward that modem. sorry. Posted Image
just wanted to let you know. Posted Image


I have my firewall completely disabled though.

what if a hacker hacks your computer as you're trying to play or get that game online?
plus what kind of fire wall do you have?
norton, windows, ecl?
I configured my firewall to let the ports to stay open and allow the server to host that port and access the outside world.
you sure you don't have a router or can't buy one?
your modem's firewall is off too?

Edited by creators124, 26 June 2012 - 10:35 PM.

  • 0

#6 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 26 June 2012 - 11:36 PM

Ok a few things i've noticed with UDP which might apply, depending on how your games set up, if a client wants to receive packets from the server, he needs to have a udp port forwarded. now if the server/client on the same pc are attempting to be run on the same port then it won't work, what im saying is you could have accidently made it so the udp listening port for the server is the same as the udp listening port for the client. What i tend to do is use UDP for sending packets to the server and tcp for receiving.

My question is, what port does the server listen on for a udp packet?
just to confirm that you are avoiding any conflict with the server:

Client connection to the server
client_udpsock = udpconnect(12565,true);

clearbuffer();
writebyte(1);
sendmessage(client_udpsock, ip, 12564); //my emphasis is on the fact that the two ports here need to be different however you only need to forward listening sockets (if you are not holepunching). So in this case you would forward UDP 12565 for the server (ik you said your router doesn't support port forwarding however this doesn't mean that there is no client to server conflict.

at the server end it should also be listening on port
12564.

so
server_udpsock = udpconnect(12564, true);

if(receivemessage(server_udpsock)>0){
ur normal code...
}

Not entirely sure how you can test it however this could provide some form of solution to the problem. Just to clarify the tcp thing, sending packets back to clients via tcp means that you don't need to worry about holepunching/port-forwarding at the clients end.
  • 0

#7 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 27 June 2012 - 03:58 AM

Thanks for the replies. I looked at the wiki article and I am even more confused.

If I gave my tester my port AND IP address, and I know the tester's port and IP address, why couldn't we connect? On wikipedia it said that the only thing Hole Punching was meant for was to find out the client port and IP address.

If the server and client port are the same on a non local connection, that is still alright, right?

PS: It works on one of my tester's computer's, but not the other one.

PS: I can play many online games, LoL Hovertank and other games.

PS: I am using Http2 not 39dll so I have to modify your code. I am also looking to use pure UDP and only use TCP for hole punching sorts of things.

Edited by PoniesForPeace, 27 June 2012 - 04:02 AM.

  • 0

#8 michael pw

michael pw

    GMC Member

  • GMC Member
  • 1488 posts
  • Version:GM8.1

Posted 27 June 2012 - 10:37 AM

KK, but are u sure u are definately not hosting the server is not listening on the same port that the client is listening on? and no, even on a local connection using the same listening ports for clients and the server would **** up as which ever one was run first would take over that port and other programs wouldn't have access (unless it was some form of packet sniffer but those aren't used in games). It's essentially the same as trying to host 2 game servers on one port,
UDP requires the client to also be a server in a sense as there isn't really a server with UDP, just clients sending packets back and forth, the only function of a server is to control players and relay packets around. but unlike tcp, udp requires clients to open listening sockets (which mean the client does have to port-forward their listening port if holepunching isn't used)

Idk if holepunching is possible with Http2 or 39Dll, i tried the theory with 39dll however i had no success.

anyway i still think your issue is to do with the udp connections of both the client and the server running off the same port.
  • 0

#9 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 27 June 2012 - 02:23 PM

KK, but are u sure u are definately not hosting the server is not listening on the same port that the client is listening on? and no, even on a local connection using the same listening ports for clients and the server would **** up as which ever one was run first would take over that port and other programs wouldn't have access (unless it was some form of packet sniffer but those aren't used in games). It's essentially the same as trying to host 2 game servers on one port,
UDP requires the client to also be a server in a sense as there isn't really a server with UDP, just clients sending packets back and forth, the only function of a server is to control players and relay packets around. but unlike tcp, udp requires clients to open listening sockets (which mean the client does have to port-forward their listening port if holepunching isn't used)

Idk if holepunching is possible with Http2 or 39Dll, i tried the theory with 39dll however i had no success.

anyway i still think your issue is to do with the udp connections of both the client and the server running off the same port.

Are you 100% sure that running off the same port is the problem? Can you show some documentation proving that please? I did that and it still worked a couple of times.
  • 0

#10 PrimuS

PrimuS

    GMC Member

  • GMC Member
  • 92 posts
  • Version:GM8.1

Posted 27 June 2012 - 10:34 PM

No, you can use any open port you want, that doesn't matter.
  • 0

#11 HardcoreBadger

HardcoreBadger

    GMC Member

  • GMC Member
  • 89 posts
  • Version:GM8

Posted 06 August 2012 - 11:30 AM

i didn't read everything coz i wouldn't understand

but I had a portforwarding problem for a while and I read on the internet (very hard to find so i tell you here) that I should deactivate the remote assistance in System window.
I tried it and then it worked. They also said you could reactivate it after.

Well I would never find this out and I really don't know if it will help you by any means but it takes 2 min to do that.

PS : but I had to portforward though so If you can't lol it's useless

Edited by HardcoreBadger, 06 August 2012 - 11:30 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users