Re: [Pound Mailing List] Location comparision with backend address & host

Bussi Andrea <[email protected]>
Newsgroups gmane.comp.web.pound.general
Message-ID <[email protected]>
On 03/25/2013 04:40 PM, Joe Gooch wrote:
> Since I split my listeners, (ipv4 and ipv6, no wildcard), I haven't had this problem.
>
Had I known that, probably I would have changed my configuration
instead of patching Pound!

> It's something that could be dealt with easily with logparsers/helper scripts.
>
My configuration has Pound sending requests to Apache; on the Apache
machines, mod_extract_forwarded is used to mask the address of the
reverse proxy and to get the client addresses into the Apache vars.

Later on, when I added IPv6 on the Pound machine, I started to
get the v4 MAPPED addresses (those in the form ::ffff:a.b.c.d)
into Apache. [Due to my wildcard listener, as Joe noticed]

ACLs did not match anymore on those addresses. Ouch!

I though, let's duplicate all the whitelisted addresses (it is a
short list, fortunately) in the new form; but Apache is refusing
those addresses as invalid.

Next thing was preventing Pound from generating those, and so this
patch came to light. I didn't send to the list immediately, as I wanted
to test it, and then I forgot about it.

I've used it for some months now, and when I saw the message from
Raj Kishore, I though it was time to send this; maybe it will be
useful to somebody else.

> However, I could see how some might want the ips translated.
>
> I think you'll find this is more simplistic and accomplishes the same result.
>
Didn't have time to test this yet, but yes, it's way cleaner
than mine; thank you!

Best regards,
					Bussi Andrea


> Joe
>
>> -----Original Message-----
>> From: Bussi Andrea [mailto:[email protected]]
>> Sent: Monday, March 25, 2013 11:07 AM
>> To: [email protected]
>> Subject: Re: [Pound Mailing List] Location comparision with backend
>> address & host
>>
>> On 03/18/2013 09:43 AM, Bussi Andrea wrote:
>>> On 03/16/2013 09:30 AM, Raj Kishore1/CHN/TCS wrote:
>>>> Hi Joe,
>>>>
>>>> Thanks for the previous replies.
>>>>
>>>> We have modified the pound 1.9 socket structures to listen IPV4/ipv6
>>>> address.
>>>>
>>>> However when IPV4 request comes,it is mapped to IPV6 address as
>>>> ::ffff:<X.X.X.X> In case of IPV6 client, it is fetching the IPV6
>>>> address only.
>>>>
>>>> Is it the right mechansim to handle ipv4 client in ipv4 mapped ipv6
>>>> address mode in pound?
>>>>
>>>> Do we need to handele explicitly  the IPV4-6 mapped address in dual
>>>> stack?
>>>>
>>> I had the same problem with Pound 2.6; it seems to be an issue in the
>>> inet_ntop function, if I'm not mistaken.
>>>
>>> I don't believe my patch (attached below) is the right way to solve
>>> it; the proper way should be a patched inet_ntop.
>>>
>>> But this solved my troubles; maybe somebody else will find it useful
>>> too.
>>>
>>
>> The patch I previously posted didn't initialize the port variable for
>> IPv4 addresses, so the addr2str function would print an uninitialized
>> stack value as the port number.
>>
>> This is the right patch.
>>
>> Sorry for the mistake,
>> 				Bussi Andrea
>>
>>
>>> Best regards,
>>>                       Bussi Andrea
>>>
>>
>


--
To unsubscribe send an email with subject unsubscribe to [email protected]
Please contact [email protected] for questions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.