All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raymond Leach <raymondl@knowledgefactory.co.za>
To: Patrick Maartense <patrick@patrick.at>
Cc: bernard <bernard@gers.net>,
	Netfilter Mailing List <netfilter@lists.netfilter.org>
Subject: Re: hostname forwarding
Date: 12 Dec 2002 07:36:10 +0200	[thread overview]
Message-ID: <1039671369.4125.12.camel@rayw.knowledgefactory.co.za> (raw)
In-Reply-To: <Pine.LNX.4.33.0212111606240.17876-100000@www.csbenter.at>

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

On Wed, 2002-12-11 at 17:06, Patrick Maartense wrote:
> this is not possible using ipotables
> 
Ummm, what is the -s parameter for then?
iptables -t nat -A PREROUTING -p tcp -s <hostname A> --dport 80 -j
REDIRECT --to-destination 192.168.1.1:80
iptables -t nat -A PREROUTING -p tcp -s <hostname B> --dport 80 -j
REDIRECT --to-destination 192.168.1.2:80

Or am I missing something?

Ray
> Apache however can very well handle this ..
> 
> 
> On Wed, 11 Dec 2002, bernard wrote:
> 
> > I'm using iptables to redirect external requests depending on their 
> > port/protocol like this :
> > 
> > 	hostname A:80 -> public ip -> iptables -> 192.168.1.1:80
> > 	hostname B:80 -> public ip -> iptables -> 192.168.1.1:80
> > 
> > It works pretty well, thanks to iptables :-)
> > 
> > Now I want to redirect on a hostname basis on different private ip's 
> > like this :
> > 
> > 	hostname A:80 -> public ip -> iptables -> 192.168.1.1:80
> > 	hostname B:80 -> public ip -> iptables -> 192.168.1.2:80
> > 
> > Does anyone know a solution ?
> > 
> > Thanks for your help.
> > 
> > Bernard
> > 
-- 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(  Raymond Leach                       )
 ) Knowledge Factory                  (
(                                      )
 ) Tel: +27 11 445 8100               (
(  Fax: +27 11 445 8101                )
 )                                    (
(  http://www.knowledgefactory.co.za/  )
 ) http://www.saptg.co.za/            (
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   o                                o
    o                              o
        .--.                  .--.
       | o_o|                |o_o |
       | \_:|                |:_/ |
      / /   \\              //   \ \
     ( |     |)            (|     | )
     /`\_   _/'\          /'\_   _/`\
     \___)=(___/          \___)=(___/

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2002-12-12  5:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-09 11:57 PPTP+NAT+MASQ anyone? Rob Sterenborg
2002-12-11 14:05 ` hostname forwarding bernard
2002-12-11 15:06   ` Patrick Maartense
2002-12-12  5:36     ` Raymond Leach [this message]
2002-12-12  7:16       ` Blizzards
2002-12-12  7:13         ` Raymond Leach
2002-12-12 12:20     ` bernard
     [not found] <FD8F124A387AD6119F7900A0D218B3215619EA@hslex01.hslbz.local>
2002-12-11 15:43 ` Rob Sterenborg

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=1039671369.4125.12.camel@rayw.knowledgefactory.co.za \
    --to=raymondl@knowledgefactory.co.za \
    --cc=bernard@gers.net \
    --cc=netfilter@lists.netfilter.org \
    --cc=patrick@patrick.at \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.