From: gentuxx <gentuxx@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: OT: A netbios-ssn blocking rule?
Date: Wed, 23 Aug 2006 14:46:25 -0700 [thread overview]
Message-ID: <44ECCCB1.3000806@gmail.com> (raw)
In-Reply-To: <44ECC994.8020705@ilievnet.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Iliev wrote:
> James wrote:
>>> Daniel Iliev <danny <at> ilievnet.com> writes:
>>>
>>
>> My iptables based firewall seem to be working, However, I keep getting triplets
>> of this activity:
>>
>> 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
>>
>> similar problem (2469 > microsoft-ds)
>> Other problems are (info section is only difference) epmap > 3081
>>
>>
>>
>>
>>> "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". )
>>>
>>
>> Your advice is working, beautiful
>>
>> Much Thanks!
>>
>>
>> James
>>
>>
>>
>>
> I'm not sure if get this message right, but if it is a question how to
> deal with packets like these:
>
>> 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
>
> the answer is: Add the same rules, but replace "microsoft-ds" with "netbios-ssn" or the corresponding number from /etc/services. Those rules would look like:
> "iptables -A INPUT -p tcp --dport netbios-ssn -j DROP"
> it's the same as:
> "iptables -A INPUT -p tcp --dport 139 -j DROP"
>
> And if the target is not the FW:
> iptables -A FORWARD -d *target-PC* -p tcp --dport netbios-ssn -j DROP
> or
> iptables -A FORWARD -d *target-PC* -p tcp --dport 139 -j DROP
>
>
> It seems that you want to stop the ms netbios activity. The ports used
> for this service are 137,138,139 and 445 so the rule-set could be
> something like this:
>
> iptables -A FORWARD -d *target-PC* -p tcp --dport 445 -j DROP
> iptables -A FORWARD -d *target-PC* -p tcp --dport 137:139 -j DROP
>
> or
>
> iptables -A INPUT -p tcp --dport 445 -j DROP
> iptables -A INPUT -p tcp --dport 137:139 -j DROP
>
>
Actually, some of those ports are UDP. /etc/services says the same for
both TCP and UDP. So if -p is required for --dport, you would have to
add rules for UDP as well.
iptables -A FORWARD -d *target-PC* -p udp --dport 137:139 -j DROP
iptables -A INPUT -p udp --dport 137:139 -j DROP
- --
gentux
echo "hfouvyyAhnbjm/dpn" | perl -pe 's/(.)/chr(ord($1)-1)/ge'
gentux's gpg fingerprint ==> 5495 0388 67FF 0B89 1239 D840 4CF0 39E2
18D3 4A9E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE7MyxTPA54hjTSp4RAhjGAKCUmxCgS62ZjCKhGsUW28M25UfnVgCfeHer
R9eOM9mQA999cNZ43ICRqAQ=
=SX5D
-----END PGP SIGNATURE-----
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2006-08-23 21:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-18 19:24 [gentoo-user] blocking netbios-ssn rule? James
2006-08-18 19:59 ` [gentoo-user] OT: A netbios-ssn blocking rule? James
2006-08-18 21:43 ` Daniel Iliev
2006-08-21 4:11 ` [gentoo-user] " James
2006-08-23 21:33 ` Daniel Iliev
2006-08-23 21:46 ` gentuxx [this message]
2006-08-24 1:36 ` Daniel Iliev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44ECCCB1.3000806@gmail.com \
--to=gentuxx@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox