* REDIRECT and IPv6
@ 2007-07-19 0:25 squid3
2007-07-19 8:59 ` Patrick McHardy
0 siblings, 1 reply; 6+ messages in thread
From: squid3 @ 2007-07-19 0:25 UTC (permalink / raw)
To: netfilter
Greetings,
Pardon if this is a dumb question. But I have searched the web, and the
source code for a solution to this one and have reached a brick wall.
I'm upgrading a user-space proxy (squid3) which has in the past done
transparent connections under IPv4-only using SO_ORIGINAL_DST.
The Firewall/router uses iptables and REDIRECT port 80 outbound to port
81. All is fine and dandy when squid listens on 0.0.0.0:81.
With the new code I have to use an IPv6 socket ( [::]:81 ) as the
receiver. With that getsockopt(..., SO_ORIGINAL_DST, ...) always returns
err "92 Protocol not supported." regardless of the IP-level parameters
passed in.
NOTE: All traffic for testing so far has been from IPv4 clients to what
they think is an IPv4 server, but with a dual-enabled middleman. The
'middleman' Software is iptables 1.3.6 on Debian 2.6.21-2-486 (unstable),
squid3 built with g++ 4.1.3.
Can anyone point me in the right direction for a solution that will work?
Ideally one that is protocol-independant, but anything is welcome even an
'upgrade to X'.
Amos Jeffries
Squid3 Development Team
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REDIRECT and IPv6
2007-07-19 0:25 REDIRECT and IPv6 squid3
@ 2007-07-19 8:59 ` Patrick McHardy
2007-07-19 9:21 ` YOSHIFUJI Hideaki / 吉藤英明
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Patrick McHardy @ 2007-07-19 8:59 UTC (permalink / raw)
To: squid3; +Cc: Netfilter Development Mailinglist, netfilter
squid3@treenet.co.nz wrote:
> Greetings,
>
> Pardon if this is a dumb question. But I have searched the web, and the
> source code for a solution to this one and have reached a brick wall.
>
> I'm upgrading a user-space proxy (squid3) which has in the past done
> transparent connections under IPv4-only using SO_ORIGINAL_DST.
>
> The Firewall/router uses iptables and REDIRECT port 80 outbound to port
> 81. All is fine and dandy when squid listens on 0.0.0.0:81.
>
> With the new code I have to use an IPv6 socket ( [::]:81 ) as the
> receiver. With that getsockopt(..., SO_ORIGINAL_DST, ...) always returns
> err "92 Protocol not supported." regardless of the IP-level parameters
> passed in.
>
> NOTE: All traffic for testing so far has been from IPv4 clients to what
> they think is an IPv4 server, but with a dual-enabled middleman. The
> 'middleman' Software is iptables 1.3.6 on Debian 2.6.21-2-486 (unstable),
> squid3 built with g++ 4.1.3.
You're right, nf_conntrack_ipv4 only registeres SO_ORIGINAL_DST for
AF_INET, changing that should make it work I believe. I feel like
I'm missing something though ..
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REDIRECT and IPv6
2007-07-19 8:59 ` Patrick McHardy
@ 2007-07-19 9:21 ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-19 10:20 ` Patrick McHardy
2007-07-19 9:48 ` Yasuyuki KOZAKAI
[not found] ` <200707190948.l6J9mk02018250@toshiba.co.jp>
2 siblings, 1 reply; 6+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-07-19 9:21 UTC (permalink / raw)
To: kaber; +Cc: squid3, netfilter-devel, netfilter
In article <469F280B.3070900@trash.net> (at Thu, 19 Jul 2007 10:59:55 +0200), Patrick McHardy <kaber@trash.net> says:
> You're right, nf_conntrack_ipv4 only registeres SO_ORIGINAL_DST for
> AF_INET, changing that should make it work I believe. I feel like
> I'm missing something though ..
BTW, the name of the socket option is rather bogus.
It should be named IP_xxx, not SO_xxx because
it is in IP level, not in socket level...
--yoshfuji
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REDIRECT and IPv6
2007-07-19 8:59 ` Patrick McHardy
2007-07-19 9:21 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-07-19 9:48 ` Yasuyuki KOZAKAI
[not found] ` <200707190948.l6J9mk02018250@toshiba.co.jp>
2 siblings, 0 replies; 6+ messages in thread
From: Yasuyuki KOZAKAI @ 2007-07-19 9:48 UTC (permalink / raw)
To: kaber; +Cc: netfilter-devel, netfilter
From: Patrick McHardy <kaber@trash.net>
Date: Thu, 19 Jul 2007 10:59:55 +0200
> squid3@treenet.co.nz wrote:
> > Greetings,
> >
> > Pardon if this is a dumb question. But I have searched the web, and the
> > source code for a solution to this one and have reached a brick wall.
> >
> > I'm upgrading a user-space proxy (squid3) which has in the past done
> > transparent connections under IPv4-only using SO_ORIGINAL_DST.
> >
> > The Firewall/router uses iptables and REDIRECT port 80 outbound to port
> > 81. All is fine and dandy when squid listens on 0.0.0.0:81.
> >
> > With the new code I have to use an IPv6 socket ( [::]:81 ) as the
> > receiver. With that getsockopt(..., SO_ORIGINAL_DST, ...) always returns
> > err "92 Protocol not supported." regardless of the IP-level parameters
> > passed in.
> >
> > NOTE: All traffic for testing so far has been from IPv4 clients to what
> > they think is an IPv4 server, but with a dual-enabled middleman. The
> > 'middleman' Software is iptables 1.3.6 on Debian 2.6.21-2-486 (unstable),
> > squid3 built with g++ 4.1.3.
>
>
> You're right, nf_conntrack_ipv4 only registeres SO_ORIGINAL_DST for
> AF_INET, changing that should make it work I believe. I feel like
> I'm missing something though ..
I wrote getorigdst() for IPv6 at once but threw away it
because of no IPv6 NAT :) I hope that new tproxy will support IPv6 in future.
-- Yasuyuki Kozakai
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REDIRECT and IPv6
2007-07-19 9:21 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-07-19 10:20 ` Patrick McHardy
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2007-07-19 10:20 UTC (permalink / raw)
To: YOSHIFUJI Hideaki; +Cc: squid3, netfilter-devel, netfilter, kaber
YOSHIFUJI Hideaki / 吉藤英明
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: REDIRECT and IPv6
[not found] ` <200707190948.l6J9mk02018250@toshiba.co.jp>
@ 2007-07-22 9:22 ` Amos Jeffries
0 siblings, 0 replies; 6+ messages in thread
From: Amos Jeffries @ 2007-07-22 9:22 UTC (permalink / raw)
To: netfilter-devel; +Cc: netfilter
Yasuyuki KOZAKAI wrote:
> From: Patrick McHardy <kaber@trash.net>
> Date: Thu, 19 Jul 2007 10:59:55 +0200
>
>> squid3@treenet.co.nz wrote:
>>> Greetings,
>>>
>>> Pardon if this is a dumb question. But I have searched the web, and the
>>> source code for a solution to this one and have reached a brick wall.
>>>
>>> I'm upgrading a user-space proxy (squid3) which has in the past done
>>> transparent connections under IPv4-only using SO_ORIGINAL_DST.
>>>
>>> The Firewall/router uses iptables and REDIRECT port 80 outbound to port
>>> 81. All is fine and dandy when squid listens on 0.0.0.0:81.
>>>
>>> With the new code I have to use an IPv6 socket ( [::]:81 ) as the
>>> receiver. With that getsockopt(..., SO_ORIGINAL_DST, ...) always returns
>>> err "92 Protocol not supported." regardless of the IP-level parameters
>>> passed in.
>>>
>>> NOTE: All traffic for testing so far has been from IPv4 clients to what
>>> they think is an IPv4 server, but with a dual-enabled middleman. The
>>> 'middleman' Software is iptables 1.3.6 on Debian 2.6.21-2-486 (unstable),
>>> squid3 built with g++ 4.1.3.
>>
>> You're right, nf_conntrack_ipv4 only registeres SO_ORIGINAL_DST for
>> AF_INET, changing that should make it work I believe. I feel like
>> I'm missing something though ..
>
> I wrote getorigdst() for IPv6 at once but threw away it
> because of no IPv6 NAT :) I hope that new tproxy will support IPv6 in future.
>
> -- Yasuyuki Kozakai
Thanks for everything people.
Well, obviously the REDIRECT is working despite no IPv6 NAT.
What sort of a timeframe should I expect before this case is working?
Amos
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-07-22 9:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19 0:25 REDIRECT and IPv6 squid3
2007-07-19 8:59 ` Patrick McHardy
2007-07-19 9:21 ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-19 10:20 ` Patrick McHardy
2007-07-19 9:48 ` Yasuyuki KOZAKAI
[not found] ` <200707190948.l6J9mk02018250@toshiba.co.jp>
2007-07-22 9:22 ` Amos Jeffries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox