I have an OpenVPN between my box A, and the remote server B (both Debian jessie).
On server B, I also run Squid3.
I then configure my A-browser to use the remote proxy with the VPN address of the B-server (10.2.0.1:3128), only for port 80 (no SSL).
It works OK, I can browse the Internet. I can see with whatismyip.com that the request is originating from the public B-server address.
I also have a firewall on the B-server, with the following rules :
-A INPUT-m state --state INVALID -j NFLOG --nflog-prefix "fp=bad_packets:1"
-A INPUT-m state --state INVALID -j DROP
I then sometimes notice some packets are discarded :
Jun 12 09:16:20 ks1 fp=bad_packets:1 IN=tun0 OUT= MAC= SRC=10.2.0.9 DST=10.2.0.1 LEN=40 TOS=00 PREC=0x00 TTL=64 ID=58858 DF PROTO=TCP SPT=34458 DPT=3128 SEQ=3975722279 ACK=0 WINDOW=0 RST URGP=0 MARK=0
This does not prevent the browsing, but I guess there must have some errors somewhere, I just don't know how to find them.
This happens with Firefox, but also with Opera.
It's not much a "problem", it's mostly annoying, and I would like to know what is polluting my firewall logs ;)
EDIT
OK, I've run a tcpdump, refreshed a website that triggered the DROP : I see exactly what you mean, but don't have any explanation yet : DROPs happened on port 45310, so I did a grep on this port : I can see the RESET arriving, almost all on the same "seq" (sequence ?) : 3360258722 : The 1st one seems legit, then there are 6 after...Don't understand why : what's the next investigation step ?
09:58:02.133295 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [P.], seq 104724:105019, ack 12580, win 656, options [nop,nop,TS val 128061282 ecr 1013310], length 295
09:58:02.134079 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 105019:106375, ack 12580, win 656, options [nop,nop,TS val 128061282 ecr 1013310], length 1356
09:58:02.134091 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 106375:107731, ack 12580, win 656, options [nop,nop,TS val 128061282 ecr 1013310], length 1356
09:58:02.134127 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 107731:109087, ack 12580, win 656, options [nop,nop,TS val 128061282 ecr 1013310], length 1356
09:58:02.134133 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [P.], seq 109087:109115, ack 12580, win 656, options [nop,nop,TS val 128061282 ecr 1013310], length 28
09:58:02.134764 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 109115:110471, ack 12580, win 656, options [nop,nop,TS val 128061282 ecr 1013310], length 1356
09:58:02.134779 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 110471:111827, ack 12580, win 656, options [nop,nop,TS val 128061282 ecr 1013310], length 1356
09:58:02.134809 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [P.], seq 111827:112081, ack 12580, win 656, options [nop,nop,TS val 128061282 ecr 1013310], length 254
09:58:02.258393 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [.], ack 106375, win 1444, options [nop,nop,TS val 1013362 ecr 128061282], length 0
09:58:02.264169 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [.], ack 109087, win 1444, options [nop,nop,TS val 1013363 ecr 128061282], length 0
09:58:02.268597 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [.], ack 110471, win 1444, options [nop,nop,TS val 1013364 ecr 128061282], length 0
09:58:02.273283 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [.], ack 112081, win 1444, options [nop,nop,TS val 1013365 ecr 128061282], length 0
09:58:02.557676 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [P.], seq 12580:13402, ack 112081, win 1444, options [nop,nop,TS val 1013436 ecr 128061282], length 822
09:58:02.577739 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [P.], seq 112081:112389, ack 13402, win 678, options [nop,nop,TS val 128061393 ecr 1013436], length 308
09:58:02.577964 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [P.], seq 112389:113541, ack 13402, win 678, options [nop,nop,TS val 128061393 ecr 1013436], length 1152
09:58:02.593245 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [.], ack 113541, win 1444, options [nop,nop,TS val 1013445 ecr 128061393], length 0
09:58:02.596042 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 113541:114897, ack 13402, win 678, options [nop,nop,TS val 128061398 ecr 1013445], length 1356
09:58:02.596081 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [P.], seq 114897:115211, ack 13402, win 678, options [nop,nop,TS val 128061398 ecr 1013445], length 314
09:58:02.596441 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 115211:116567, ack 13402, win 678, options [nop,nop,TS val 128061398 ecr 1013445], length 1356
09:58:02.596467 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 116567:117923, ack 13402, win 678, options [nop,nop,TS val 128061398 ecr 1013445], length 1356
09:58:02.596530 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [P.], seq 117923:118114, ack 13402, win 678, options [nop,nop,TS val 128061398 ecr 1013445], length 191
09:58:02.596814 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 118114:119470, ack 13402, win 678, options [nop,nop,TS val 128061398 ecr 1013445], length 1356
09:58:02.596837 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [.], seq 119470:120826, ack 13402, win 678, options [nop,nop,TS val 128061398 ecr 1013445], length 1356
09:58:02.596890 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [P.], seq 120826:121063, ack 13402, win 678, options [nop,nop,TS val 128061398 ecr 1013445], length 237
09:58:02.611183 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [F.], seq 13402, ack 114897, win 1444, options [nop,nop,TS val 1013450 ecr 128061398], length 0
09:58:02.611740 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [R], seq 3360258722, win 0, length 0
09:58:02.611821 IP 10.85.0.1.3128 > 10.85.0.9.45310: Flags [F.], seq 121063, ack 13403, win 678, options [nop,nop,TS val 128061402 ecr 1013450], length 0
09:58:02.614315 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [R], seq 3360258722, win 0, length 0
09:58:02.617520 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [R], seq 3360258722, win 0, length 0
09:58:02.618641 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [R], seq 3360258722, win 0, length 0
09:58:02.621415 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [R], seq 3360258722, win 0, length 0
09:58:02.624966 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [R], seq 3360258722, win 0, length 0
09:58:02.625256 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [R], seq 3360258722, win 0, length 0
09:58:02.631926 IP 10.85.0.9.45310 > 10.85.0.1.3128: Flags [R], seq 3360258723, win 0, length 0
Jun 15 09:58:02 ks1 fp=bad_packets:1 IN=tun0 OUT= MAC= SRC=10.85.0.9 DST=10.85.0.1 LEN=40 TOS=00 PREC=0x00 TTL=64 ID=19768 DF PROTO=TCP SPT=45310 DPT=3128 SEQ=3360258722 ACK=0 WINDOW=0 RST URGP=0 MARK=0
Jun 15 09:58:02 ks1 fp=bad_packets:1 IN=tun0 OUT= MAC= SRC=10.85.0.9 DST=10.85.0.1 LEN=40 TOS=00 PREC=0x00 TTL=64 ID=19769 DF PROTO=TCP SPT=45310 DPT=3128 SEQ=3360258722 ACK=0 WINDOW=0 RST URGP=0 MARK=0
Jun 15 09:58:02 ks1 fp=bad_packets:1 IN=tun0 OUT= MAC= SRC=10.85.0.9 DST=10.85.0.1 LEN=40 TOS=00 PREC=0x00 TTL=64 ID=19770 DF PROTO=TCP SPT=45310 DPT=3128 SEQ=3360258722 ACK=0 WINDOW=0 RST URGP=0 MARK=0
Jun 15 09:58:02 ks1 fp=bad_packets:1 IN=tun0 OUT= MAC= SRC=10.85.0.9 DST=10.85.0.1 LEN=40 TOS=00 PREC=0x00 TTL=64 ID=19771 DF PROTO=TCP SPT=45310 DPT=3128 SEQ=3360258722 ACK=0 WINDOW=0 RST URGP=0 MARK=0
Jun 15 09:58:02 ks1 fp=bad_packets:1 IN=tun0 OUT= MAC= SRC=10.85.0.9 DST=10.85.0.1 LEN=40 TOS=00 PREC=0x00 TTL=64 ID=19772 DF PROTO=TCP SPT=45310 DPT=3128 SEQ=3360258722 ACK=0 WINDOW=0 RST URGP=0 MARK=0
Jun 15 09:58:02 ks1 fp=bad_packets:1 IN=tun0 OUT= MAC= SRC=10.85.0.9 DST=10.85.0.1 LEN=40 TOS=00 PREC=0x00 TTL=64 ID=19773 DF PROTO=TCP SPT=45310 DPT=3128 SEQ=3360258722 ACK=0 WINDOW=0 RST URGP=0 MARK=0
EDIT2 I've uploaded a .zip file with the tcpdump capture of both sides :
http://expirebox.com/download/80b335fb34fab6824d4e35dd3609f628.html md5sum : ba748e6c6e787e81e765b6ef83b7b2cf
Hope this will help
Note : i'll edit this message a thousand times I think to have the right syntax... (I'm a serverfault.com beginner ;)