* RE: PPTP+NAT+MASQ anyone?
@ 2002-12-09 11:57 Rob Sterenborg
2002-12-11 14:05 ` hostname forwarding bernard
0 siblings, 1 reply; 8+ messages in thread
From: Rob Sterenborg @ 2002-12-09 11:57 UTC (permalink / raw)
To: 'Roy Sigurd Karlsbakk', 'Netfilter mailinglist'
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
> I've kept trying now. many times, to do NAT+MASQ+PPTP, but as
> soon as I
> compile 2.4.18 (the only one I've managed to patch-o-matic)
> and boot it, it
> refuses to -j MASQUERADE. (invalid argument). Are anyone running this?
Yup, on my test-box : 2.4.20-rc1 (still, but it's doing nothing at the
moment).
I had no problems patching it however.
Rob
[-- Attachment #2: Type: text/html, Size: 863 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* hostname forwarding
2002-12-09 11:57 PPTP+NAT+MASQ anyone? Rob Sterenborg
@ 2002-12-11 14:05 ` bernard
2002-12-11 15:06 ` Patrick Maartense
0 siblings, 1 reply; 8+ messages in thread
From: bernard @ 2002-12-11 14:05 UTC (permalink / raw)
To: netfilter
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hostname forwarding
2002-12-11 14:05 ` hostname forwarding bernard
@ 2002-12-11 15:06 ` Patrick Maartense
2002-12-12 5:36 ` Raymond Leach
2002-12-12 12:20 ` bernard
0 siblings, 2 replies; 8+ messages in thread
From: Patrick Maartense @ 2002-12-11 15:06 UTC (permalink / raw)
To: bernard; +Cc: netfilter
this is not possible using ipotables
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
>
--
---
Kind Regards
Patrick Maartense (using Pine on a Text Console)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hostname forwarding
2002-12-11 15:06 ` Patrick Maartense
@ 2002-12-12 5:36 ` Raymond Leach
2002-12-12 7:16 ` Blizzards
2002-12-12 12:20 ` bernard
1 sibling, 1 reply; 8+ messages in thread
From: Raymond Leach @ 2002-12-12 5:36 UTC (permalink / raw)
To: Patrick Maartense; +Cc: bernard, Netfilter Mailing List
[-- 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 --]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: hostname forwarding
2002-12-12 5:36 ` Raymond Leach
@ 2002-12-12 7:16 ` Blizzards
2002-12-12 7:13 ` Raymond Leach
0 siblings, 1 reply; 8+ messages in thread
From: Blizzards @ 2002-12-12 7:16 UTC (permalink / raw)
To: raymondl; +Cc: Patrick Maartense, bernard, Netfilter Mailing List
The host A and Host B share the same ip address.
In this case -s is no useful because resolving host a and host b return
the same address, and the 1st match win.
You can use APACHE name virtual host to handle this correctly.
G.
>>
>>
>>
>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
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hostname forwarding
2002-12-12 7:16 ` Blizzards
@ 2002-12-12 7:13 ` Raymond Leach
0 siblings, 0 replies; 8+ messages in thread
From: Raymond Leach @ 2002-12-12 7:13 UTC (permalink / raw)
To: Blizzards; +Cc: Patrick Maartense, bernard, Netfilter Mailing List
[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]
OK, that makes sense...
On Thu, 2002-12-12 at 09:16, Blizzards wrote:
> The host A and Host B share the same ip address.
> In this case -s is no useful because resolving host a and host b return
> the same address, and the 1st match win.
> You can use APACHE name virtual host to handle this correctly.
>
> G.
>
> >>
> >>
> >>
> >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
> >
> >
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
( 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 --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: hostname forwarding
2002-12-11 15:06 ` Patrick Maartense
2002-12-12 5:36 ` Raymond Leach
@ 2002-12-12 12:20 ` bernard
1 sibling, 0 replies; 8+ messages in thread
From: bernard @ 2002-12-12 12:20 UTC (permalink / raw)
To: netfilter
Thank again for your valuable help.
So apache can take http requests to do that but what's about the
other protocols ?
It seems that squid can do a transparent proxy for some of them.
Do I need to use a specific solutions for each different protocol I
want to set and what solution to use for the most common (telnet,
pop, imap, ftp, ...) ?
Bernard
>this is not possible using ipotables
>
>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
>>
>
>--
>---
>Kind Regards
>Patrick Maartense (using Pine on a Text Console)
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <FD8F124A387AD6119F7900A0D218B3215619EA@hslex01.hslbz.local>]
* RE: hostname forwarding
[not found] <FD8F124A387AD6119F7900A0D218B3215619EA@hslex01.hslbz.local>
@ 2002-12-11 15:43 ` Rob Sterenborg
0 siblings, 0 replies; 8+ messages in thread
From: Rob Sterenborg @ 2002-12-11 15:43 UTC (permalink / raw)
To: 'bernard', netfilter
> 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 ?
Iptables will only forward (resolved) IP adresses (and/or ports).
If Host-A has the same IP address as Host-B, then packets will be
forwarded to one and the same internet IP address.
You could accept http traffic on, let's say, port 81 and redirect
traffic for Host-B:81 to 192.168.1.2:80, but I don't think that's what
you want : people would have to type http://Host-B:81 to enter the site.
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-12-12 12:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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.