All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: HELP! Transparent Proxy using bridging 2.6.9 and REDIRECT on different subnet
@ 2005-03-25 21:30 Trevor Paskett
  0 siblings, 0 replies; 13+ messages in thread
From: Trevor Paskett @ 2005-03-25 21:30 UTC (permalink / raw)
  To: gtaylor; +Cc: coreteam, netfilter

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

I have found a solution :)

It was missing a route. If I do

ip route add 192.168.255.0/24 dev br0

For the remote subnets everything works as it should. Thanks for everyone's
help!!

Trevor Paskett
Cymphonix Programmer - CCNA, CWNA
P: 801-938-1500 F: 801-938-1501
 

-----Original Message-----
From: Grant Taylor [mailto:gtaylor@riverviewtech.net] 
Sent: Thursday, March 24, 2005 1:10 PM
To: Trevor Paskett
Cc: netfilter@lists.netfilter.org; coreteam@netfilter.org
Subject: Re: HELP! Transparent Proxy using bridging 2.6.9 and REDIRECT on
different subnet

There is one last really dastardly thing that I think *might* work.  That
would be running your system with a UML in side of it that does nothing but
DNATing/SNATing of traffic coming in to it so that traffic could be
redirected right back to Squid and then out and back through the DNAT/SNAT
router and then back to the box it's self where things can be handled.  But
when I start thinking of things like this I also start thinking that there
is something either missing or broken that is preventing me from doing what
I want to do, but sometimes things like this are necessary.  I presently do
not have a system set up any where to test this and I will not have time to
do so for a while.  If you would like me to continue down this road next
week I would be willing to do so.  In short the following would be the
packet's path through the network:

Client System(s) <-> Linux 2.6.9 System (DNAT/SNAT) <-> Linux 2.6.9 UML
(DNAT/SNAT) <-> Squid on Linux 2.6.9 System <-> Linux 2.6.9 UML (DNAT/SNAT)
<-> Linux 2.6.9 System (DNAT/SNAT) <-> INet Router <-> Client System(s)

Yes this is a LONG convoluted path, but this is all that I can think of with
out really messing with the packet.  I have had reasonable success running
UMLs for routing before as I have a client that routes out across 8 cable
modems on the same subnet in a pseudo round robin fashion via routing to 8
UML virtual routers and then bridging back to the interfaces that the cable
modems are connected to.  I ended up using 802.1q VLAN tagging to create the
8 virtual interfaces with wonderful success.  So things like this are
doable, just cumbersome and I've not seen any network config or firewall
package that would even come close to doing things like this.  This is all
hand rolled stuff.



Grant. . . .

Trevor Paskett wrote:

> Thanks for your reply. Our product is a Linux based product that uses
> netfilter. We have Squid and a filtering engine on our box. We are
> strong supporters of netfilter. Our customers have many subnets behind
> our box because of where it is placed in their network. Bringing up
> alias's on br0 for each of their subnets that are not even on that
> broadcast domain is a big band aid :). I think this is somehow a bug in
> ip_nat_core.c and will investigate that further and have cc'd
> coreteam@netfilter.org and hopefully that will get to Rusty who wrote
> it.
> 
> As for the SNAT I think Jason Opperisano's response is correct.
> Everything works great, except somewhere in ip_nat_core.c the src port
> is getting changed to 1 from 80. I have attached an ethereal dump to
> show this happening and a dump when it does what it is supposed to.
> Everything between the 2 is the same, except after I captured the
> no_work.cap, I did
> 
> ifconfig br0:0 192.168.255.165
> 
> So it had an IP on the test machine's subnet. Of course it worked fine
> and that capture is work.cap
> 
> Thanks for all your help.
> 
> Trevor Paskett
> Cymphonix Programmer - CCNA, CWNA
> P: 801-938-1500 F: 801-938-1501


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3034 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* RE: HELP! Transparent Proxy using bridging 2.6.9 and REDIRECT on different subnet
@ 2005-03-24 19:04 ` Trevor Paskett
  0 siblings, 0 replies; 13+ messages in thread
From: Trevor Paskett @ 2005-03-24 19:04 UTC (permalink / raw)
  To: gtaylor; +Cc: coreteam, netfilter, netfilter-devel

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


Thanks for your reply. Our product is a Linux based product that uses
netfilter. We have Squid and a filtering engine on our box. We are
strong supporters of netfilter. Our customers have many subnets behind
our box because of where it is placed in their network. Bringing up
alias's on br0 for each of their subnets that are not even on that
broadcast domain is a big band aid :). I think this is somehow a bug in
ip_nat_core.c and will investigate that further and have cc'd
coreteam@netfilter.org and hopefully that will get to Rusty who wrote
it.

As for the SNAT I think Jason Opperisano's response is correct.
Everything works great, except somewhere in ip_nat_core.c the src port
is getting changed to 1 from 80. I have attached an ethereal dump to
show this happening and a dump when it does what it is supposed to.
Everything between the 2 is the same, except after I captured the
no_work.cap, I did

ifconfig br0:0 192.168.255.165

So it had an IP on the test machine's subnet. Of course it worked fine
and that capture is work.cap

Thanks for all your help.

Trevor Paskett
Cymphonix Programmer - CCNA, CWNA
P: 801-938-1500 F: 801-938-1501
 

[-- Attachment #2: work.cap --]
[-- Type: application/octet-stream, Size: 10181 bytes --]

No.     Time        Source                Destination           Protocol Info
      1 0.000000    192.168.255.152       192.168.255.3         TCP      3380 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1460

Frame 1 (62 bytes on wire, 62 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3380 (3380), Dst Port: http (80), Seq: 0, Ack: 0, Len: 0
    Source port: 3380 (3380)
    Destination port: http (80)
    Sequence number: 0    (relative sequence number)
    Header length: 28 bytes
    Flags: 0x0002 (SYN)
    Window size: 65535
    Checksum: 0x9e52 (correct)
    Options: (8 bytes)

No.     Time        Source                Destination           Protocol Info
      2 0.000194    192.168.255.3         192.168.255.152       TCP      http > 3380 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460

Frame 2 (62 bytes on wire, 62 bytes captured)
Ethernet II, Src: 00:30:64:03:24:e7, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: http (80), Dst Port: 3380 (3380), Seq: 0, Ack: 1, Len: 0
    Source port: http (80)
    Destination port: 3380 (3380)
    Sequence number: 0    (relative sequence number)
    Acknowledgement number: 1    (relative ack number)
    Header length: 28 bytes
    Flags: 0x0012 (SYN, ACK)
    Window size: 5840
    Checksum: 0xed82 (correct)
    Options: (8 bytes)
    SEQ/ACK analysis

No.     Time        Source                Destination           Protocol Info
      3 0.000240    192.168.255.152       192.168.255.3         TCP      3380 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0

Frame 3 (54 bytes on wire, 54 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3380 (3380), Dst Port: http (80), Seq: 1, Ack: 1, Len: 0
    Source port: 3380 (3380)
    Destination port: http (80)
    Sequence number: 1    (relative sequence number)
    Acknowledgement number: 1    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
    Window size: 65535
    Checksum: 0x3117 (correct)
    SEQ/ACK analysis

No.     Time        Source                Destination           Protocol Info
      4 0.000625    192.168.255.152       192.168.255.3         HTTP     GET /test/ HTTP/1.1

Frame 4 (458 bytes on wire, 458 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3380 (3380), Dst Port: http (80), Seq: 1, Ack: 1, Len: 404
    Source port: 3380 (3380)
    Destination port: http (80)
    Sequence number: 1    (relative sequence number)
    Next sequence number: 405    (relative sequence number)
    Acknowledgement number: 1    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
    Window size: 65535
    Checksum: 0x1c43 (correct)
Hypertext Transfer Protocol

No.     Time        Source                Destination           Protocol Info
      5 0.001738    192.168.255.3         192.168.255.152       TCP      http > 3380 [ACK] Seq=1 Ack=405 Win=6432 Len=0

Frame 5 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: 00:30:64:03:24:e7, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: http (80), Dst Port: 3380 (3380), Seq: 1, Ack: 405, Len: 0
    Source port: http (80)
    Destination port: 3380 (3380)
    Sequence number: 1    (relative sequence number)
    Acknowledgement number: 405    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
    Window size: 6432
    Checksum: 0x1663 (correct)
    SEQ/ACK analysis

No.     Time        Source                Destination           Protocol Info
      6 0.006142    192.168.255.3         192.168.255.152       HTTP     HTTP/1.0 200 OK (text/html)

Frame 6 (1168 bytes on wire, 1168 bytes captured)
Ethernet II, Src: 00:30:64:03:24:e7, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: http (80), Dst Port: 3379 (3379), Seq: 0, Ack: 0, Len: 1114
    Source port: http (80)
    Destination port: 3379 (3379)
    Sequence number: 0    (relative sequence number)
    Next sequence number: 1114    (relative sequence number)
    Acknowledgement number: 0    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0019 (FIN, PSH, ACK)
    Window size: 6432
    Checksum: 0xc754 (correct)
Hypertext Transfer Protocol
Line-based text data: text/html

No.     Time        Source                Destination           Protocol Info
      7 0.006193    192.168.255.152       192.168.255.3         TCP      3379 > http [RST, ACK] Seq=0 Ack=1114 Win=0 Len=0

Frame 7 (54 bytes on wire, 54 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3379 (3379), Dst Port: http (80), Seq: 0, Ack: 1114, Len: 0
    Source port: 3379 (3379)
    Destination port: http (80)
    Sequence number: 0    (relative sequence number)
    Acknowledgement number: 1114    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0014 (RST, ACK)
    Window size: 0
    Checksum: 0xdc3a (correct)

No.     Time        Source                Destination           Protocol Info
      8 0.012826    192.168.255.3         192.168.255.152       HTTP     HTTP/1.0 200 OK

Frame 8 (71 bytes on wire, 71 bytes captured)
Ethernet II, Src: 00:30:64:03:24:e7, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: http (80), Dst Port: 3380 (3380), Seq: 1, Ack: 405, Len: 17
    Source port: http (80)
    Destination port: 3380 (3380)
    Sequence number: 1    (relative sequence number)
    Next sequence number: 18    (relative sequence number)
    Acknowledgement number: 405    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
    Window size: 6432
    Checksum: 0x5685 (correct)
Hypertext Transfer Protocol

No.     Time        Source                Destination           Protocol Info
      9 0.014988    192.168.255.3         192.168.255.152       HTTP     Continuation or non-HTTP traffic (text/html)

Frame 9 (1151 bytes on wire, 1151 bytes captured)
Ethernet II, Src: 00:30:64:03:24:e7, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: http (80), Dst Port: 3380 (3380), Seq: 18, Ack: 405, Len: 1097
    Source port: http (80)
    Destination port: 3380 (3380)
    Sequence number: 18    (relative sequence number)
    Next sequence number: 1115    (relative sequence number)
    Acknowledgement number: 405    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0019 (FIN, PSH, ACK)
    Window size: 6432
    Checksum: 0x1cc4 (correct)
Hypertext Transfer Protocol
Line-based text data: text/html

No.     Time        Source                Destination           Protocol Info
     10 0.015094    192.168.255.152       192.168.255.3         TCP      3380 > http [ACK] Seq=405 Ack=1116 Win=64421 Len=0

Frame 10 (54 bytes on wire, 54 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3380 (3380), Dst Port: http (80), Seq: 405, Ack: 1116, Len: 0
    Source port: 3380 (3380)
    Destination port: http (80)
    Sequence number: 405    (relative sequence number)
    Acknowledgement number: 1116    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
    Window size: 64421
    Checksum: 0x2f82 (correct)
    SEQ/ACK analysis

No.     Time        Source                Destination           Protocol Info
     11 0.018648    192.168.255.152       192.168.255.3         TCP      3380 > http [FIN, ACK] Seq=405 Ack=1116 Win=64421 Len=0

Frame 11 (54 bytes on wire, 54 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3380 (3380), Dst Port: http (80), Seq: 405, Ack: 1116, Len: 0
    Source port: 3380 (3380)
    Destination port: http (80)
    Sequence number: 405    (relative sequence number)
    Acknowledgement number: 1116    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0011 (FIN, ACK)
    Window size: 64421
    Checksum: 0x2f81 (correct)

No.     Time        Source                Destination           Protocol Info
     12 0.018770    192.168.255.3         192.168.255.152       TCP      http > 3380 [ACK] Seq=1116 Ack=406 Win=6432 Len=0

Frame 12 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: 00:30:64:03:24:e7, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: http (80), Dst Port: 3380 (3380), Seq: 1116, Ack: 406, Len: 0
    Source port: http (80)
    Destination port: 3380 (3380)
    Sequence number: 1116    (relative sequence number)
    Acknowledgement number: 406    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
    Window size: 6432
    Checksum: 0x1207 (correct)
    SEQ/ACK analysis

[-- Attachment #3: no_work.cap --]
[-- Type: application/octet-stream, Size: 19008 bytes --]

No.     Time        Source                Destination           Protocol Info
      1 0.000000    192.168.255.152       192.168.255.3         TCP      3379 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1460

Frame 1 (62 bytes on wire, 62 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3379 (3379), Dst Port: http (80), Seq: 0, Ack: 0, Len: 0
    Source port: 3379 (3379)
    Destination port: http (80)
    Sequence number: 0    (relative sequence number)
    Header length: 28 bytes
    Flags: 0x0002 (SYN)
    Window size: 65535
    Checksum: 0x7ef0 (correct)
    Options: (8 bytes)

No.     Time        Source                Destination           Protocol Info
      2 0.000640    192.168.255.3         192.168.255.152       TCP      http > 3379 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460

Frame 2 (62 bytes on wire, 62 bytes captured)
Ethernet II, Src: 00:04:75:86:a8:3e, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: http (80), Dst Port: 3379 (3379), Seq: 0, Ack: 1, Len: 0
    Source port: http (80)
    Destination port: 3379 (3379)
    Sequence number: 0    (relative sequence number)
    Acknowledgement number: 1    (relative ack number)
    Header length: 28 bytes
    Flags: 0x0012 (SYN, ACK)
    Window size: 5840
    Checksum: 0x9e99 (correct)
    Options: (8 bytes)
    SEQ/ACK analysis

No.     Time        Source                Destination           Protocol Info
      3 0.000685    192.168.255.152       192.168.255.3         TCP      3379 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0

Frame 3 (54 bytes on wire, 54 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3379 (3379), Dst Port: http (80), Seq: 1, Ack: 1, Len: 0
    Source port: 3379 (3379)
    Destination port: http (80)
    Sequence number: 1    (relative sequence number)
    Acknowledgement number: 1    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
    Window size: 65535
    Checksum: 0xe22d (correct)
    SEQ/ACK analysis

No.     Time        Source                Destination           Protocol Info
      4 0.000814    192.168.255.152       192.168.255.3         HTTP     GET /test/ HTTP/1.1

Frame 4 (458 bytes on wire, 458 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3379 (3379), Dst Port: http (80), Seq: 1, Ack: 1, Len: 404
    Source port: 3379 (3379)
    Destination port: http (80)
    Sequence number: 1    (relative sequence number)
    Next sequence number: 405    (relative sequence number)
    Acknowledgement number: 1    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
    Window size: 65535
    Checksum: 0xcd59 (correct)
Hypertext Transfer Protocol

No.     Time        Source                Destination           Protocol Info
      5 0.002538    192.168.255.3         192.168.255.152       TCP      1 > 3379 [ACK] Seq=0 Ack=0 Win=6432 Len=0

Frame 5 (60 bytes on wire, 60 bytes captured)
Ethernet II, Src: 00:04:75:86:a8:3e, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: 1 (1), Dst Port: 3379 (3379), Seq: 0, Ack: 0, Len: 0
    Source port: 1 (1)
    Destination port: 3379 (3379)
    Sequence number: 0    (relative sequence number)
    Acknowledgement number: 0    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0010 (ACK)
    Window size: 6432
    Checksum: 0xc7c8 (correct)

No.     Time        Source                Destination           Protocol Info
      6 0.038891    192.168.255.3         192.168.255.152       TCP      1 > 3379 [PSH, ACK] Seq=0 Ack=0 Win=6432 Len=17

Frame 6 (71 bytes on wire, 71 bytes captured)
Ethernet II, Src: 00:04:75:86:a8:3e, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: 1 (1), Dst Port: 3379 (3379), Seq: 0, Ack: 0, Len: 17
    Source port: 1 (1)
    Destination port: 3379 (3379)
    Sequence number: 0    (relative sequence number)
    Next sequence number: 17    (relative sequence number)
    Acknowledgement number: 0    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
    Window size: 6432
    Checksum: 0x07eb (correct)
Data (17 bytes)

0000  48 54 54 50 2f 31 2e 30 20 32 30 30 20 4f 4b 0d   HTTP/1.0 200 OK.
0010  0a                                                .

No.     Time        Source                Destination           Protocol Info
      7 0.041106    192.168.255.3         192.168.255.152       TCP      1 > 3379 [FIN, PSH, ACK] Seq=17 Ack=0 Win=6432 Len=1097

Frame 7 (1151 bytes on wire, 1151 bytes captured)
Ethernet II, Src: 00:04:75:86:a8:3e, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: 1 (1), Dst Port: 3379 (3379), Seq: 17, Ack: 0, Len: 1097
    Source port: 1 (1)
    Destination port: 3379 (3379)
    Sequence number: 17    (relative sequence number)
    Next sequence number: 1114    (relative sequence number)
    Acknowledgement number: 0    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0019 (FIN, PSH, ACK)
    Window size: 6432
    Checksum: 0xc729 (correct)
Data (1097 bytes)

0000  44 61 74 65 3a 20 57 65 64 2c 20 32 33 20 4d 61   Date: Wed, 23 Ma
0010  72 20 32 30 30 35 20 32 30 3a 35 35 3a 35 39 20   r 2005 20:55:59 
0020  47 4d 54 0d 0a 53 65 72 76 65 72 3a 20 41 70 61   GMT..Server: Apa
0030  63 68 65 2f 32 2e 30 2e 34 35 20 28 55 6e 69 78   che/2.0.45 (Unix
0040  29 20 6d 6f 64 5f 70 65 72 6c 2f 31 2e 39 39 5f   ) mod_perl/1.99_
0050  30 38 20 50 65 72 6c 2f 76 35 2e 36 2e 31 0d 0a   08 Perl/v5.6.1..
0060  43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20   Content-Length: 
0070  38 37 33 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70   873..Content-Typ
0080  65 3a 20 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68   e: text/html; ch
0090  61 72 73 65 74 3d 49 53 4f 2d 38 38 35 39 2d 31   arset=ISO-8859-1
00a0  0d 0a 58 2d 43 61 63 68 65 3a 20 4d 49 53 53 20   ..X-Cache: MISS 
00b0  66 72 6f 6d 20 64 65 62 69 61 6e 2e 63 79 6d 70   from debian.cymp
00c0  68 6f 6e 69 78 2e 63 6f 6d 0d 0a 43 6f 6e 6e 65   honix.com..Conne
00d0  63 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 0d 0a   ction: close....
00e0  3c 21 44 4f 43 54 59 50 45 20 48 54 4d 4c 20 50   <!DOCTYPE HTML P
00f0  55 42 4c 49 43 20 22 2d 2f 2f 57 33 43 2f 2f 44   UBLIC "-//W3C//D
0100  54 44 20 48 54 4d 4c 20 33 2e 32 20 46 69 6e 61   TD HTML 3.2 Fina
0110  6c 2f 2f 45 4e 22 3e 0a 3c 68 74 6d 6c 3e 0a 20   l//EN">.<html>. 
0120  3c 68 65 61 64 3e 0a 20 20 3c 74 69 74 6c 65 3e   <head>.  <title>
0130  49 6e 64 65 78 20 6f 66 20 2f 74 65 73 74 3c 2f   Index of /test</
0140  74 69 74 6c 65 3e 0a 20 3c 2f 68 65 61 64 3e 0a   title>. </head>.
0150  20 3c 62 6f 64 79 3e 0a 3c 68 31 3e 49 6e 64 65    <body>.<h1>Inde
0160  78 20 6f 66 20 2f 74 65 73 74 3c 2f 68 31 3e 0a   x of /test</h1>.
0170  3c 70 72 65 3e 3c 69 6d 67 20 73 72 63 3d 22 2f   <pre><img src="/
0180  69 63 6f 6e 73 2f 62 6c 61 6e 6b 2e 67 69 66 22   icons/blank.gif"
0190  20 61 6c 74 3d 22 49 63 6f 6e 20 22 20 2f 3e 20    alt="Icon " /> 
01a0  3c 61 20 68 72 65 66 3d 22 3f 43 3d 4e 26 61 6d   <a href="?C=N&am
01b0  70 3b 4f 3d 44 22 3e 4e 61 6d 65 3c 2f 61 3e 20   p;O=D">Name</a> 
01c0  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                   
01d0  20 20 20 3c 61 20 68 72 65 66 3d 22 3f 43 3d 4d      <a href="?C=M
01e0  26 61 6d 70 3b 4f 3d 41 22 3e 4c 61 73 74 20 6d   &amp;O=A">Last m
01f0  6f 64 69 66 69 65 64 3c 2f 61 3e 20 20 20 20 20   odified</a>     
0200  20 3c 61 20 68 72 65 66 3d 22 3f 43 3d 53 26 61    <a href="?C=S&a
0210  6d 70 3b 4f 3d 41 22 3e 53 69 7a 65 3c 2f 61 3e   mp;O=A">Size</a>
0220  20 20 3c 61 20 68 72 65 66 3d 22 3f 43 3d 44 26     <a href="?C=D&
0230  61 6d 70 3b 4f 3d 41 22 3e 44 65 73 63 72 69 70   amp;O=A">Descrip
0240  74 69 6f 6e 3c 2f 61 3e 3c 68 72 20 2f 3e 3c 69   tion</a><hr /><i
0250  6d 67 20 73 72 63 3d 22 2f 69 63 6f 6e 73 2f 62   mg src="/icons/b
0260  61 63 6b 2e 67 69 66 22 20 61 6c 74 3d 22 5b 44   ack.gif" alt="[D
0270  49 52 5d 22 20 2f 3e 20 3c 61 20 68 72 65 66 3d   IR]" /> <a href=
0280  22 2f 22 3e 50 61 72 65 6e 74 20 44 69 72 65 63   "/">Parent Direc
0290  74 6f 72 79 3c 2f 61 3e 20 20 20 20 20 20 20 20   tory</a>        
02a0  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                   
02b0  20 20 20 20 20 2d 20 20 20 0a 3c 69 6d 67 20 73        -   .<img s
02c0  72 63 3d 22 2f 69 63 6f 6e 73 2f 63 6f 6d 70 72   rc="/icons/compr
02d0  65 73 73 65 64 2e 67 69 66 22 20 61 6c 74 3d 22   essed.gif" alt="
02e0  5b 20 20 20 5d 22 20 2f 3e 20 3c 61 20 68 72 65   [   ]" /> <a hre
02f0  66 3d 22 4c 69 66 65 2e 6f 66 2e 42 72 69 61 6e   f="Life.of.Brian
0300  2e 44 56 44 52 69 70 2e 58 76 69 44 2d 49 63 65   .DVDRip.XviD-Ice
0310  2e 7a 69 70 22 3e 4c 69 66 65 2e 6f 66 2e 42 72   .zip">Life.of.Br
0320  69 61 6e 2e 44 56 44 52 69 70 2e 2e 26 67 74 3b   ian.DVDRip..&gt;
0330  3c 2f 61 3e 20 31 31 2d 4e 6f 76 2d 32 30 30 34   </a> 11-Nov-2004
0340  20 30 39 3a 35 34 20 20 37 30 30 4d 20 20 0a 3c    09:54  700M  .<
0350  69 6d 67 20 73 72 63 3d 22 2f 69 63 6f 6e 73 2f   img src="/icons/
0360  75 6e 6b 6e 6f 77 6e 2e 67 69 66 22 20 61 6c 74   unknown.gif" alt
0370  3d 22 5b 20 20 20 5d 22 20 2f 3e 20 3c 61 20 68   ="[   ]" /> <a h
0380  72 65 66 3d 22 54 65 6e 4d 65 67 2e 46 69 6c 65   ref="TenMeg.File
0390  22 3e 54 65 6e 4d 65 67 2e 46 69 6c 65 3c 2f 61   ">TenMeg.File</a
03a0  3e 20 20 20 20 20 20 20 20 20 20 20 20 20 32 33   >             23
03b0  2d 44 65 63 2d 32 30 30 33 20 30 32 3a 32 36 20   -Dec-2003 02:26 
03c0  20 20 31 30 4d 20 20 0a 3c 68 72 20 2f 3e 3c 2f     10M  .<hr /></
03d0  70 72 65 3e 0a 3c 61 64 64 72 65 73 73 3e 41 70   pre>.<address>Ap
03e0  61 63 68 65 2f 32 2e 30 2e 34 35 20 28 55 6e 69   ache/2.0.45 (Uni
03f0  78 29 20 6d 6f 64 5f 70 65 72 6c 2f 31 2e 39 39   x) mod_perl/1.99
0400  5f 30 38 20 50 65 72 6c 2f 76 35 2e 36 2e 31 20   _08 Perl/v5.6.1 
0410  53 65 72 76 65 72 20 61 74 20 31 39 32 2e 31 36   Server at 192.16
0420  38 2e 32 35 35 2e 33 20 50 6f 72 74 20 38 30 3c   8.255.3 Port 80<
0430  2f 61 64 64 72 65 73 73 3e 0a 3c 2f 62 6f 64 79   /address>.</body
0440  3e 3c 2f 68 74 6d 6c 3e 0a                        ></html>.

No.     Time        Source                Destination           Protocol Info
      8 2.921155    192.168.255.152       192.168.255.3         HTTP     GET /test/ HTTP/1.1

Frame 8 (458 bytes on wire, 458 bytes captured)
Ethernet II, Src: 00:0c:76:3d:08:67, Dst: 00:04:23:09:90:2c
Internet Protocol, Src Addr: 192.168.255.152 (192.168.255.152), Dst Addr: 192.168.255.3 (192.168.255.3)
Transmission Control Protocol, Src Port: 3379 (3379), Dst Port: http (80), Seq: 1, Ack: 1, Len: 404
    Source port: 3379 (3379)
    Destination port: http (80)
    Sequence number: 1    (relative sequence number)
    Next sequence number: 405    (relative sequence number)
    Acknowledgement number: 1    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0018 (PSH, ACK)
    Window size: 65535
    Checksum: 0xcd59 (correct)
    SEQ/ACK analysis
Hypertext Transfer Protocol

No.     Time        Source                Destination           Protocol Info
      9 2.925412    192.168.255.3         192.168.255.152       TCP      [TCP Dup ACK 5#1] 1 > 3379 [ACK] Seq=1115 Ack=0 Win=6432 Len=0 SLE=4294966892 SRE=0

Frame 9 (66 bytes on wire, 66 bytes captured)
Ethernet II, Src: 00:04:75:86:a8:3e, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: 1 (1), Dst Port: 3379 (3379), Seq: 1115, Ack: 0, Len: 0
    Source port: 1 (1)
    Destination port: 3379 (3379)
    Sequence number: 1115    (relative sequence number)
    Acknowledgement number: 0    (relative ack number)
    Header length: 32 bytes
    Flags: 0x0010 (ACK)
    Window size: 6432
    Checksum: 0x9e43 (correct)
    Options: (12 bytes)
    SEQ/ACK analysis

No.     Time        Source                Destination           Protocol Info
     10 3.039180    192.168.255.3         192.168.255.152       TCP      [TCP Retransmission] 1 > 3379 [FIN, PSH, ACK] Seq=0 Ack=0 Win=6432 Len=1114

Frame 10 (1168 bytes on wire, 1168 bytes captured)
Ethernet II, Src: 00:04:75:86:a8:3e, Dst: 00:0c:76:3d:08:67
Internet Protocol, Src Addr: 192.168.255.3 (192.168.255.3), Dst Addr: 192.168.255.152 (192.168.255.152)
Transmission Control Protocol, Src Port: 1 (1), Dst Port: 3379 (3379), Seq: 0, Ack: 0, Len: 1114
    Source port: 1 (1)
    Destination port: 3379 (3379)
    Sequence number: 0    (relative sequence number)
    Next sequence number: 1114    (relative sequence number)
    Acknowledgement number: 0    (relative ack number)
    Header length: 20 bytes
    Flags: 0x0019 (FIN, PSH, ACK)
    Window size: 6432
    Checksum: 0xc7a4 (correct)
    SEQ/ACK analysis
Data (1114 bytes)

0000  48 54 54 50 2f 31 2e 30 20 32 30 30 20 4f 4b 0d   HTTP/1.0 200 OK.
0010  0a 44 61 74 65 3a 20 57 65 64 2c 20 32 33 20 4d   .Date: Wed, 23 M
0020  61 72 20 32 30 30 35 20 32 30 3a 35 35 3a 35 39   ar 2005 20:55:59
0030  20 47 4d 54 0d 0a 53 65 72 76 65 72 3a 20 41 70    GMT..Server: Ap
0040  61 63 68 65 2f 32 2e 30 2e 34 35 20 28 55 6e 69   ache/2.0.45 (Uni
0050  78 29 20 6d 6f 64 5f 70 65 72 6c 2f 31 2e 39 39   x) mod_perl/1.99
0060  5f 30 38 20 50 65 72 6c 2f 76 35 2e 36 2e 31 0d   _08 Perl/v5.6.1.
0070  0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a   .Content-Length:
0080  20 38 37 33 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79    873..Content-Ty
0090  70 65 3a 20 74 65 78 74 2f 68 74 6d 6c 3b 20 63   pe: text/html; c
00a0  68 61 72 73 65 74 3d 49 53 4f 2d 38 38 35 39 2d   harset=ISO-8859-
00b0  31 0d 0a 58 2d 43 61 63 68 65 3a 20 4d 49 53 53   1..X-Cache: MISS
00c0  20 66 72 6f 6d 20 64 65 62 69 61 6e 2e 63 79 6d    from debian.cym
00d0  70 68 6f 6e 69 78 2e 63 6f 6d 0d 0a 43 6f 6e 6e   phonix.com..Conn
00e0  65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 0d   ection: close...
00f0  0a 3c 21 44 4f 43 54 59 50 45 20 48 54 4d 4c 20   .<!DOCTYPE HTML 
0100  50 55 42 4c 49 43 20 22 2d 2f 2f 57 33 43 2f 2f   PUBLIC "-//W3C//
0110  44 54 44 20 48 54 4d 4c 20 33 2e 32 20 46 69 6e   DTD HTML 3.2 Fin
0120  61 6c 2f 2f 45 4e 22 3e 0a 3c 68 74 6d 6c 3e 0a   al//EN">.<html>.
0130  20 3c 68 65 61 64 3e 0a 20 20 3c 74 69 74 6c 65    <head>.  <title
0140  3e 49 6e 64 65 78 20 6f 66 20 2f 74 65 73 74 3c   >Index of /test<
0150  2f 74 69 74 6c 65 3e 0a 20 3c 2f 68 65 61 64 3e   /title>. </head>
0160  0a 20 3c 62 6f 64 79 3e 0a 3c 68 31 3e 49 6e 64   . <body>.<h1>Ind
0170  65 78 20 6f 66 20 2f 74 65 73 74 3c 2f 68 31 3e   ex of /test</h1>
0180  0a 3c 70 72 65 3e 3c 69 6d 67 20 73 72 63 3d 22   .<pre><img src="
0190  2f 69 63 6f 6e 73 2f 62 6c 61 6e 6b 2e 67 69 66   /icons/blank.gif
01a0  22 20 61 6c 74 3d 22 49 63 6f 6e 20 22 20 2f 3e   " alt="Icon " />
01b0  20 3c 61 20 68 72 65 66 3d 22 3f 43 3d 4e 26 61    <a href="?C=N&a
01c0  6d 70 3b 4f 3d 44 22 3e 4e 61 6d 65 3c 2f 61 3e   mp;O=D">Name</a>
01d0  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                   
01e0  20 20 20 20 3c 61 20 68 72 65 66 3d 22 3f 43 3d       <a href="?C=
01f0  4d 26 61 6d 70 3b 4f 3d 41 22 3e 4c 61 73 74 20   M&amp;O=A">Last 
0200  6d 6f 64 69 66 69 65 64 3c 2f 61 3e 20 20 20 20   modified</a>    
0210  20 20 3c 61 20 68 72 65 66 3d 22 3f 43 3d 53 26     <a href="?C=S&
0220  61 6d 70 3b 4f 3d 41 22 3e 53 69 7a 65 3c 2f 61   amp;O=A">Size</a
0230  3e 20 20 3c 61 20 68 72 65 66 3d 22 3f 43 3d 44   >  <a href="?C=D
0240  26 61 6d 70 3b 4f 3d 41 22 3e 44 65 73 63 72 69   &amp;O=A">Descri
0250  70 74 69 6f 6e 3c 2f 61 3e 3c 68 72 20 2f 3e 3c   ption</a><hr /><
0260  69 6d 67 20 73 72 63 3d 22 2f 69 63 6f 6e 73 2f   img src="/icons/
0270  62 61 63 6b 2e 67 69 66 22 20 61 6c 74 3d 22 5b   back.gif" alt="[
0280  44 49 52 5d 22 20 2f 3e 20 3c 61 20 68 72 65 66   DIR]" /> <a href
0290  3d 22 2f 22 3e 50 61 72 65 6e 74 20 44 69 72 65   ="/">Parent Dire
02a0  63 74 6f 72 79 3c 2f 61 3e 20 20 20 20 20 20 20   ctory</a>       
02b0  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                   
02c0  20 20 20 20 20 20 2d 20 20 20 0a 3c 69 6d 67 20         -   .<img 
02d0  73 72 63 3d 22 2f 69 63 6f 6e 73 2f 63 6f 6d 70   src="/icons/comp
02e0  72 65 73 73 65 64 2e 67 69 66 22 20 61 6c 74 3d   ressed.gif" alt=
02f0  22 5b 20 20 20 5d 22 20 2f 3e 20 3c 61 20 68 72   "[   ]" /> <a hr
0300  65 66 3d 22 4c 69 66 65 2e 6f 66 2e 42 72 69 61   ef="Life.of.Bria
0310  6e 2e 44 56 44 52 69 70 2e 58 76 69 44 2d 49 63   n.DVDRip.XviD-Ic
0320  65 2e 7a 69 70 22 3e 4c 69 66 65 2e 6f 66 2e 42   e.zip">Life.of.B
0330  72 69 61 6e 2e 44 56 44 52 69 70 2e 2e 26 67 74   rian.DVDRip..&gt
0340  3b 3c 2f 61 3e 20 31 31 2d 4e 6f 76 2d 32 30 30   ;</a> 11-Nov-200
0350  34 20 30 39 3a 35 34 20 20 37 30 30 4d 20 20 0a   4 09:54  700M  .
0360  3c 69 6d 67 20 73 72 63 3d 22 2f 69 63 6f 6e 73   <img src="/icons
0370  2f 75 6e 6b 6e 6f 77 6e 2e 67 69 66 22 20 61 6c   /unknown.gif" al
0380  74 3d 22 5b 20 20 20 5d 22 20 2f 3e 20 3c 61 20   t="[   ]" /> <a 
0390  68 72 65 66 3d 22 54 65 6e 4d 65 67 2e 46 69 6c   href="TenMeg.Fil
03a0  65 22 3e 54 65 6e 4d 65 67 2e 46 69 6c 65 3c 2f   e">TenMeg.File</
03b0  61 3e 20 20 20 20 20 20 20 20 20 20 20 20 20 32   a>             2
03c0  33 2d 44 65 63 2d 32 30 30 33 20 30 32 3a 32 36   3-Dec-2003 02:26
03d0  20 20 20 31 30 4d 20 20 0a 3c 68 72 20 2f 3e 3c      10M  .<hr /><
03e0  2f 70 72 65 3e 0a 3c 61 64 64 72 65 73 73 3e 41   /pre>.<address>A
03f0  70 61 63 68 65 2f 32 2e 30 2e 34 35 20 28 55 6e   pache/2.0.45 (Un
0400  69 78 29 20 6d 6f 64 5f 70 65 72 6c 2f 31 2e 39   ix) mod_perl/1.9
0410  39 5f 30 38 20 50 65 72 6c 2f 76 35 2e 36 2e 31   9_08 Perl/v5.6.1
0420  20 53 65 72 76 65 72 20 61 74 20 31 39 32 2e 31    Server at 192.1
0430  36 38 2e 32 35 35 2e 33 20 50 6f 72 74 20 38 30   68.255.3 Port 80
0440  3c 2f 61 64 64 72 65 73 73 3e 0a 3c 2f 62 6f 64   </address>.</bod
0450  79 3e 3c 2f 68 74 6d 6c 3e 0a                     y></html>.

^ permalink raw reply	[flat|nested] 13+ messages in thread
* RE: HELP! Transparent Proxy using bridging 2.6.9 and REDIRECT on different subnet
@ 2005-03-23 19:18 Trevor Paskett
  0 siblings, 0 replies; 13+ messages in thread
From: Trevor Paskett @ 2005-03-23 19:18 UTC (permalink / raw)
  To: Nguyen Dinh Nam; +Cc: netfilter-devel, netfilter

Yes it is on. It works great when the test machine is on the same subnet
as the Linux box. When it is on a different subnet, then the clients
gets packets back like it should but the port number on the packet is 1
instead of 80 like it is when they are on the same subnet.

Then if I bring up an alias br0:0 with an IP on that subnet everything
works great again. Thanks!!

Trevor Paskett
Cymphonix Programmer - CCNA, CWNA
P: 801-938-1500 F: 801-938-1501
 

-----Original Message-----
From: Nguyen Dinh Nam [mailto:64vn@cardvn.net] 
Sent: Wednesday, March 23, 2005 11:01 AM
To: Trevor Paskett
Subject: Re: HELP! Transparent Proxy using bridging 2.6.9 and REDIRECT
on different subnet

on  the Linux machine (the one with squid), is 
/proc/sys/net/ipv4/ip_forward turned on?

Trevor Paskett wrote:

>So no takers on this? Nobody has the same issue, or can re-create it?
We
>are desperate for a solution to this, and are willing to pay for a fix
>if necessary. Please help!!
>
>Trevor Paskett
>Cymphonix Programmer - CCNA, CWNA
>P: 801-938-1500 F: 801-938-1501
>  
>


^ permalink raw reply	[flat|nested] 13+ messages in thread
* HELP! Transparent Proxy using bridging 2.6.9 and REDIRECT on different subnet
@ 2005-03-23 17:08 ` Trevor Paskett
  0 siblings, 0 replies; 13+ messages in thread
From: Trevor Paskett @ 2005-03-23 17:08 UTC (permalink / raw)
  To: Trevor Paskett, netfilter; +Cc: netfilter-devel

So no takers on this? Nobody has the same issue, or can re-create it? We
are desperate for a solution to this, and are willing to pay for a fix
if necessary. Please help!!

Trevor Paskett
Cymphonix Programmer - CCNA, CWNA
P: 801-938-1500 F: 801-938-1501
 

-----Original Message-----
From: Trevor Paskett 
Sent: Friday, March 18, 2005 3:42 PM
To: netfilter@lists.netfilter.org
Cc: netfilter-devel@lists.netfilter.org
Subject: RE: Transparent Proxy using bridging 2.6.9 and REDIRECT
ondifferent subnet

I have more information o this problem. I have also cc'd the development
list as I think this could be a bug, but it is probably something I'm
doing wrong :)

With the test machine on another subnet that the REDIRECT linux box,
everything works up until the return packet to the client with the HTTP
body. Running ethereal shows that the test workstation gets a packet,
but the src port is 1 and not 80 as it should be.

Adding some prink's into ipt_REDIRECT shows that when it goes through
that module the port numbers are correct. I turned on debugging in
ipt_nat_core.c and get this output:

Mar 18 16:29:52 debian kernel: Found best for tuple c02f1c98: 6
192.168.255.152:4012 -> 192.168.12.165:80
Mar 18 16:29:52 debian kernel: Mangling f45a96a0: DST to 192.168.12.165
8888
Mar 18 16:29:52 debian kernel: Mangling f45c0660: SRC to 192.168.255.3
80
Mar 18 16:29:52 debian kernel: Mangling f45b4680: DST to 192.168.12.165
8888
Mar 18 16:29:52 debian kernel: Found best for tuple ed1dbbb4: 6
127.0.0.1:33186 -> 127.0.0.1:3128
Mar 18 16:29:52 debian kernel: Mangling f45c0de0: DST to 192.168.12.165
8888
Mar 18 16:29:52 debian kernel: Mangling f45b4680: SRC to 192.168.255.3
80
Mar 18 16:29:52 debian kernel: Found best for tuple ed1dbcf0: 6
192.168.255.3:80 -> 192.168.255.152:4012
Mar 18 16:29:52 debian kernel: Trying implicit mapping
Mar 18 16:29:52 debian kernel: Mangling f45c08a0: SRC to 192.168.255.3 1
Mar 18 16:29:52 debian kernel: Found best for tuple ed1db9a4: 6
192.168.255.3:1 -> 192.168.255.152:4012
Mar 18 16:29:52 debian kernel: Found best for tuple f426f898: 6
192.168.12.165:33187 -> 192.168.255.3:80
Mar 18 16:29:52 debian kernel: Mangling f45c08a0: SRC to 192.168.255.3
80
Mar 18 16:29:52 debian kernel: Mangling f45c0060: SRC to 192.168.255.3
80
Mar 18 16:29:52 debian kernel: Mangling f4132cc0: SRC to 192.168.255.3 1
Mar 18 16:29:52 debian kernel: Mangling f45b4c80: SRC to 192.168.255.3 1
Mar 18 16:29:55 debian kernel: Mangling f4782aa0: DST to 192.168.12.165
8888
Mar 18 16:29:55 debian kernel: Mangling f4782aa0: SRC to 192.168.255.3
80
Mar 18 16:29:55 debian kernel: Mangling f4512dc0: SRC to 192.168.255.3 1
Mar 18 16:29:55 debian kernel: Mangling f45c08a0: SRC to 192.168.255.3
80
Mar 18 16:29:55 debian kernel: Mangling f4782da0: SRC to 192.168.255.3 1
Mar 18 16:29:58 debian kernel: Found best for tuple e4611bb4: 6
127.0.0.1:33188 -> 127.0.0.1:2003
Mar 18 16:30:01 debian kernel: Mangling f45a99a0: DST to 192.168.12.165
8888
Mar 18 16:30:01 debian kernel: Mangling f45a99a0: SRC to 192.168.255.3
80
Mar 18 16:30:01 debian kernel: Mangling f45a95e0: SRC to 192.168.255.3 1
Mar 18 16:30:01 debian kernel: Mangling f45a95e0: SRC to 192.168.255.3
80
Mar 18 16:30:01 debian kernel: Mangling f4512940: SRC to 192.168.255.3 1
Mar 18 16:30:04 debian kernel: Found best for tuple e4b9fbb4: 6
127.0.0.1:33189 -> 127.0.0.1:2003

It looks like right after 'Trying implicit mapping' the SRC port gets
changed to 1, when it should be 80. I've poked around ip_nat_core.c but
have never looked in there before and can't find the problem. Am I
looking to deep? Is it something more simple that this? I tried this
with 2.6.11.4 and had the same result. Thanks!!

Trevor Paskett
Cymphonix Programmer - CCNA, CWNA
P: 801-938-1500 F: 801-938-1501
 

-----Original Message-----
From: Trevor Paskett 
Sent: Friday, March 18, 2005 10:41 AM
To: netfilter@lists.netfilter.org
Subject: Transparent Proxy using bridging 2.6.9 and REDIRECT on
differentsubnet

I have the following setup

Test Machine ---> Linux 2.6.9 ---> Internet Router (Doing NAT)
192.168.255.152   192.168.255.165   192.168.255.1/24
				            192.168.12.1/24

I have blacked out all my iptables and ebtables all default ACCEPT
policy.

The Linux 2.6.9 is bridging. I use the following rule to redirect port
80 traffic to Squid on the Linux 2.6.9 box:

iptables -t nat -A PREROUTING -i br0 -p tcp --dport 80 -j REDIRECT
--to-port 3128

This works just like it should. No problem. The problems comes in this
setup:

Test Machine ---> Linux 2.6.9 ---> Internet Router (Doing NAT)
192.168.255.152   192.168.12.165    192.168.255.1
				            192.168.12.1

When the Linux box is on a different subnet that the test machine the
request will get to Squid, the rules get a packet count I see squid get
the request. Then squid try to send the request back to the client and
it hangs up. The browser just spins. The test machine and the Linux
2.6.9 can both ping each other so I know connectivity is ok.

Now if I bring up an alias br0:0 192.168.255.165 in the above setup,
then everything works again. So does the br0 have to have an ip on the
same subnet for REDIRECT to work? I have also tried adding ebtables
rules like:

ebtables -t broute -A BROUTING -p IPv4 --ip-protocol 6 \
        --ip-destination-port 80 -j redirect --redirect-target ACCEPT

Makes no difference. I have also tried some more complex variations
like:

iptables -t nat -A PREROUTING -p tcp -m physdev --physdev-in eth1
--dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -p tcp -i br0 --dport -j DNAT --to
i92.168.12.165:3128

All see to work the same. Broken :) I have messed around with settings
on /proc/sys/net to no avail.

I'm using iptables v1.2.9 and Linux 2.6.9. Debian Woody. Thanks!!

Trevor Paskett
Cymphonix Programmer - CCNA, CWNA
P: 801-938-1500 F: 801-938-1501
 





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-03-25 21:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <2F413D5F33545D4A8465BBEE900238CC3FA777@cymmail.cymphonix.com>
2005-03-23 23:50 ` HELP! Transparent Proxy using bridging 2.6.9 and REDIRECT on different subnet Grant Taylor
2005-03-24  0:35 ` Grant Taylor
2005-03-24  6:25 ` Grant Taylor
2005-03-24  8:50 ` Grant Taylor
2005-03-24 21:09 ` Grant Taylor
2005-03-25 21:30 Trevor Paskett
  -- strict thread matches above, loose matches on Subject: below --
2005-03-24 19:04 Trevor Paskett
2005-03-24 19:04 ` Trevor Paskett
2005-03-23 19:18 Trevor Paskett
2005-03-23 17:08 Trevor Paskett
2005-03-23 17:08 ` Trevor Paskett
2005-03-23 19:24 ` Grant Taylor
2005-03-23 19:42   ` Jason Opperisano

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.