Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Joel Newkirk <netfilter@newkirk.us>
To: Dan Egli <dan@shortcircuit.dyndns.org>, netfilter@lists.netfilter.org
Subject: Re: Samba Blocked? (repost)
Date: Tue, 26 Nov 2002 19:24:56 -0500	[thread overview]
Message-ID: <200211261924.56163.netfilter@newkirk.us> (raw)
In-Reply-To: <001d01c29598$b3087a00$1e00a8c0@yamatto>

On Tuesday 26 November 2002 05:10 pm, Dan Egli wrote:
> Ok. I'm a fair bit confused here. I'm trying to setup a IPtables filter set
> that will block certain ports and allow others. It seems to work perfectly
> for anything other than Samba. If I try:
>
> smbclient //myserver/shared1, it fails to connect. But using the IP in
> place of it:
> smbclient //192.168.0.2/shared1 works just fine. I am specifically allowing
> NetBIOS-ns, NetBIOS-ssn, and NetBIOS-dgm. Still no go. What's wrong?

> # setp 4 - setup rules
> $IPT -A INPUT -p tcp -m multiport --dports smtp,ftp,telnet,ssh -j ACCEPT
> $IPT -A INPUT -p tcp -i eth0 -m multiport --dports
> telnet,ssh,domain,nntp,ntp,printer,pop3,imap,http,https,netbios-ns,netbios-
>d gm,netbios-ssn -j ACCEPT
> $IPT -A INPUT -p udp -i eth0 -m multiport --dports
> domain,ntp,netbios-ns,netbios-dgm,netbios-ssn -j ACCEPT
> $IPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
> $IPT -A INPUT -j LOG

> P.S. With these rules, it should only log packets that are failing, and I
> see the packets on port 137 in the log, so I don't know what's wrong.

Have you tried replacing netbios-ns with 137 in the rules?  It may not be 
resolving the name properly through your /etc/services file.  I don't see any 
other reason they should reach the log rule.

If that isn't it, maybe you can post a few of the droplog lines for 137s?  
Also, I assume you are seeing 137 logged only when connection fails?

j



  reply	other threads:[~2002-11-27  0:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-26 22:10 Samba Blocked? (repost) Dan Egli
2002-11-27  0:24 ` Joel Newkirk [this message]
2002-11-27  2:30   ` Dan Egli
2002-11-27  5:00     ` Joel Newkirk
2002-11-27  8:06       ` Michael
2002-11-27 18:17         ` Dan Egli

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=200211261924.56163.netfilter@newkirk.us \
    --to=netfilter@newkirk.us \
    --cc=dan@shortcircuit.dyndns.org \
    --cc=netfilter@lists.netfilter.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