Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 12:50:20 PM

Pages: [1]   Go Down
  Print  
Author Topic: Specific port redirects  (Read 1376 times)
TheIcarusKid
Newbie
*
Offline Offline

Posts: 3


« on: June 07, 2011, 05:46:06 PM »

Hi,

I'm looking for a way to redirect traffic coming in on port 25565 to another machine for a game server.  Support suggested I use the .htaccess file but I can't seem to get it to work.

Would anybody have any suggestions?
Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5220



« Reply #1 on: June 07, 2011, 07:31:58 PM »

What did you try doing? The following should be pretty close:
Code:
RewriteEngine on
RewriteCond %{SERVER_PORT} ^25565$
RewriteRule ^(.*)$ http://other_domain/$1 [L]
At least that should get you started...
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
TheIcarusKid
Newbie
*
Offline Offline

Posts: 3


« Reply #2 on: June 09, 2011, 06:34:30 PM »

I had tried this...

Code:
RewriteEngine on
RewriteCond %{SERVER_PORT} !^25565$
RewriteRule ^/(.*) http://173.243.118.213:25565 [NC,R,L]

I put in your code instead and the game is still unable to connect.  Do you think this is something that might not be able to be solved by .htaccess?
Logged
darkwolf
Guest
« Reply #3 on: June 09, 2011, 09:15:50 PM »

It could be possible that that particular port is not open on the server if you are on a shared server.

You might want to contact support , support.lunarpages.com (web) or support.@lunarpages.com (email) so we can see what server you are on and if the port is even open or not.

Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5220



« Reply #4 on: June 10, 2011, 05:37:49 AM »

OK, my code says, "if coming in on port 25565 on this domain, redirect to default port on TheOtherSite with the same URI." That's what I understood you to want.

Your code says, "if coming in on a port other than 25565 on this domain, redirect to port 25565 on TheOtherSite (with no URI ($1)... just enter at the main point for that port)".

Is one or the other closer to what you're trying to achieve? And of course, you have tested that you're able to manually go to port 25565 on TheOtherSite, right?
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
darkwolf
Guest
« Reply #5 on: June 15, 2011, 09:29:27 PM »

I recently got a ticket asking the same question (may have been you, unable to confirm) and looked into this further.

it appears that port 25565 is not open on our shared hosting servers, and as such the redirect will not function.

Currently ports open on shared hosting servers are:

- (inbound) TCP: 20,21,22,25,26,37,53,80,110,143,443,873,993,995,2082,2083,2084,2086,2087,2095,2096,3306,5666,6666,30000_35000

- (inbound) UDP: 21,53,465

- (outbound) TCP: 21,22,25,37,43,53,80,443,873,2086,2087,2089,3306

- (outbound) UDP: 21,53,365,465,873

If you require ports other then the above to be open, this can only currently be done on VPS or Dedicated servers.

Alternative:

The only alternative is if whatever you are using is able to connect via URL.

If it were possible for you to do this, and have it connect to something like "gameserver1.domain.com " , then we could setup a DNS record that would redirect this to the IP address of the game server you are using.

If the software/script could use gameserver1.domain.com:25565  then having the record gameserver1.domain.com pointed to the IP address should work.

The domain would need to be setup on the game server in order for this to function.
« Last Edit: June 15, 2011, 09:56:03 PM by Troy L » Logged
TheIcarusKid
Newbie
*
Offline Offline

Posts: 3


« Reply #6 on: June 16, 2011, 03:44:41 PM »

Thanks for everybody's help.  I got this worked out with support by creating a full DNS redirect from a subdomain.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: