iptables, multiple hosts, one IP

Discussion in 'Installation/Configuration' started by wyzzkid, Apr 6, 2007.

  1. wyzzkid

    wyzzkid New Member


    I searched, but cant find this in the fora, so hopefully someone can help.

    I have only dedicated IP address, and I have 3 hosts (same for physical or virtual hosts, I guess) and what I would like is:

    to have each host have its own LAMP hosting its own domains, but from the outside world, everyone should only see www.whatever.tld, without the need to add port numbers, etc

    can this be done with some form of iptables, apache reidrects (via ispconfig, or similar)?

    I have a test server running with a xen domain, hosting a couple of them, and need to expand (currently only the dom-u is visible from outside)

    it does not matter to me whether I use xen or vm or anything else, so long as I can have one machine dictate where each request goes, e.g.:

    if dedicated IP is, and hosts are
    apple, hosting first.com, second.com, third.net,
    pear, hosting fourth.com, fifth.net, sixth.org,
    ... plum hosting tenth.com, eleventh.com, etc

    the idea being that from the outside, someone would enter www.fifth.com, and it would get to the right host. Ideally, of course, it would be nice to have only one hosting control panel, but I dont mind having one on each host

    can it be done, or must I have multiple dedicated IP's? :confused:

    any help will be gratefully appreciated
  2. falko

    falko Super Moderator ISPConfig Developer

    Usually (at least with the routers I know) you can forward one port to only one machine, so what you're trying to do is not possible. But I'm not sure if there are routers that can do this (or if this can be done with iptables)... :confused:
  3. nzfoxnet

    nzfoxnet New Member

    Use LB / HA

    Follow one of the loadbalancer guides here, redirect all requests to the loadbalancer server/s and they then keep track of the session and also the redirecting.

Share This Page