Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: NAT question (forwarding with subdomains)
Date: Thu, 13 May 2004 19:08:40 +0100	[thread overview]
Message-ID: <200405131908.40252.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <55621.200.107.22.222.1084470741.squirrel@www.easyteck.com>

On Thursday 13 May 2004 6:52 pm, Paul F. Bernal B. - EasyTeck wrote:

> Hi!,
>
> I got an internal 192.168.0.0/24 LAN with about 5 web servers including
> the one which has iptables running and internet output ...

You're running your firewall and a web server on the same machine?   Ugh...

> What I need to do is:
>
> When someone in the Internet asks for http://sub1.mydomain.com/ respons
> the 192.168.0.3 machine (wich has a web server running port 80)
>
> When someone in the Internet asks for http://sub2.mydomain.com/ responds
> the 192.168.0.4 machine (wich has a web server running port 80)

If DNS resolves sub1.mydomain.com and sub2.mydomain.com as two different IP 
addresses, then simple DNAT rules will work here.

If sub1.mydomain.com and sub2.mydomain.com resolve to the same IP address, 
then you cannot do what you want with netfilter (because it works with IP 
addresses and port numbers, not hostnames and domains).

The solution in that case would be Squid or Apache as acceleration proxy 
servers.

Regards,

Antony.

-- 
People who use Microsoft software should be certified.

                                                     Please reply to the list;
                                                           please don't CC me.



  reply	other threads:[~2004-05-13 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040513172702.17791.51996.Mailman@vishnu.netfilter.org>
2004-05-13 17:52 ` NAT question (forwarding with subdomains) Paul F. Bernal B. - EasyTeck
2004-05-13 18:08   ` Antony Stone [this message]
2004-05-13 19:24     ` Paul F. Bernal B. - EasyTeck
2004-05-13 18:17   ` John A. Sullivan III
2004-05-13 20:06     ` Alistair Tonner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200405131908.40252.Antony@Soft-Solutions.co.uk \
    --to=antony@soft-solutions.co.uk \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox