To do that you'd need a proxy on the net which you connect through. The idea is that you send all your traffic to the proxy and the proxy sends it back to your server. I'm not to sure that q3 supports proxies though.
This can probably be solved via some kind of routing rules, but if you're going to play around with such things I think that there was somekind of delay module which could be used to delay packages using the iproute2 tools.
If you can settle for just the package-loss bit there is an easy alternative though. Install iptables on the box running the server and get the random-patch from Patch-o-Matic and setup a rule to drop a package from your gaming-computer with a certain probability. This won't affect your ping though and is probably not what you want.
The best thing would be to use a combination of the random-patch and the delay-module to get a lag that varies slightly, perhaps with use of the nth-patch to get longer fluctuations. All of this is getting quite complicated just for a game-server and of course there are some other issues that needs to be solved too, so if I were you I'd look into the proxy-thing. Or consider using somebody elses server now and then.
|