Redirect domain to specific port

David G. Miller dave at davenjudy.org
Mon Dec 11 19:24:43 UTC 2006


"Ashley M. Kirchner" <ashley at pcraft.com> wrote:

> Is there a way to redirect a hostname/domain pair to a specific port? 
> Let me explain: we have several Windows machines on our local network 
> that run VNC server that folks then access from outside our network. 
> Right now everyone connects by punching in the firewall address with 
> the port number for their machine, for example 
> firewall.domain.com:5901 resolves to my internal machine. The problem 
> is, for me to maintain these machines it becomes a hassle trying to 
> figure out whether such-n-such machine is port 5904 or 5908. So, if I 
> configure our DNS to have ashley.domain.com resolve to the firewall 
> IP, is there a way I can also have it go directly to whatever port I 
> need it to go to, so that all I'd have to do is enter that in my VNC 
> connect box, and not worry about what port number my machine is 
> actually on? Even if it means I'm maintaining an internal lookup map 
> of what hostname belongs to which port, that's fine. I'd rather not 
> have to remember that every time. 
* WARNING!!! This is a total stab in the dark. *

I wonder if you could do something like set up an Apache virtual server 
for each name that does a rewrite of the stream to the desired IP 
address and port.  You then use VNC over http.

DNS only maps host names to IP addresses.  I don't know of anyway to 
have it also do port information.  Something along the lines of Apache 
virtual server doing a rewrite MIGHT work.  On the other hand, I have 
never tried anything like this.  Also, I don't know if there is any 
other application available that virtualizes connections based on the 
name used for the connection that avoids the overhead of running an 
Apache virtual server for each connection.

Cheers,
Dave

-- 
Politics, n. Strife of interests masquerading as a contest of principles.
-- Ambrose Bierce




More information about the fedora-list mailing list