Article View: bit.listserv.openbsd-pf
Article #161Re: forwarding loop
From: Leslie Jensen
Date: Wed, 16 Jan 2013 20:35
Date: Wed, 16 Jan 2013 20:35
137 lines
6251 bytes
6251 bytes
2013-01-16 10:56, Daniel Hartmeier skrev:
> On Wed, Jan 16, 2013 at 10:19:45AM +0100, Leslie Jensen wrote:
>
>> The squid access.log says tcp_miss which should mean that the
>> website has not replied.
>>
>> The browser shows the squid access denied screen.
>>
>> I cannot see any denied packets with tcpdump.
>>
>> Commenting out the rdr rule gives direct access but I would like to
>> get the use of squid back again.
>>
>> I would appreciate further suggestions because at the moment I'm stuck!
>
> Standard debugging procedure, then:
>
> On the firewall, run the following
>
> fw# tcpdump -nvpi bge0 host 172.18.0.1
> fw# tcpdump -nvpi xl0 tcp port 80
> fw# tcpdump -nvvveeepi pflog0
>
> Then initiate a single connection attempt from the proxy, like with
>
> proxy# nc -v www.openbsd.org 80
>
> and watch the output of the tcpdumps.
>
> What do you expect to see?
>
> 1) TCP SYN from 172.18.0.1 to 129.128.5.194:80 on bge0
> 2) TCP SYN from $ext_if to 129.128.5.194:80 on xl0
> 3) TCP SYN+ACK from 129.128.5.194:80 to $ext_if on xl0
> 4) TCP SYN+ACK from 129.128.5.194:80 to 172.18.0.1 on bge0
> 5) nothing on pflog0 (except 'pass' messages)
>
> What do you see instead?
>
> If you see block messages on pflog0, re-post your current ruleset.
>
> Daniel
>
Hello again.
I've now isolated the other machines from the network.
Please see results of the tests below.
with tcpdump -nvpi bge0 host 172.18.0.1 and nc -v www.openbsd.org 80 I get
Connection to www.openbsd.org 80 port [tcp/http] succeeded
Nothing shows with tcpdump
With tcpdump -nvpi xl0 tcp port 80
tcpdump: listening on xl0, link-type EN10MB (Ethernet), capture size 96
bytes
19:28:09.968833 IP (tos 0x0, ttl 64, id 31116, offset 0, flags [DF],
proto TCP (6), length 60)
194.237.176.105.43068 > 129.128.5.194.80: Flags [S], cksum 0xac3b
(correct), seq 3947358905, win 65535, options [mss 1460,nop,wscale
3,sackOK,TS val 45752295 ecr 0], length 0
19:28:10.118644 IP (tos 0x0, ttl 49, id 16050, offset 0, flags [DF],
proto TCP (6), length 64)
129.128.5.194.80 > 194.237.176.105.43068: Flags [S.], cksum 0x48b0
(correct), seq 3954007035, ack 3947358906, win 16384, options [mss
1460,nop,nop,sackOK,nop,wscale 3,nop,nop,TS val 2145602023 ecr
45752295], length 0
19:28:10.118688 IP (tos 0x0, ttl 64, id 31117, offset 0, flags [DF],
proto TCP (6), length 52)
194.237.176.105.43068 > 129.128.5.194.80: Flags [.], cksum 0xa862
(correct), ack 1, win 8326, options [nop,nop,TS val 45752445 ecr
2145602023], length 0
19:28:42.537896 IP (tos 0x0, ttl 49, id 24173, offset 0, flags [DF],
proto TCP (6), length 52)
129.128.5.194.80 > 194.237.176.105.43068: Flags [F.], cksum 0xc02a
(correct), seq 1, ack 1, win 2172, options [nop,nop,TS val 2145602088
ecr 45752445], length 0
19:28:42.537963 IP (tos 0x0, ttl 64, id 31125, offset 0, flags [DF],
proto TCP (6), length 52)
194.237.176.105.43068 > 129.128.5.194.80: Flags [.], cksum 0x297d
(correct), ack 2, win 8326, options [nop,nop,TS val 45784864 ecr
2145602088], length 0
19:28:42.537999 IP (tos 0x0, ttl 64, id 31126, offset 0, flags [DF],
proto TCP (6), length 52)
194.237.176.105.43068 > 129.128.5.194.80: Flags [F.], cksum 0x297c
(correct), seq 1, ack 2, win 8326, options [nop,nop,TS val 45784864 ecr
2145602088], length 0
19:28:42.689844 IP (tos 0x0, ttl 49, id 32623, offset 0, flags [DF],
proto TCP (6), length 52)
129.128.5.194.80 > 194.237.176.105.43068: Flags [.], cksum 0x4185
(correct), ack 2, win 2172, options [nop,nop,TS val 2145602089 ecr
45784864], length 0
And
Connection to www.openbsd.org 80 port [tcp/http] succeeded
With tcpdump -nvvveeepi pflog0
tcpdump: WARNING: pflog0: no IPv4 address assigned
tcpdump: listening on pflog0, link-type PFLOG (OpenBSD pflog file),
capture size 96 bytes
19:31:46.009901 rule 6/0(match): pass out on xl0: (tos 0x0, ttl 64, id
31360, offset 0, flags [none], proto UDP (17), length 72)
194.237.176.105.50724 > 195.67.199.39.53: [|domain]
19:31:46.018267 rule 6/0(match): pass out on xl0: (tos 0x0, ttl 64, id
31362, offset 0, flags [DF], proto TCP (6), length 60)
194.237.176.105.13765 > 129.128.5.194.80: [|tcp]
19:32:12.285752 rule 18/0(match): pass in on bge0: (tos 0x0, ttl 64, id
705, offset 0, flags [none], proto UDP (17), length 76)
And
Connection to www.openbsd.org 80 port [tcp/http] succeeded
I see that rules #6 and #18 matches, but where can I see if the packet
has been redirected to port 8080 and that it has been intercepted by squid?
Thanks
/Leslie
Technical Details
Message-ID:
<50F6F54E.4020204@eskk.nu>Path:
arc1-ca.pugleaf.net!i11ni8439wiw.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!news.glorb.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!newsgate.newsguy.com!newsp.newsguy.com!mdrnReferences:
<50F10ACD.9090605@eskk.nu> <20130114095023.GC8895@insomnia.benzedrine.cx> <50F42B02.70405@eskk.nu> <20130115101033.GA2410@insomnia.benzedrine.cx> <50F53466.1010803@eskk.nu> <20130115110146.GB2410@insomnia.benzedrine.cx> <50F53951.4080505@eskk.nu> <20130115114947.GC2410@insomnia.benzedrine.cx> <50F670B1.80005@eskk.nu> <20130116095656.GA11866@insomnia.benzedrine.cx>Show Full Headers
Complete Article Headers
X-Google-Thread: bffa70e3,65dda175aebfa248
X-Google-Attributes: gidbffa70e3,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
X-Received: by 10.180.91.114 with SMTP id cd18mr1714582wib.2.1358655665004;
Sat, 19 Jan 2013 20:21:05 -0800 (PST)
Path: arc1-ca.pugleaf.net!i11ni8439wiw.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!news.glorb.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!newsgate.newsguy.com!newsp.newsguy.com!mdrn
From: leslie@eskk.nu (Leslie Jensen)
Newsgroups: bit.listserv.openbsd-pf
Subject: Re: forwarding loop
Date: 16 Jan 2013 12:35:31 -0800
Organization: None
Lines: 138
Message-ID: <50F6F54E.4020204@eskk.nu>
References: <50F10ACD.9090605@eskk.nu> <20130114095023.GC8895@insomnia.benzedrine.cx> <50F42B02.70405@eskk.nu> <20130115101033.GA2410@insomnia.benzedrine.cx> <50F53466.1010803@eskk.nu> <20130115110146.GB2410@insomnia.benzedrine.cx> <50F53951.4080505@eskk.nu> <20130115114947.GC2410@insomnia.benzedrine.cx> <50F670B1.80005@eskk.nu> <20130116095656.GA11866@insomnia.benzedrine.cx>
NNTP-Posting-Host: bljbsd01.no-ip.org
Mime-Version: 1.0
NNTP-Posting-Date: 16 Jan 2013 20:35:31 GMT
X-Received-Bytes: 5594
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit