Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 30th January 2009, 17:56
dragon` dragon` is offline
Junior Member
Join Date: Jan 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Forward subdomain to a specific port (UDP & TCP)


I have Ubuntu 8.04 + ISPConfig installed.

I'm trying to forward a subdomain.mydomain.com to the 27010 port of my server.
We will have more game server instances(Counter-Strike) from one game, and because of this we have to use multiple ports.

What i want to work up, is that my players don't need to specify a port when they connects to our servers, example:
-server1.mydomain.com will redirect him to myipaddress:27010
-server2.mydomain.com => myipaddress:27011

The game's default port is 27015. There could be two solutions:
1. all the traffic from server1.mydomain.com will be redirected to myipaddress: port
2. the traffic from the udp://server1.mydomain.com:27015 will be redirected to myipaddress: port

I've tried:
-redirecting with php to udp://ip: port(bad idea )
-dns service records
-searching google for a week

The closest solution:
I created an A record for all of my instance names (example: server1.mydomain.com, server2.mydomain.com)
The players now can connect through the subdomains, but they need to specify the port of the servers (server2.mydomain.com:27010)
The disadvantage of this solution is that if the user misses the port, he misses the server too.

The best solution:
-buy more ip addresses(over 15-20 servers is pretty expensive)

Some ideas:
I have to create "virtual ip addresses"
-or local loopbacks (, somehow, but maybe it is not possible
-or there will be an openVPN server on this server, and i will allocate more IP-s for my server.
After that i have to point the subdomains somehow to these ip addresses
-/etc/hosts ?? ( point a server1.mydomain.com to, and server2.mydomain.com to )
-or with virtual hosting ( but i could not use it with UDP or TCP)

I'm at loss of this now.

Reply With Quote
Sponsored Links
Old 31st January 2009, 14:40
falko falko is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts

You could try APache rewrite rules:
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Old 1st February 2009, 12:59
dragon` dragon` is offline
Junior Member
Join Date: Jan 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Thx for your reply.

Apache is a HTTP server. It isn't possible to handle UDP requests with a HTTP server.
Reply With Quote
Old 28th February 2011, 16:21
bmwillrath bmwillrath is offline
Junior Member
Join Date: Feb 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Yess!!!

this is exactly i want to do, did you come up with a soloution?
Reply With Quote
Old 28th February 2011, 16:36
dragon` dragon` is offline
Junior Member
Join Date: Jan 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default impossible

I have asked some experts in the area, but everybody sais it's impossible. Unless you have enaugh number of public IP addresses. You can do it with simple firewall rules, but you need an IP address for each server.
Reply With Quote
Old 13th June 2013, 03:32
Brahmin Brahmin is offline
Junior Member
Join Date: Jun 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

I found this solution over here which seems pretty positive.

I haven't had a chance to check it out yet but will do so when I get home.
Reply With Quote
Old 14th June 2013, 02:43
pititis pititis is offline
Senior Member
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 39
Thanked 89 Times in 68 Posts

You can use a proxy like proxymini


Supports HTTP, HTTP CONNECT (for HTTPS and so on), SOCKS4 (TCP and TCP bind) and SOCKS5 (TCP, TCP bind and UDP)

Just configure it for listening in the port you want and redirect the traffic to the desiderated IP and port

I used it before for game servers.

Reply With Quote


dns, port forwarding, ubuntu, udp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How Would I Secure A SMTP Server Other Than Using SMTP Auth ?? giganet Server Operation 10 3rd February 2009 20:26
Howto analyse a IPTables firewall issue? chillifire Installation/Configuration 2 27th August 2008 08:23
Facing problem with ICMP (ping request) princeu28 Installation/Configuration 5 14th August 2008 01:13
slow download through webserver problem snewp Technical 14 9th May 2008 06:25
Opening TPC ports thehappyappy Installation/Configuration 12 7th May 2008 19:39

All times are GMT +2. The time now is 19:50.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.