Playing Games Behind IP Masquerade? 88
Accipiter asks: "I've configured an internal network to use a Linux box as a gateway using IP Masquerading, and it works beautifully -- except for some off-the-wall things. Recently, I installed Total Annihilation on a Windows box behind the firewall, and I found that it can't connect to other games on the boneyards server (Total Annihilation's Multiplayer setup). How does one configure networked games (specifically TA) on the INSIDE of a network to use servers out on the net?" Most of this is handled in the IP Masquerading HOWTO in particular section 7.22 and the section, appropriately titled, Game Clients. (Read More)
The main problem with Linux IP Masquerading is that, for a few games, you must forward specific ports to a single game machine. This is contrary to programs like Wingate, which implements Internet sharing for Windows for the whole internal network.
Is anyone working for some kind of redirection protocol for Linux that would remove this restriction and allow all masqueraded machines to play games without the need to redirect to a single machine?
You might also want to check out the Masq Apps page, which lists a cornucopia of games and how to get them working with IP Masquerading.
Re:Microsoft DirectPlay and Masquerading (Score:1)
TA used Direct Play, because Networking had to be slapped into the game in the last month before release. The head Network Programmer (a really smart guy) got it just working, but the networking team expanded to create the Boneyards system instead of making a direct workable single port UDP Internet system that didn't require the multi-port hassle of Direct Play to configure a 1 on 1 game.
Cavedog has since been disbanded, and Humongous (the parent company) has been wholy absorbed into GT Interactive/Infogrammes, and tasked to a more family oriented, non-network based gaming market. I doubt if these issues will ever be resolved, unless someone enterprising hacks it, or one of the employees (in the massive watershed that is about to occur) takes/releases the source and modifies it themselves.
Im sure if you're smart, you can figure out why I'm posting under an Anonymous Coward nick, but if I spell it out explicitly, certain annoying marketing guys will be able to figure it out too, so I'll just leave it at that...
Re:ip masq with pII 266 + half life to 2 computers (Score:1)
I haven't seen anything which has had any trouble.
This is the first firewall I've set up using Linux, but it hasn't given me any trouble (and all my pings are *nice*). Mostly I just play the various Quake games, though, so I'm not too sure about other software. I haven't run into this "must connect only to a single server" issue. Why is that?
Re:RTFMs (Score:1)
It basically intercepts every tcp/ip call and redirects it to the wingate server, including calls that open up a listening socket. When a client machine opens up a listening socket it goes to the server and says "I want to listen on port ##, please redirect all of that to me" IP Masq has no way of knowing when a client machine is listening for packets.
I am not sure how it handles the situation of 2 machines wanting to listen on the same port, my guess is that it just fails for the second computer.
So either somebody could write a special client for windows machines like WinGate's, or just write a WinGate server emulator.
Connecting from behind a firewall on Win32 (Score:2)
Re:RTFMs (Score:2)
I tried to read your post, but was shocked to find I don't know how to read. Somehow I only learned to write. Can you and the other slashdotters help me? Thank you.
Quake 3 - Local Games (Score:1)
Anyone know of any solution to this?
Re:RTFMs (Score:1)
I've seen a lot of people complain about Linux's Masquerading, and that BSD's NAT work is much better. Is there anyone else in the know that can compare them? Does 2.4's Netfilter make Linux better in this regard?
I'd do it, but I'm waiting for the ext3 patch to be ported to 2.3. I can't give it up.
Re:On another note... (Score:1)
ipmasqadm autofw -A -r tcp 51210 51210 -h 10.0.0.2
ipmasqadm autofw -A -r udp 51200 51201 -h 10.0.0.2
This is the simple, forward-it-to-one-box approach, but it works. You can pass the microphone around for multiple users.
HOWTO (Score:2)
Many games work quite easily nowadays with no modifying of the IP Masq setup. I've played Halflife, Tribes, Soldier of Fortune, Unreal Tournament just fine. Some things though need redirecting (it seems game companies slowly are getting smarter about this). Myth 1 and 2 were this way, a little sniffing and "ipmasqadm autofw -A -c tcp 6321 -r tcp 3453 3453 -u". This tells the firewall when someone goes out on port TCP/6321 (Myth's user logon), remember their internal IP and redirect port 3453 to them. For these, you're just left at one user per firewall. The games expect to connect at only port 3453 or whatever. They need reprogramming.
There is a mail list talking about this, nat-peer-games [onelist.com]. There isn't much traffic nowadays (21 for the year), but it was frequented by Activision folk in the early days. Somewhere around the archives there is detailed information on programming with UDP and how to properly write games that allow multiple people to use it on one NAT/IP Masq box.
There used to be a web site listing several prorgams and their needed ports for redirecting at http://www.tsmservices.com/masq/ [tsmservices.com], but the web server is down now. It seems many new games (especially FPS) allow multiple people (I know Tribes does, it even allows copies of the same CD to be played on servers), but more frequently the servers do some CD key check. So you'll need to buy multiple copies of games.
Re:On another note... (Score:1)
They give explicit instructions on the proper settings to get Dialpad to work with an IP Masq box.
Re:ip masq with pII 266 + half life to 2 computers (Score:1)
How easy to masq. MS solutions, eg VPN,pcAnywhere? (Score:2)
I do a lot of work from home for Microsoft solution based company. This means Microsoft VPN (PPTP) and pcAnywhere are being used a lot.
I've been thinking of installing a Linux gateway on my home LAN. One of the reasons is that I can move my internet connection to the Linux box. I currently have to use PPPoE to connect to my DSL service provided. Unfortunately the PPPoE clients are buggying. They're so bad that I cannot even use my ISP's software as it hard-locks my SMP WinNT box when it tries to connect. It makes the other one blue screen occasionally. There are other reasons why I want a gateway too, including security for the machines on my LAN.
I can only contemplate a Linux gateway (running the PPPoE client) if I can still get my job done. Thus my questions are:
I presume that if I can get the VPN working, I won't have to worry about other Microsoft protocols being broken, such as browsing the Network Neighbourhood. Is there a decent Linux VPN client that I could use instead, and set up my routing table appropriately on the Linux box (work uses the public IP addressing scheme 198.*.*.* on their intranet)?
Re:Question (Score:1)
Damn games. :)
y2k compliance... (Score:1)
Anyone try Everquest behind IPMasq? (Score:1)
Re:IPv6 (Score:1)
#define X(x,y) x##y
Re:RTFMs (Score:1)
#define X(x,y) x##y
Re:Those $!#@$ DirectX games... (Score:1)
#define X(x,y) x##y
network broadcast address? (Score:2)
They normally don't.
Consequently, it may be possible to tell ipchains to MASQ UDP packets to the network broadcast address, meaning that all the machines on the subnet will get them.
As long as you don't do this for any important ports (DNS, et al), you should be OK. Although the security guru in me is still screaming bloody murder.
But anyway...
Re:RTFMs (Score:1)
Now, if the protocol is "Hey, I'm here, listening on port 'X'", and each session can negotiate a separate port, fine, but face it, in these one-user-per-machine days, most designers no longer consider the fact that an IP address may not map one-to-one with a user...
Cheers,
-- jra
-----
DirectPlay is usually a problem (Score:1)
RTFMs (Score:3)
the story?
Allow me to elaborate (Score:4)
First off, to all you people saying "Read the HOWTO", let's make one thing clear. That was the first thing I did. As a matter of fact, I've read it *several* times over looking for the answer to my question. If it helped, I wouldn't need to ask. (The HOWTO is what got my Masq setup working in the first place. If I didn't read it, I wouldn't be using it.)
Secondly, I have tried the port forewarder as well as the rulesets. None work. From extensive browsing of the boneyards site, I've found that Total Annihilation's Boneyards must allow ports 47624, and 2300-2400 for both TCP and UDP, as well as 9110 and 9113 for TCP. (P.S.: The instructions on the Masq Apps Page [tsmservices.com] pertaining to Total Annihilation do NOT work with Boneyards. I've tried.)
So after firing e-mail back and forth from Cavedog, and extensive trial and error, I have still not been able to do this. So I ask Slashdot. Then I get a bunch of people telling me to "Read the Manual.' Sorry folks, if it was that easy it wouldn't be an issue.
-- Give him Head? Be a Beacon?
Multiple ports and Masquerading (Score:1)
Realize that this was a way to avoid implementing error recovery/windowing protocols on top of UDP directly - this greatly reduced the complexity versus a "use UDP for everything" design; doubly so since the game was written originally for TCP (and still works in TCP-only mode if need be, but if you drop a packet you get to wait - bad in a realtime game).
Originally it was designed to use random ports to deal with conflicts with other programs. Obviously in these days of firewalls, etc this causes (caused) problems.
I imagine modern games are either a) using the dual TCP/UDP port trick, b) using pure UDP with their own error recovery on top of it (expensive programming-wise, and liable to bugs), c) using pure TCP and living with serious lag if a packet is dropped, or d) using dual (or more) TCP connections, each for items of differing criticality.
(PS. I ported netrek to the Amiga in '91(?), and fixed a number of portability and other errors. Last time I tried, it still worked excluding that most servers no longer list it's public key as a blessed client.)
Microsoft DirectPlay and Masquerading (Score:5)
The entire reason the majority of Win32 based games is they depend on DirectPlay. To put it bluntly, DirectPlay is probably the most badly designed protocol I've ever seen.
It has no concept of firewalls, it opens up random port numbers and does double connections between hosts. Its just evil badness.
I've searched and disassembled and tried to figure out how it works so I could write an ip_masq_directplay module for the kernel, but I couldn't find any decent specifications.
If DirectPlay supported something like SOCKS, this wouldn't be an issue.
I eventually gave up on playing directly, but there are other solutions to play the game online:
1. MPlayer is a free service and they use a front end to the game. You can play matches with TA on MPlayer. They overload the protocol that TA uses and work fine through Masquerading.
2. Kali works prefectly with Masquerading. For TA, Kali emulates itself as a IPX driver that DirectPlay runs over (I believe). Kali works with just about everything. It was also nice to see Kali fire up and immediately tell me I was using NAT and figured out its translated address automatically.
I gave up trying to play TA on Boneyards. I emailed one of the guys at Cavedog (Rick Lambright) and talked specifically about NAT issues. We talked about TA and its dependancy on DirectPlay and that its pretty much screwed in getting it fixed. Kingdoms suffered the same fate.
Cavedog has been disbanded (or extremely downsized) so I'm not sure what the status would be now if anything can be down.
The best solution is to convince someone at the assimilation headquarters at Microsoft to add NAT support (or something like SOCKS) to DirectPlay. If that was added, it could retroactively make ALL DirectPlay games work.
DirectPlay and Firewalls (Score:2)
Re:RTFMs (Score:3)
Or, for that matter, why the editors don't send the above sentence back to the submitter instead of posting the lame question.
UTFSE; Use The Freakin' Search Engines.
Re:Yeah, but the big problem is... (Score:3)
The one-machine limitation for many games is there because the game essentially runs as a daemon, and needs other computers to be able to connect to it.
If you have a good enough understanding of the protocol, it should be possible to write a masq module that will appropriately mangle the outgoing packets and appropriately route the incoming packets.
ipmasq module work has pretty much dropped off at this point as most authors are concentrating on the netfilters implementation in 2.4.
The real problem, of course, is having a deep understanding of the protocol. This isn't hard to come by if you don't mind signing an NDA, but signing that NDA will pretty much keep it out of the linux kernel source.
Maybe game makers can be encouraged to release protocol specs? Or better yet, maybe they can be encouraged to make their protocols RFC1918 compliant.
Re:ip masq with pII 266 + half life to 2 computers (Score:2)
Re:RTFMs (Score:2)
Also, running a SOCKS proxy is different than running IP masq. (it's a userspace tool for one) There are a few implementations for linux at freshmeat, but I've never used that stuff.
Re:Microsoft DirectPlay and Masquerading (Score:1)
I don't know about WON, but battle.net is so badly overloaded now, that the lag is terrible for doing ANYTHING on the service.
Uhm, battle.net is only a meeting place to find people to play (with|against). Once you've found opponents and start a game, battle.net doesn't do anything but record the game result at the end. The actual game is played between the clients. (This is Starcraft-experience, BTW).
Worms Armageddon? (Score:2)
Research first, then act (Score:2)
When they first setup the VPN server where I work, I was able to use the (poorly documented) program pptp-linux to connect after only about 45 minutes of messing around.
Then everything changed. They started using MSCHAPv2 and MPPE and I was essentially locked out. I downloaded and compiled new versions of pppd (with patches). Now both those protocols are supported, BUT:
1) The 40-bit machine lets me log in and assigns me an address but I can't get to the network. It acts just like a routing problem, but the routes seems to be setup correctly. In any case, I can't even ping (traceroute) the gateway I connected to.
2) The 128-bit machine won't even negotiate the encryption correctly. So I get logged in (via CHAP), but then can't get further than that.
So, what I'm saying is: Figure out what the server end is doing FIRST, then figure out what you client will have to do. Then decide if that's worth it.
As for MASQ: No problem. I just VPN from the server and the client machine (Linux in my test, but I see no reason it should be different for anything else) was able to get right out that connection.
--
Re:RTFMs (Score:4)
For instance, my wife and I could both play quake or quake3 at the same time on the net from behind my NAT box with no problems. But it is impossible for us both to play Diablo at the same time. It has to be one machine or the other, and I would have to change the port forwarding rules to do that.
And as for saying the game coders should get it right, Blizzard programmers have said that they did, and Linux gets it wrong. I just looked for the link and couldn't find it, but they claimed the linux masq worked great for tcp games, but didn't handle udp masquerading properly. They then said that the only proxy that worked was WinGate. I don't know what WinGate does that other programs don't, but it would be nice to know so linux could get it.
G0del
Not a trivial task (Score:1)
I actualy play about 3 games UT and Q2/3 and have a few more I would like to play. I also have a seriaous side. eg: a Firewall with a 24/7 server with a webserver/database sitting behind it for research/work.
Since some of the games are limited to a specific port range, I have to poke a hole in the firewall just to get the game to play. (a security risk) I have found some tools that will find the servers for me, but as of yet none that will create a Ipchains/etc. rulelist to poke the holes for me. (eg I found server a.b.c.d:z so create rule to handle) To complicate things some game master servers have this nasty habit of being encrypted or propritary so that only authorized clients can get this information. Furthermore; thats just for outgoing/clinet connections.
I would also like to handle incoming connections to a future Q3/UT server of my own for my clan.
I would also like to see ways to optimize this for performance. I have seen that connecting to a IRC chat with the FW in place is about 40x faster than without.
Re:Anyone try Everquest behind IPMasq? (Score:1)
Napster?, or, 50% offtopic (Score:1)
can anyone help?
Update the Masq Application Page (Score:1)
Re:Microsoft DirectPlay and Masquerading (Score:1)
http://www.socks.nec.com/sockscap.html
Re:Microsoft DirectPlay and Masquerading (Score:2)
Re:RTFMs (Score:1)
Every rule has an exception, and this is the only rule with no exceptions! Huh? -- Spatch
Re:Anyone try Everquest behind IPMasq? (Score:1)
However, I have not tried playing it on two machines at once.
Re:Napster?, or, 50% offtopic (Score:1)
Re:Games!?! what about ICQ (Score:1)
Re:Question (Score:1)
HH
Yellow tigers crouched in jungles in her dark eyes.
Re:Question (Score:2)
HH (half-pissed - that's british for drunk not angry)
Yellow tigers crouched in jungles in her dark eyes.
Re:RTFMs (Score:3)
It's not that simple. There's some good information in the HOWTO's, man pages and on the web, but putting it together and getting it to work is another matter. There's no single document that explains how to do it and it's tricky stuff to get right. I wish I'd kept the scripts I wrote to do it when I got rid of the machine I was using as a firewall.
HH
Yellow tigers crouched in jungles in her dark eyes.
Ask /. picked at random! (Score:1)
RTFM/RTFHT
Re:Microsoft DirectPlay and Masquerading (Score:1)
The problem with IPMasq and gaming... (Score:1)
For games like those, you plain can't play over IPMasq.
Connection initiated from the outside (Score:1)
Re:Microsoft DirectPlay and Masquerading (Score:5)
I remember reading a note that came with this, saying that you need DirectPlay 6+ for this to work, since the previous versions use random port numbers.
This is a part of the Sygate apprule file, but you should be able to convert it to whatever you need..
# DirectPlay, Game Zone, Mplayer, Boneyards - Modification tested on 8/16/99
# Most of DirectPlay games use this rule
:INIT "DirectPlay"
OUT TCP 47624 47624 0.0.0.0 0 R
:SUB
IN TCP 47624 47624 0.0.0.0 0 0 AD
IN UDP 2300 2400 0.0.0.0 0 0 AD
IN TCP 2300 2400 0.0.0.0 0 0 AD
OUT UDP 2300 2400 0.0.0.0 0 D
OUT TCP 2300 2400 0.0.0.0 0 D
IN TCP 9110 9110 0.0.0.0 0 0 AD
OUT TCP 9110 9110 0.0.0.0 0 D
IN TCP 9113 9113 0.0.0.0 0 0 AD
OUT TCP 9113 9113 0.0.0.0 0 D
IN TCP 28800 29000 0.0.0.0 0 0 AD
OUT TCP 28800 29000 0.0.0.0 0 D
IN UDP 8000 9000 0.0.0.0 0 0 AD
IN TCP 8000 9000 0.0.0.0 0 0 AD
OUT UDP 8000 9000 0.0.0.0 0 D
OUT TCP 8000 9000 0.0.0.0 0 D
:END
Re:RTFMs (Score:1)
Re:ip masq with pII 266 + half life to 2 computers (Score:1)
Re:How easy to masq. MS solutions, eg VPN,pcAnywhe (Score:1)
Caveats: I have never used pcAnywhere, and Network Neighborhood browsing doesn't work. I haven't bothered trying to get it going though; I think it's uselessly slow.
Re:Microsoft DirectPlay and Masquerading (Score:1)
Drat.
I was wondering when my next addiction was going to come out. Now it appears that the answer is, "Never."
Re:How easy to masq. MS solutions, eg VPN,pcAnywhe (Score:1)
Yeah, but the big problem is... (Score:3)
I've seen a few people pointing toward the howto, and saying that it's the definitive answer. Only, the big problem is that Linux's IP masquerading only forwards ports to one specified machine. It's hardcoded in the setup file that you create.
A good workaround that I've yet to actually try would be to write a shell script on the gateway machine that changes where it's forwarding the ports to, so that more than one machine could take advantage of the feature.
This does not, however, take care of another problem - while it could be made relatively easy to change which machine on the internal net gets the ports forwarded to it, the port forwarding still only works for one machine at a time.
If there are ways around this, I'd love to know. Me and my roomates have been itching to try this cable modem out on Battle.net for quite some time now.
why, oh why? (Score:1)
Re:RTFMs (Score:1)
And besides, saying "Linux" has it wrong is crazy -- I have yet to find something that does it "right" then (including the "favorites" Sygate and WinGate)
just some quick thoughts (and a little steam -- those lazt bastards!!!)
Re:How easy to masq. MS solutions, eg VPN,pcAnywhe (Score:1)
In order for you to browse the network, NetBIOS traffic has to be passed through the VPN -- not bloody likely with most routers. Alternatively, you can attach to a WINS server on the remote network to browse (which will show you all the WINS-connected machines on the remote network).
Also, use VNC -- its faster and easier than PCAnywhere, and with a PPTP VPN you have semi-adequate security. Just make sure you log out when you leave. :)
AetiusI may be wrong, but... (Score:1)
Pablo Nevares, "the freshmaker".
Re:RTFMs (Score:1)
the story?
So that people can copy and paste from the HOWTOs and get moderated up (+1 INFORMATIVE) for it.
====
Those $!#@$ DirectX games... (Score:1)
Re:Microsoft DirectPlay and Masquerading (Score:1)
If DirectPlay is a known API, it may be possible to code a replacement for it which includes additions which is compatible with what DirectPlay does, but includes extensions which allow support for NATs. -- Then make it available to game designers.
What I'm basically saying is: Take MS's "embrace and extend" and use it in reverse.
It seems to me that a simple 'fix' to the protocol is to use the last octet of a clients internal IP as a hash to decide which UDP port to use. combine that with the auto-routing of UDP mentioned above, and you have a somewhat hacked solution -- granted, it doesn't work well for larger (i.e. company-wide) private networks, but it would handle most home setups, and the majority of company nets (at least, those that want to allow gaming for their employees!).
That having been said, I'm not willing to do it myself. I've avoided Wintendos for it's entire live, and I've done ZERO coding for it. The best I could would be to coordinate a project.
--
Re:OpenBSD? (Score:1)
-------------------------------------------
Re:RTFMs (Score:1)
What a mess. (Score:2)
seriously read the HOWTO... (Score:3)
Other resources worth checking out (Score:4)
Re:Anyone try Everquest behind IPMasq? (Score:1)
Gimme a yell if you need to look at my masq setup.
--
ip masq with pII 266 + half life to 2 computers. (Score:1)
Question (Score:1)
It seems that none of the game played through zone.com can be used behind IP Masquerading.
10B2 Network (Score:1)
maybe in the game code (Score:1)
OpenBSD? (Score:1)
Solution (Score:1)
The story I've heard.... (Score:1)
This is becoming such an issue these days I doubt the problem will persist for too much longer.
sedawkgrep
Linux UDP screwed up... (Score:1)
Check bugtraq here [securityfocus.com].
---
guillaume
Simple. Forward the ports by hand. (Score:1)
DCC Sends (Score:1)
Why wouldnt DCC sends work? Are you using ip_masq_irc? it defaults to port 6667, but you can add more ports by using ports=6666,6668,6669 etc when you do insmod...
Games!?! what about ICQ (Score:1)
ipmasqadm (Score:2)
From the man page: (man ipmasqadm)
DESCRIPTION
Ipmasqadm is used to configure extra masquerading funcionality, usually provided by additional kernel modules.
All in-firewall forwarding takes place by reverse-masquerading so you must create firewall rules that must match desired forwarding as-is the connection had been outgoing (instead of incoming).
--
Check out the modules portfw, autofw, mfw etc..
Re:RTFMs (Score:2)
Hi Slashdotters,
I just bought my first version of Red Hat from good old CompUSA. What is a CDROM? Which part of the manuals should I read first? Can I run Linux under windows? PS. Dear Editor: Please list this as an Ask Slashdot question.
What the fuck?!?
Is Slashdot becoming some lame clone for usenet or mailing lists? This damn article is annoying as hell.
Another slashdot poll suggestion (Score:1)
Should articles like this be posted?
Another one for the OpenBSD group. (Score:1)
Re:quake 1 proxy (Score:1)
Re:ip masq with pII 266 + half life to 2 computers (Score:1)