Linux Netfilter discussions
 help / color / mirror / Atom feed
* Re: bug? blocked packets get shadowed to internal network
@ 2003-08-14 13:50 Juergen Stohr
  0 siblings, 0 replies; 8+ messages in thread
From: Juergen Stohr @ 2003-08-14 13:50 UTC (permalink / raw)
  To: netfilter

Hi Chris,
>
> > we are using a firewall with RedHat kernel 2.4.20-19.7. The firewall is
> > configured to block every packet with DPT 199 into our network.
>
> You haven't given us your ruleset. Are you using a REJECT rule, especially
> with TCP reset?

Yes, we are using REJECT with TCP reset
iptables -A DRP_PCKT -p tcp -j REJECT --reject-with tcp-reset

>
> > IN= OUT=eth0 SRC=xxx.xxx.151.184 DST=xxx.xxx.11.231 LEN=40 TOS=0x00 PREC=0x0
0 TT
> > L=255 ID=0 DF PROTO=TCP SPT=199 DPT=34869 WINDOW=0 RES=0x00 ACK RST URGP=0
>
> This looks like a completely standard TCP reset. I can't tell for sure
> without seeing your ruleset, but I suspect that either you are blocking
> the incoming packet with -j REJECT --reject-with tcp-reset, or else it's
> not being blocked at all, and what you see is the kernel resetting the
> connection in the normal way (since it's not listening on that port).

I will attach the complete ruleset to this mail. The problem is, that
the packet resetting the connection appears on the "wrong" interface. So if
eth1 is our external interface, the kernel should sent a RST ACK also to
eth1 (and not to eth0 which is the internal interface). As mentioned, the
2.4.18 didn't show that behaviour.

cheers,
        juergen



^ permalink raw reply	[flat|nested] 8+ messages in thread
* bug? blocked packets get shadowed to internal network
@ 2003-08-14 11:39 Juergen Stohr
  2003-08-14 11:47 ` Chris Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Juergen Stohr @ 2003-08-14 11:39 UTC (permalink / raw)
  To: netfilter

Hi to all,

we are using a firewall with RedHat kernel 2.4.20-19.7. The firewall is
configured to block every packet with DPT 199 into our network. When doing
a "telnet server.in.our.network 199" from outside, the firewall correctly
drops that packet, logging

IN=eth1 OUT=eth0 SRC=xxx.xxx.11.231 DST=xxx.xxx.151.184 LEN=44 TOS=0x00 PREC=0x0
0 TTL=252 ID=12615 DF PROTO=TCP SPT=34869 DPT=199 WINDOW=8760 RES=0x00 SYN URGP=
0

to syslog. The external interface is eth1, internal is eth0.
However, at the same time, the firewall generates a packet which is droped
by the output chain of the firewall. It fakes the SRC and DST and wants to send
that packet to the internal server:

IN= OUT=eth0 SRC=xxx.xxx.151.184 DST=xxx.xxx.11.231 LEN=40 TOS=0x00 PREC=0x00 TT
L=255 ID=0 DF PROTO=TCP SPT=199 DPT=34869 WINDOW=0 RES=0x00 ACK RST URGP=0

When setting the output chain to accept policy, the above packet is delivered
to xxx.xxx.151.184!

How can we prohibit those packets to be generated? Kernel RH 2.4.18-x didn't
show that behaviour.

regards,
        juergen



^ permalink raw reply	[flat|nested] 8+ messages in thread
* bug? blocked packets get shadowed to internal network
@ 2003-08-14 11:11 Juergen Stohr
  0 siblings, 0 replies; 8+ messages in thread
From: Juergen Stohr @ 2003-08-14 11:11 UTC (permalink / raw)
  To: netfilter

Hi to all,

we are using a firewall with RedHat kernel 2.4.20-19.7. The firewall is
configured to block every packet with DPT 199 into our network. When doing
a "telnet server.in.our.network 199" from outside, the firewall correctly
drops that packet, logging

IN=eth1 OUT=eth0 SRC=xxx.xxx.11.231 DST=xxx.xxx.151.184 LEN=44 TOS=0x00 PREC=0x0
0 TTL=252 ID=12615 DF PROTO=TCP SPT=34869 DPT=199 WINDOW=8760 RES=0x00 SYN URGP=
0

to syslog. The external interface is eth1, internal is eth0.
However, at the same time, the firewall generates a packet which is droped
by the output chain of the firewall. It fakes the SRC and DST and wants to send
that packet to the internal server:

IN= OUT=eth0 SRC=xxx.xxx.151.184 DST=xxx.xxx.11.231 LEN=40 TOS=0x00 PREC=0x00 TT
L=255 ID=0 DF PROTO=TCP SPT=199 DPT=34869 WINDOW=0 RES=0x00 ACK RST URGP=0

When setting the output chain to accept policy, the above packet is delivered
to xxx.xxx.151.184!

How can we prohibit those packets to be generated? Kernel RH 2.4.18-x didn't
show that behaviour.

regards,
        juergen



^ permalink raw reply	[flat|nested] 8+ messages in thread
* bug? blocked packets get shadowed to internal network
@ 2003-08-14  9:34 Juergen Stohr
  2003-08-19 15:30 ` Arnt Karlsen
  2003-09-04  6:53 ` Dharmendra.T
  0 siblings, 2 replies; 8+ messages in thread
From: Juergen Stohr @ 2003-08-14  9:34 UTC (permalink / raw)
  To: netfilter

Hi to all,

we are using a firewall with RedHat kernel 2.4.20-19.7. The firewall is 
configured to block every packet with DPT 199 into our network. When doing
a "telnet server.in.our.network 199" from outside, the firewall correctly 
drops that packet, logging

IN=eth1 OUT=eth0 SRC=xxx.xxx.11.231 DST=xxx.xxx.151.184 LEN=44 TOS=0x00 PREC=0x00 TTL=252 ID=12615 DF PROTO=TCP SPT=34869 DPT=199 WINDOW=8760 RES=0x00 SYN URGP=0

to syslog. The external interface is eth1, internal is eth0.
However, at the same time, the firewall generates a packet, which is droped
by the output chain of the firewall. It fakes the SRC and DST and wants to send
that packet to the internal server:

IN= OUT=eth0 SRC=xxx.xxx.151.184 DST=xxx.xxx.11.231 LEN=40 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=TCP SPT=199 DPT=34869 WINDOW=0 RES=0x00 ACK RST URGP=0

When setting the output chain to accept policy, the above packet is delivered
xxx.xxx.151.184!

How can we prohibit those packets to be generated? Kernel RH 2.4.18-x didn't
show that behaviour.

Please CC me as I'm not subscribed.

regards,
	juergen



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

end of thread, other threads:[~2003-09-04  6:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.44.0308141501421.31438-100000@localhost>
     [not found] ` <Pine.LNX.4.44.0308141506450.31438-100000@localhost>
2003-08-14 15:07   ` bug? blocked packets get shadowed to internal network Juergen Stohr
2003-08-14 13:50 Juergen Stohr
  -- strict thread matches above, loose matches on Subject: below --
2003-08-14 11:39 Juergen Stohr
2003-08-14 11:47 ` Chris Wilson
2003-08-14 11:11 Juergen Stohr
2003-08-14  9:34 Juergen Stohr
2003-08-19 15:30 ` Arnt Karlsen
2003-09-04  6:53 ` Dharmendra.T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox