[lug] remotely accessible sub-domain

Case Jones philipj at interchange.ubc.ca
Tue Feb 25 14:26:22 MST 2003


On Tuesday 25 February 2003 8:24 am, Paul Nowosielski wrote:

> Ok,
>
> Port 80 and 22 are already forwarded from the modem to
> the main box(10.0.5)and apache is listening for my domain
> name.So when I forward port 80 from 10.0.0.5 to
> 192.168.2.2 it blocks apache from the 10.0.0.5 box.
> I want to make 192.168.2.2 a sub-domain of 10.0.0.5 so
> apache from 192.168.2.2 only listens for
> subdomain.maindomain.com .
>
> Can I do this with one Internet IP?
>
> Paul Nowosielski
>

It is definitely possible if you are willing to use separate 
ports for different machines.  Using only port 80, I don't 
know.  One idea I had while thinking about this was the 
following: Why not try writing an ipchain/iptable 
forwarding rule using the -d option set to the hostname you 
would like to forward?  The format is the same as the -s 
option, and is described in man ipchains/iptables.  Since 
the man page warns against using a name that would require 
a reverse-dns lookup, I suppose that it would have to be in 
your hosts file as well.  I don't know if this will work, 
but there's a chance.

Case Jones



More information about the LUG mailing list