Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Feb 2005 04:29:01 -0800
From:      "Loren M. Lang" <lorenl@alzatex.com>
To:        r p <freebsd99@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Redirect based on domain name
Message-ID:  <20050206122901.GY8619@alzatex.com>
In-Reply-To: <eae9dad805020601174223ea4f@mail.gmail.com>
References:  <eae9dad805020601174223ea4f@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 06, 2005 at 05:17:25PM +0800, r p wrote:
> Hi,
> 
> I've set up two jails on my system. I'm wondering if it's possible to
> redirect incoming traffic to a particular jail based on the domain
> name?
> 
> So, if someone connected to "first.com" they would be directed to the
> 192.168.0.1 jail, and if they connected to "second.com" they would be
> directed to the 192.168.0.2 jail.

Oops, I didn't read the message clearly the first time.  Yes, you can do
this pretty easily since your using two different ips.  For all services
that your running on multiple ips, you need to make sure that they bind
only to their ip, not all ips like the default it.  For sshd, set
ListenAddress to the correct address in sshd_config.  Then just make
sure that first.com and second.com map to different ip addresses.

> 
> I'd like to do it for www and ssh. Someone suggested to me that maybe
> squid could be employed for the www part.
> 
> At the moment I'm achieving this by listening for non-standard ports
> on my firewall/gateway box and then redirecting to the correct jail
> based on what port is connected to.
> 
> Any ideas, or pointers?
> 
> 
> ---
> Rick
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"

-- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD  835A FAF3 7A46 E4A3 280C
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050206122901.GY8619>