Redirect based on domain name

Loren M. Lang lorenl at alzatex.com
Sun Feb 6 04:29:03 PST 2005


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at 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
 


More information about the freebsd-questions mailing list