Outpost Universe Forums

Outpost Series Games => Outpost 2 Multiplayer => Topic started by: silverion on February 01, 2004, 11:49:13 PM

Title: Multiplayer via TCP/IP behind a router...
Post by: silverion on February 01, 2004, 11:49:13 PM
K then problem people are having with routers is that the router changes the IP that outpost 2 recognizes itself with, and it tries to find/create games on the network instead of on the internet.

This can be gone around, however. I submitted an idea for a patch a while ago that modified the recognized TCP/IP address of Outpost 2. If you change that IP address to your real IP address, TCP/IP WILL WORK! ... I think anyway.

Dunno, someone told me some people were already workin on this... not quite sure what the deal is... :P
Title: Multiplayer via TCP/IP behind a router...
Post by: Leviathan on February 02, 2004, 08:38:55 AM
if ur router can enable DMZ it enables people to play behind their router. some people on IRC do this.
Title: Multiplayer via TCP/IP behind a router...
Post by: plymoth45 on February 02, 2004, 09:22:21 AM
i have the DMZ ip setting set to my local ip, 10.0.0.9, and it works really well, i just can't host
Title: Multiplayer via TCP/IP behind a router...
Post by: RipperKhan on February 02, 2004, 10:45:25 PM
hmm should, i didnt have that problem but i had port opened up to though
Title: Multiplayer via TCP/IP behind a router...
Post by: silverion on February 03, 2004, 06:23:26 PM
Does it matter what I set my DMZ to?
Title: Multiplayer via TCP/IP behind a router...
Post by: xfir on February 03, 2004, 06:27:18 PM
Should be the computer you are going to use to play Outpost 2.
Title: Multiplayer via TCP/IP behind a router...
Post by: plymoth45 on February 03, 2004, 07:02:34 PM
the DMZ on ur modem/router should be set for whtever you set your comp's ip to, like wht i have done it set my local ip to 10.0.0.9, and my modem's DMZ is set to 10.0.0.9, while the modem gateway is 10.0.0.2
Title: Multiplayer via TCP/IP behind a router...
Post by: LastofEden on February 04, 2004, 06:25:34 PM
I have another problem related to my IP address. I found out that my internal address is different from my external one. How can I fix that?
Title: Multiplayer via TCP/IP behind a router...
Post by: alice on February 04, 2004, 08:44:19 PM
Maybe disable your internal network protocal.  if that's the one you use for the router, you'll have to set it up to use it as a Gateway somehow...
Title: Multiplayer via TCP/IP behind a router...
Post by: plymoth45 on February 05, 2004, 09:33:10 AM
thats wht my prob was, but if you do wht i said in the last post, ur ips are still different, but it enables you to play through the router.
Title: Multiplayer via TCP/IP behind a router...
Post by: selfdestruct on February 10, 2004, 11:50:49 PM
But when u use dmz you are still not able to host games which is very anyoing and if the members who are on all are using dmz how are you going to play. I fell this problem should be addressed and delt with and alos in the future of op2 Or 3 multiplayer games.
 
Title: Multiplayer via TCP/IP behind a router...
Post by: BlackBox on February 11, 2004, 02:55:08 PM
Ok. Changing the IP address will not work.

UDP is a non routable protocol.

The only way around it is using systems that send packets in streams (ie. VPN, the replacement DLL I'm working on), or systems that forward the packets to one and only one computer (DMZ, etc)

Edit: To learn about the replacement DLL which WILL solve the problem, look in the programming forum.
Title: Multiplayer via TCP/IP behind a router...
Post by: Kiith Somtaaw on February 13, 2004, 06:36:49 AM
Whats a DMZ?






 
Title: Multiplayer via TCP/IP behind a router...
Post by: xfir on February 13, 2004, 07:43:35 AM
DMZ is a type of method, so to speak, that tells your router that any packets that are not already forwarded should be sent to a specific IP.

Make sure your local computer IP hasn't changed. If it did, you may have to update your DMZ setting.
Title: Multiplayer via TCP/IP behind a router...
Post by: plymoth45 on February 13, 2004, 09:17:12 AM
or, set ur default gateway and prefered DNS server to the router's ip, but just don't let ur ISP change any settings on u, or u will end up like me, my ISP has responded, and when i get home today, i'm going to try to play op2, athey said try my games again, i can play mohaa online now, and i'm hoping i can op2 now too.
Title: Multiplayer via TCP/IP behind a router...
Post by: BlackBox on February 13, 2004, 02:22:46 PM
Quote
Whats a DMZ?
This is for all people that are wondering.

Quote
Short for demilitarized zone, a computer or small subnetwork that sits between a trusted internal network, such as a corporate private LAN, and an untrusted external network, such as the public Internet.
Typically, the DMZ contains devices accessible to Internet traffic, such as Web (HTTP ) servers, FTP servers, SMTP (e-mail) servers and DNS servers.

So basically that "zone" is your computer.
Title: Multiplayer via TCP/IP behind a router...
Post by: Kiith Somtaaw on February 15, 2004, 02:09:47 PM
Quote
Quote
Whats a DMZ?
This is for all people that are wondering.

Quote
Short for demilitarized zone, a computer or small subnetwork that sits between a trusted internal network, such as a corporate private LAN, and an untrusted external network, such as the public Internet.
Typically, the DMZ contains devices accessible to Internet traffic, such as Web (HTTP ) servers, FTP servers, SMTP (e-mail) servers and DNS servers.

So basically that "zone" is your computer.
Yeah I've see the site and read the same thing,
but it still doesn't Explain what I need to do to access the DMZ!
Title: Multiplayer via TCP/IP behind a router...
Post by: plymoth45 on February 15, 2004, 02:14:29 PM
how you do it at my place, put the ip of the router into the web brouser
Title: Multiplayer via TCP/IP behind a router...
Post by: xamlit on February 15, 2004, 04:58:54 PM
Whats the big deal? All you have to do is map some certain ports to your computer from the router/server. Levi provided me with those ports and now I can join TCP/IP games over my network flawlessly.

It's serious, but its not that serious.


Map these ports to your computer :

   15102
   15101
   47777
   47800
   47776


I think two of them are for the op2 client, not sure though.

They are all udp.
Title: Multiplayer via TCP/IP behind a router...
Post by: plymoth45 on February 15, 2004, 05:34:48 PM
doesn't work that way for some of us
Title: Multiplayer via TCP/IP behind a router...
Post by: xamlit on February 15, 2004, 05:37:23 PM
Have you tried before? Because I have not seen those ports posted here.
Title: Multiplayer via TCP/IP behind a router...
Post by: BlackBox on February 15, 2004, 07:24:23 PM
15101-15102 aren't needed, those are the client UDP ports.

There are more ports that OP2 uses, the OP2 manual says what they are (somewhere it gives info about firewalls and to allow UDP on ports, the port numbers are in hex (you have to convert them to decimal))

I know it uses all of the ports, I watched OP2 with a packet sniffer once.
Title: Multiplayer via TCP/IP behind a router...
Post by: xamlit on February 15, 2004, 10:39:32 PM
Same here, but the ports I provided I believe are specifically for joining games behind a firewall. Hey, it works for me. Whats the difference between my setup and anyone elses.  
Title: Multiplayer via TCP/IP behind a router...
Post by: Kiith Somtaaw on February 16, 2004, 10:58:52 AM
How do you map them?








 
Title: Multiplayer via TCP/IP behind a router...
Post by: BlackBox on February 16, 2004, 01:29:09 PM
however you access the config for your particular router.

I think for some routers, you type in the IP address of the router into the web browser and set settings from there.

Also, you can set the DMZ there.
Title: Multiplayer via TCP/IP behind a router...
Post by: plymoth45 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
Title: Multiplayer via TCP/IP behind a router...
Post by: Kiith Somtaaw 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






 
Title: Multiplayer via TCP/IP behind a router...
Post by: xamlit 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
Title: Multiplayer via TCP/IP behind a router...
Post by: Kiith Somtaaw on February 16, 2004, 10:52:29 PM
What are you talking About?




 
Title: Multiplayer via TCP/IP behind a router...
Post by: xamlit on February 17, 2004, 08:03:06 AM
Mapping your ports of course!
Title: Multiplayer via TCP/IP behind a router...
Post by: Kiith Somtaaw on February 17, 2004, 08:20:59 AM
Oh!  I don't know how to do thet!
 :D





 
Title: Multiplayer via TCP/IP behind a router...
Post by: xamlit on February 17, 2004, 09:06:43 AM
Yes, Kiith.... That is why I will teach you.
Title: Multiplayer via TCP/IP behind a router...
Post by: Kiith Somtaaw on February 17, 2004, 08:33:17 PM
Hmmm?





 
Title: Multiplayer via TCP/IP behind a router...
Post by: xamlit on February 17, 2004, 10:27:36 PM
Wow... Are you a computer newbie?
Title: Multiplayer via TCP/IP behind a router...
Post by: plymoth45 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.
 
Title: Multiplayer via TCP/IP behind a router...
Post by: Kiith Somtaaw 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!!








 
Title: Multiplayer via TCP/IP behind a router...
Post by: Arklon 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.
Title: Multiplayer via TCP/IP behind a router...
Post by: plymoth45 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
Title: Multiplayer via TCP/IP behind a router...
Post by: BlackBox 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)
Title: Multiplayer via TCP/IP behind a router...
Post by: RipperKhan 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.
Title: Multiplayer via TCP/IP behind a router...
Post by: BlackBox 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.
Title: Multiplayer via TCP/IP behind a router...
Post by: Hooman 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.

 
Title: Multiplayer via TCP/IP behind a router...
Post by: Hooman 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)
 
Title: Multiplayer via TCP/IP behind a router...
Post by: BlackBox 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)