Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Administration (http://www.topmudsites.com/forums/forumdisplay.php?f=22)
-   -   Easiest way to point alternate ports to the same port. (http://www.topmudsites.com/forums/showthread.php?t=5974)

Threshold 03-11-2010 09:51 PM

Easiest way to point alternate ports to the same port.
 
Since its opening, Threshold has run on port 23. This was generally most convenient for people as it is the primary telnet port. Also, it was the least likely port to be blocked by schools or work.

Flash forward 14 years, and now there are workplaces that block port 23 occasionally.

I'd like to give my players more options, so I was wondering if anyone had a suggestion for the best/easiest ways to have other ports forward to 23.

Since I don't like to take Threshold down very often, the simplest, most reliable method would definitely be appreciated.

Newworlds 03-12-2010 01:30 AM

Re: Easiest way to point alternate ports to the same port.
 
My best advice is to do what we do at NWA (if you don't already) and setup a secondary instance of your game on another port, say port 5023. You will do this in order to test out this setup prior to knocking down the live version of Threshold (although, theoretically this should work without taking down the game at all).

After you got your backup (secondary) game running, then try this assuming the port your want to redirect is 5000 to port 5023:

iptables -A INPUT -i eth0 -p tcp --dport 5000 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 5000 -j REDIRECT --to-port 5023

Then try connecting via port 5000 and see if it redirects and connects to port 5023.

If this works just change this to the following:

iptables -A INPUT -i eth0 -p tcp --dport 5000 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 5000 -j REDIRECT --to-port 23

And wallah! Anyone porting to 5000 (or any other port you choose) should redirect to your live game on 23.

Remember you are dealing with iptables so be judicious and careful. These instructions assume you have full root access and administration rights of your server. Might even want to play around with these commands on a secondary homebase linux box with Redhat or similar system running to ensure proper operation.

Good Luck!


All times are GMT -4. The time now is 08:53 PM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022