James wrote: > Hello, > > My iptables based firewall seem to be working, However, I keep getting > triplets of this activity: > > Problem (2286 > netbios-ssn) > source dest. proto info > curious.ip www.me.com tcp 2286 > netbios-ssn Seq=0 Len=0 MSS=1460 > www.me.com curious.ip tcp netbios-ssn > 2286 [RST, ACK] Seq=0 Ack=1 > Win=0 Len=0 > > Any ideas on a rule to drop these requests to my web server? > > similarly I see the same thing except the info section is slightly > different: > similar problem (2469 > microsoft-ds) > rouge.ip www.me.com tcp 2469 > microsoft-ds Seq=0 Len=0 MSS=1460 > > and the response from my firewall is simialr > www.me.com rouge.ip tcp microsoft-ds > 2469 [RST, ACK] Seq=0 Ack=1 > Win=0 Len=0 > > Other problems are (info section is only difference) epmap > 3081 > 3081 > epmap > > Each of these appear in tripplets... and seem useless. Are they > part of something stupidly done by microsoft? I think not > because they occur quite frequently, almost systematcially, > leading me to suspect they are part of nefarious activities? > > The only change is the port numbers (2286; 2469; 3081) and the > source IP address change after each triplet of queries. > > Any ideas, information and iptables rules to silently drop these > queries are most welcome. I see them all day long. > > > James > > > > > Depending on which PC these packets are targeted to you should use "INPUT" or "FORWARD" chains. If the target is a PC behind the firewall ("FW" from now on) use "FORWARD". If the target is the FW itself use "INPUT". The rules should look like this:
"iptables -A INPUT -p tcp --dport microsoft-ds -j DROP" ( < the packets have destination the FW itself) "iptables -A FORWARD -d *target-PC* -p tcp --dport microsoft-ds -j DROP" ( < the packets have destination the "target-PC". ) If you omit "-d target-PC" from the second rule your FW will drop every packet with destination port="microsoft-ds" and IP address different from the IP address of the FW itself. Keep in mind that these rules may not be matched if the packets match other rules you have added previously. -- Best regards, Daniel -- gentoo-user@gentoo.org mailing list