Skip to contentSkip to conversation

strange log on gateway inside []

DISCUSSION Michele Petrazzo - Unipex 4 participants 8 messages Jul 29, 2010 – Jul 30, 2010

lore
Share & tools
lore
#0 lore raw

Hi list,
I have a firewall that log some strange, for me, packets on the OUTPUT chain that I haven't see before. This is a typical log:

Firewall DROPOUT- IN= OUT=eth0 SRC=MYPUBBIP DST=188.153.11.87

    LEN=92 TOS=0x00 PREC=0xC0 TTL=64 ID=49303 PROTO=ICMP TYPE=3 CODE=3

[SRC=188.153.11.87 DST=MYADDITIONALIP LEN=64 TOS=0x00 PREC=0x00 TTL=118 ID=28851 DF PROTO=TCP SPT=12387 DPT=51684 WINDOW=17424 RES=0x00 ACK SYN URGP=0 ]

My output chain:
*filter
:OUTPUT DROP [4831251:620928037]
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT -A OUTPUT -j LOG --log-prefix "Firewall DROPOUT- "

On it I have more that one pubb ip addrs and, the MYPUBBIP is the first and primary, the MYADDITIONALIP if one of the secondaries.

The question. Why I see this log and why my fw want to talk with external and, the last, why the kernel double log talk and one is inside the brackets [ ] ?

Thanks,
Michele

#1 lore raw
Quoted 13 lines · Michele Petrazzo - Unipex

Hi list,
I have a firewall that log some strange, for me, packets on the OUTPUT chain that I haven't see before. This is a typical log:

Firewall DROPOUT- IN= OUT=eth0 SRC=MYPUBBIP DST=188.153.11.87
LEN=92 TOS=0x00 PREC=0xC0 TTL=64 ID=49303 PROTO=ICMP TYPE=3 CODE=3
[SRC=188.153.11.87 DST=MYADDITIONALIP LEN=64 TOS=0x00 PREC=0x00 TTL=118 ID=28851 DF PROTO=TCP SPT=12387 DPT=51684 WINDOW=17424 RES=0x00 ACK SYN URGP=0 ]

My output chain:
*filter
:OUTPUT DROP [4831251:620928037]

Review

Quoted 3 lines
(quoted diff) +0 -3
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -j LOG --log-prefix "Firewall DROPOUT- "

So what's left is INVALID packets.

Quoted 2 lines

The question. Why I see this log and why my fw want to talk with external and, the last, why the kernel double log talk and one is inside the brackets [ ] ?

Because those are the contents of the ICMP packet. See the RFC.

#2 lore raw

Jan Engelhardt ha scritto:

Quoted 9 lines

Review

Quoted 6 lines

My output chain:
*filter
:OUTPUT DROP [4831251:620928037]

(quoted diff) +0 -3
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -j LOG --log-prefix "Firewall DROPOUT- "

So what's left is INVALID packets.

First, thanks.
Seem that a rule that drop the INVALID packets to the trick. But... drop or reject the invalid packets?

Quoted 4 lines
Quoted 2 lines

The question. Why I see this log and why my fw want to talk with external and, the last, why the kernel double log talk and one is inside the brackets [ ] ?

Because those are the contents of the ICMP packet. See the RFC.

Append also with tcp, no only icmp.
P.s. Have you a rfc number?

And the last, have you also an rfc that explain why and where invalid come from?

Thanks

#3 lore raw
Quoted 10 lines · Michele Petrazzo - Unipex

Jan Engelhardt ha scritto:

Quoted 8 lines

Review

Quoted 6 lines

My output chain:
*filter
:OUTPUT DROP [4831251:620928037]

(quoted diff) +0 -3
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -j LOG --log-prefix "Firewall DROPOUT- "

So what's left is INVALID packets.

Quoted 2 lines

Seem that a rule that drop the INVALID packets to the trick. But... drop or reject the invalid packets?

Whatever fits your need.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

The question. Why I see this log and why my fw want to talk with external and, the last, why the kernel double log talk and one is inside the brackets [ ]?

Because those are the contents of the ICMP packet. See the RFC.

Append also with tcp, no only icmp.
P.s. Have you a rfc number?

792

Quoted 2 lines

And the last, have you also an rfc that explain why and where invalid come from?

INVALID is a CT classification. RFC don't have much to do with that.

#4 lore raw
In reply to Michele Petrazzo - Unipex

Hello,

Quoted 17 lines · Michele Petrazzo - Unipex

Hi list,
I have a firewall that log some strange, for me, packets on the OUTPUT chain that I haven't see before. This is a typical log:

Firewall DROPOUT- IN= OUT=eth0 SRC=MYPUBBIP DST=188.153.11.87

    LEN=92 TOS=0x00 PREC=0xC0 TTL=64 ID=49303 PROTO=ICMP TYPE=3 CODE=3

[SRC=188.153.11.87 DST=MYADDITIONALIP LEN=64 TOS=0x00 PREC=0x00 TTL=118 ID=28851 DF PROTO=TCP SPT=12387 DPT=51684 WINDOW=17424 RES=0x00 ACK SYN URGP=0 ]

My output chain:
*filter
:OUTPUT DROP [4831251:620928037]

(quoted diff) +0 -3
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -j LOG --log-prefix "Firewall DROPOUT- "
Quoted 6 lines

On it I have more that one pubb ip addrs and, the MYPUBBIP is the first and primary, the MYADDITIONALIP if one of the secondaries.

The question. Why I see this log and why my fw want to talk with external and, the last, why the kernel double log talk and one is inside the brackets [ ] ?

This is an ICMP error packet. Type 3 code 3 means "destination port unreachable". An ICMP error packet contains the beginning (including the header) of the original packet which triggered the error, printed within brackets in the log. Here the original packet was TCP from 188.153.11.87 to MYADDITIONALIP. ICMP port unreachable is not the natural reply to an unexpected TCP packet, so I guess it was generated by a REJECT target in the INPUT or FORWARD chain. If the original packet was in the INVALID state (or UNTRACKED if you used the NOTRACK target), then the ICMP error packet is in the INVALID state instead of RELATED.

#5 lore raw
In reply to Michele Petrazzo - Unipex

Jan Engelhardt wrote:

Hi e thanks.

Quoted 3 lines
Quoted 2 lines
Quoted 2 lines

And the last, have you also an rfc that explain why and where invalid come from?

INVALID is a CT classification. RFC don't have much to do with that.

Quoted 5 lines · Pascal Hambourg

ICMP port unreachable is not the natural reply to an unexpected TCP packet, so I guess it was generated by a REJECT target in the INPUT or FORWARD chain. If the original packet was in the INVALID state (or UNTRACKED if you used the NOTRACK target), then the ICMP error packet is in the INVALID state instead of RELATED.

A doubt.
Like said, INVALID is only a CT classification of my firewall. But, since it's not a standard, how I can receive and reply (through my FORWARD chain) to an INVALID packet? Who generate/classify it like INVALID? My sender (I don't believe since it's not a standard) or my CT?

Thanks,
Michele

#6 lore raw
Quoted 8 lines · Michele Petrazzo - Unipex

A doubt.
Like said, INVALID is only a CT classification of my firewall. But, since it's not a standard, how I can receive and reply (through my FORWARD chain) to an INVALID packet? Who generate/classify it like INVALID? My sender (I don't believe since it's not a standard) or my CT?

Your connection tracker...

Signature · 5 lines
Richard Horton
Users are like a virus: Each causing a thousand tiny crises until the
host finally dies.
http://www.pbase.com/arimus - My online photogallery
http://www.richardhorton.info
#7 lore raw
In reply to Michele Petrazzo - Unipex
Quoted 10 lines · Michele Petrazzo - Unipex
Quoted 2 lines
Quoted 1 line
Quoted 1 line

invalid come from?

INVALID is a CT classification. RFC don't have much to do with that.

Quoted 5 lines · Pascal Hambourg

ICMP port unreachable is not the natural reply to an unexpected TCP packet, so I guess it was generated by a REJECT target in the INPUT or FORWARD chain. If the original packet was in the INVALID state (or UNTRACKED if you used the NOTRACK target), then the ICMP error packet is in the INVALID state instead of RELATED.

Quoted 3 lines

Like said, INVALID is only a CT classification of my firewall. But, since it's not a standard, how I can receive and reply (through my FORWARD chain) to an INVALID packet?

By not blocking it, standard processing will take place.

Quoted 2 lines

Who generate/classify it like INVALID? My sender (I don't believe since it's not a standard) or my CT?

The sender creates it, your firewall classifies it.