Author Topic: Multiplayer via TCP/IP behind a router...  (Read 10034 times)

Offline plymoth45

  • Hero Member
  • *****
  • Posts: 1062
Multiplayer via TCP/IP behind a router...
« Reply #25 on: February 16, 2004, 02:54:15 PM »
thats wht i did, and also, i already know that op2 here uses all of the right ports, it isn't messed like some of urs were, DMZ was the only way for me to play, but UBTAnet has screwed my stuff up, so, i will be able to play either when hacker finishes the patch, or my ISP corrects themselves

Offline Kiith Somtaaw

  • Hero Member
  • *****
  • Posts: 615
Multiplayer via TCP/IP behind a router...
« Reply #26 on: February 16, 2004, 03:18:54 PM »
I'll just wait until this TCP/IP fix is finished,
So then my happyness can be increased.
 :D






 

Offline xamlit

  • Full Member
  • ***
  • Posts: 160
Multiplayer via TCP/IP behind a router...
« Reply #27 on: February 16, 2004, 10:50:59 PM »
What!??! Oh come on Kiith..... IM me, my aim screen name is xamlit and my email address is jrsumo2000@hotmail.com

Offline Kiith Somtaaw

  • Hero Member
  • *****
  • Posts: 615
Multiplayer via TCP/IP behind a router...
« Reply #28 on: February 16, 2004, 10:52:29 PM »
What are you talking About?




 

Offline xamlit

  • Full Member
  • ***
  • Posts: 160
Multiplayer via TCP/IP behind a router...
« Reply #29 on: February 17, 2004, 08:03:06 AM »
Mapping your ports of course!

Offline Kiith Somtaaw

  • Hero Member
  • *****
  • Posts: 615
Multiplayer via TCP/IP behind a router...
« Reply #30 on: February 17, 2004, 08:20:59 AM »
Oh!  I don't know how to do thet!
 :D





 

Offline xamlit

  • Full Member
  • ***
  • Posts: 160
Multiplayer via TCP/IP behind a router...
« Reply #31 on: February 17, 2004, 09:06:43 AM »
Yes, Kiith.... That is why I will teach you.

Offline Kiith Somtaaw

  • Hero Member
  • *****
  • Posts: 615
Multiplayer via TCP/IP behind a router...
« Reply #32 on: February 17, 2004, 08:33:17 PM »
Hmmm?





 

Offline xamlit

  • Full Member
  • ***
  • Posts: 160
Multiplayer via TCP/IP behind a router...
« Reply #33 on: February 17, 2004, 10:27:36 PM »
Wow... Are you a computer newbie?

Offline plymoth45

  • Hero Member
  • *****
  • Posts: 1062
Multiplayer via TCP/IP behind a router...
« Reply #34 on: February 18, 2004, 09:29:42 AM »
well, i know i'm not a comp newbie, even though i can check the ports op2 uses, but can't map them.
 

Offline Kiith Somtaaw

  • Hero Member
  • *****
  • Posts: 615
Multiplayer via TCP/IP behind a router...
« Reply #35 on: February 18, 2004, 09:32:37 AM »
I've had my own Computer since I was 12, I'm now 19 so i'm going to say... NO!!








 

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Multiplayer via TCP/IP behind a router...
« Reply #36 on: February 27, 2004, 06:55:03 PM »
The actual UDP port range that Outpost II uses is this:

47776-47807

If you have trouble using MartynD's multiplayer client, make sure these UDP ports are open:

15101-15102

Neither OP2 nor MartynD's multiplayer client use TCP ports, as far as I know.

Offline plymoth45

  • Hero Member
  • *****
  • Posts: 1062
Multiplayer via TCP/IP behind a router...
« Reply #37 on: February 27, 2004, 07:10:22 PM »
OP2 should use the TCP ports though, that is wht i hear is making it hard to play via TCP/IP

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Multiplayer via TCP/IP behind a router...
« Reply #38 on: March 02, 2004, 05:47:36 PM »
You can use either TCP or UDP on any port.

It's not like, ports 40000 and above are UDP only... no, it doesn't work that way

As long as you stay above port 1024 (I think) you're safe. (Under port 1024, are all reserved services etc, and OS'ses like unix won't allow you to use ports unless you are logged in as root)

Offline RipperKhan

  • Full Member
  • ***
  • Posts: 177
    • http://newvitech.com
Multiplayer via TCP/IP behind a router...
« Reply #39 on: March 03, 2004, 12:37:17 PM »
howdy guys im back:) well i see we still got prob with routers :( i dont know why it is so self explanetory, go look at the manuel for the router if u got it still, but any who, for mapping the ports i knew that on mine when i had it, that when u were mapping ports, that it had check mark boxs to selct either tcp or udp, and just to be safe just do both, becasue i knew for like starcraft i had to. but i didt really have a prob with my router i idnt really need to set the ports but there were times dureing the game it would lagg out or something soi had to set them then :) but worked great. there is a nother known problem that outpost 2 has is at least for win 98 is that if u have a lan card and a modem installed on the comp with a tcp/ip combined to each that outpost 2 wouldnt differentiate between the 2, and u couldnt host or join any game then, but to fix it is to uncombined 1 of the 2 that u dont use any more, so some of u that have a lan card and a modem installed should try that, worked for me :). need help on doing that u can im.
« Last Edit: March 03, 2004, 12:39:19 PM by RipperKhan »

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Multiplayer via TCP/IP behind a router...
« Reply #40 on: March 03, 2004, 04:30:41 PM »
Not only routers. Stuff like ADSL ISP's use systems and they don't route UDP packets.

Remember, UDP is Non Routable! That means it's not 100% certain whether certain routers will route it or not.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Multiplayer via TCP/IP behind a router...
« Reply #41 on: August 24, 2004, 12:29:32 AM »
Umm, where exactly does the idea that UDP is not routable come from? I have a strong feeling that's not true. If it wasn't it would be useless as an internet protocol. Admittedly, I have heard of certain ISPs having firewalls that block UDP packets but that seems to be more of a paranoid security thing. (And I'm pretty sure they don't block all UDP packets as some necessary protocols like DNS uses UDP).

And just to be annoying correct  :D , it not a "router" that a problem. It's NAT (Network Address Translation). Although pretty much every home router has NAT built in so I guess that puts us back at "routers" being the problem. Although real Internet routers don't do this nonsense.

Now, for those of you who might be wondering how a home router works  :P , it basically just creates a mapping between port numbers and internal IPs. The main reason, of course, is to hook up more than one computer using only one IP address, which kinda goes agains the whole idea of the Internet. The reason for doing so is that ISPs charge extra for more than one IP address, and IPv4 is supposedly running out of IP addresses. (Hence the extremely slow and gradual move to IPv6). Now, the way NAT helps with the address space crunch is that is uses the 16 bits for the port as a sort of extension to the 32 bit IP address. Since a computer is not likely to come anywhere close to using all 65536 ports, they basically get spread out over all the computers in the network (for outbound traffic anyways). When a packet passes through the router to the Internet, the router reads the source IP and port number, creates a new port number to replace the old one, replaces the source IP with your external IP, and updates it's table so that packets comming back using the new port number get mapped back to the old port number and the origianl source IP. This of course allows multiple computers to, say, browse the same webpage without getting packets confused. Now all this is not such a problem for most applications with outbound traffic like web browsers, but for accepting incomming connections like running a server or many peer to peer file transfers (depending on the direction of trasfer) there won't be a port/IP mapping in the router table. This of course leads to static mappings like specifying which ports get mapped to which computer (Port Forwarding) or just sending all data with an unknown destination to one particular computer (DMZ). Now, this still doesn't solve all problems since many programs, instead of using the source IP on the packet to send data back, will put the return IP address inside a packet and then, at the other end, use the IP stored in the packet to send traffic back. (This is most likely the problem with OP2). Now since NAT only translates the IP in the header of the IP packet, the internal IP address gets out, which is of course completely useless once it has passed beyond the NAT router. And for those who might be thinking it, there is no (remotely reasonable) way for the router to change the IP address stored in a packet. (How would it even know that data represents an IP address?)

This of course is all very neat but it's also a bit of an ugly hack that breaks standards, so you can expect to have problems with it.

Now, in theory, if the above problem is what's wrong with OP2, it could possibly be fixed by patching the IP address stored in the packet. Mind you, this might not even be the problem, and even if it is, not having the source or knowing how the network code was written, this is not a trivial task.

In the meantime while waiting for op2sock, you could try out various IP tunneling software or setting up a VPN (Virtual Private Network). I know WinXP has VPN software built in but I've never used it so I'm not exactly sure how to set it up.

 

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Multiplayer via TCP/IP behind a router...
« Reply #42 on: August 25, 2004, 11:29:54 PM »
Woohoo! Hope on the horizon.

The problem I mentioned above really was the problem with OP2. I carted my NAT router to my room and traced through some network code. At address 00496DC0 of the latest Outpost2.exe, there is a routine that sends back a packet from the server to the client, with the (local LAN) IP address of the server in it. By patching this IP to your external address, you can host games from behind a router. I just tested it online with CK9 and it worked perfectly.

Don't get your hopes up just yet though. I made the fix by hardcoding my IP address, so it won't work for anyone else. At least not yet. I'll speak with Hacker about ways to get this working for everyone. It might possibly take a while to get this working right for the general case.

 (thumbsup)
 

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Multiplayer via TCP/IP behind a router...
« Reply #43 on: August 26, 2004, 08:09:21 AM »
Kudos to you Hooman! I believe your work has saved many thousands of hours of work by others and I. (on not just this, most importantly the mission DLL's)

I'll talk to you sometime via IRC on ways of doing this (I have a few ideas on how to do this)
« Last Edit: August 26, 2004, 08:09:40 AM by op2hacker »