Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: squid3@treenet.co.nz
Cc: Netfilter Development Mailinglist
	<netfilter-devel@lists.netfilter.org>,
	netfilter@lists.netfilter.org
Subject: Re: REDIRECT and IPv6
Date: Thu, 19 Jul 2007 10:59:55 +0200	[thread overview]
Message-ID: <469F280B.3070900@trash.net> (raw)
In-Reply-To: <1246.130.217.140.56.1184804730.squirrel@webmail.treenet.co.nz>

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 ..



  reply	other threads:[~2007-07-19  8:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19  0:25 REDIRECT and IPv6 squid3
2007-07-19  8:59 ` Patrick McHardy [this message]
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

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=469F280B.3070900@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=netfilter@lists.netfilter.org \
    --cc=squid3@treenet.co.nz \
    /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