Skip to contentSkip to conversation

Strange Entry

DISCUSSION Jimmy 2 participants 3 messages Jun 11, 2005 – Jun 13, 2005 1 message not in the archive

lore
Share & tools
lore

Jimmy

author
#0 lore raw

Hello,

I have recently enabled logging on my iptables firewall rulesets. One of the things that I have noticed and have not really been able to grasp properly are the following entries.

Jun 11 12:25:40 bogus kernel: Dropped Out Rule: IN= OUT=eth0
SRC=212.100.249.100 DST=137.149.3.22 LEN=75 TOS=0x00 PREC=0x00 TTL=64
ID=27797 DF PROTO=TCP SPT=25 DPT=34934 WINDOW=1448 RES=0x00 ACK PSH FIN
URGP=0
Jun 11 12:26:20 bogus kernel: Dropped Out Rule: IN= OUT=eth0
SRC=212.100.249.100 DST=137.149.3.22 LEN=75 TOS=0x00 PREC=0x00 TTL=64
ID=27799 DF PROTO=TCP SPT=25 DPT=34934 WINDOW=1448 RES=0x00 ACK PSH FIN
URGP=0
Jun 11 12:57:35 bogus kernel: Dropped Out Rule: IN= OUT=eth0

SRC=212.100.249.100 DST=70.84.118.130 LEN=75 TOS=0x00 PREC=0x00 TTL=64 ID=51446 DF PROTO=TCP SPT=25 DPT=48117 WINDOW=1448 RES=0x00 ACK PSH FIN URGP=0

I am not sure what should be going out with a source port of 25 and a destination port that is so high. I thought that an outgoing connection from the server should be established with a high source port and a low (service) destination port?.

I am trying to work out if that rule would be resulting in a drop in email. Im not seeing any OUTBOUND email in the queue.. So I am wondering what exactly the root cause, or what applications could cause traffic like that to occur?.

Any ideas would be greatly appreciated.

#1 lore raw

* Jimmy <[email protected]> 11. Jun 05:

Quoted 1 line

Hello,

Hi,

Quoted 9 lines
Jun 11 12:25:40 bogus kernel: Dropped Out Rule: IN= OUT=eth0

SRC=212.100.249.100 DST=137.149.3.22 LEN=75 TOS=0x00 PREC=0x00 TTL=64 ID=27797 DF PROTO=TCP SPT=25 DPT=34934 WINDOW=1448 RES=0x00 ACK PSH FIN URGP=0

I am not sure what should be going out with a source port of 25 and a destination port that is so high. I thought that an outgoing connection from the server should be established with a high source port and a low (service) destination port?.

It's not an outgoing one, it's a FIN packet, that tries to close an already established connection. Check your MTA, AFAICS it binds to the external interface and accepts connections from the internet. Check your input rules too.

Quoted 2 lines

I am trying to work out if that rule would be resulting in a drop in email. Im not seeing any OUTBOUND email in the queue..

IIRC MTAs delivering mail should connect from a high port. In all cases the connection will go to port 25, not to a high port as in your log snippet.

HTH,
regards, Frank.

Signature · 1 line
Sigmentation fault

A message that is not in the archive (sent off-list or not yet received): 15604.212.100.225.55.1118652269.squirrel@webmail.*

#3 lore raw

* Jimmy <[email protected]> 13. Jun 05:

Quoted 1 line

Hello Frank,

Hi,

*grmpf* Please do NOT:
+ send me private mails,
+ top post,
+ wrap outputs.

And do:
+ post your network topology. (I can do some brave guesses at this
point: you have a single host with eth0 the external interface?)

Quoted 7 lines

Chain INPUT (policy DROP 6037 packets, 716K bytes)
pkts bytes target prot opt in out source
destination

 192K   46M ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
  531 40356 ACCEPT     icmp --  eth0   *       10.2.96.0/24         212.100.249.100
18624 1366K ACCEPT     tcp  --  eth0   *       0.0.0.0/0            212.100.249.100     tcp spts:1024:65535 dpt:768
12340  619K ACCEPT     tcp  --  eth0   *       0.0.0.0/0            212.100.249.100     tcp spts:1024:65535 flags:0x16/0x02 multiport dports 25,53,80,110,143

You're accepting incomming TCP connections to port 25 at eth0.

Quoted 7 lines
  417 21204 ACCEPT     tcp  --  eth0   *       0.0.0.0/0            212.100.249.101     multiport dports 21,53,80,443 tcp flags:0x16/0x02
    4   289 ACCEPT     udp  --  eth0   *       0.0.0.0/0            0.0.0.0/0           udp dpt:53
32956 5392K ACCEPT     udp  --  eth0   *       0.0.0.0/0            0.0.0.0/0           udp spt:53
 129K   19M ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
 6037  716K LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 4
 6037  716K LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 4 prefix `Dropped: '
Quoted 6 lines

Chain OUTPUT (policy DROP 49 packets, 3499 bytes)
pkts bytes target prot opt in out source
destination

 192K   46M ACCEPT     all  --  *      lo      0.0.0.0/0            0.0.0.0/0
  531 40356 ACCEPT     icmp --  *      *       0.0.0.0/0            10.2.96.0/24
  888  154K ACCEPT     tcp  --  *      eth0    0.0.0.0/0            0.0.0.0/0           multiport dports 21,22,25,53,43,80,110,143,443,6667,6668

And you accept any outgoing TCP connection to eth0 at port 25.

Quoted 4 lines
    3   436 ACCEPT     udp  --  *      eth0    212.100.249.100      0.0.0.0/0           udp spt:53
    1   161 ACCEPT     udp  --  *      eth0    212.100.249.101      0.0.0.0/0           udp spt:53
33490 2732K ACCEPT     udp  --  *      eth0    0.0.0.0/0            0.0.0.0/0           multiport dports 53
 187K  117M ACCEPT     tcp  --  *      eth0    0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED

And you accept all RELATED traffic throug eth0.

Quoted 4 lines
   49  3499 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 4
   49  3499 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0           LOG flags 0 level 4 prefix `Dropped Out Rule: '

Any help would be greatly appreciated.

From this point of view you shoudn't have these log messages. These packets would be ACCEPTed due to the RELATED match. Your logged FIN packet could not be set in relation to an existing connections and so missed the RELATED rule somehow. Once I had similar problems with a
squid: it seemed it always closed connections two times. I never had a detailed view at this phenomenon, but it looked similar to this.

HTH,
Gruss vom Frank.

Signature · 1 line
Sigmentation fault