Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 21
Dolda, first, thanks for stickin with me. Second, I tried your nmblookup suggestion ... still nothing. I tried connecting today using smclient and got the following: (P.S. - buttafuco is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Jun 2003
    Posts
    11

    Dolda, first, thanks for stickin with me.

    Second, I tried your nmblookup suggestion ... still nothing.

    I tried connecting today using smclient and got the following:
    (P.S. - buttafuco is on 192.168.0.4)

    [root@manning1 init.d]# smbclient -L buttafuco
    added interface ip=192.168.0.21 bcast=192.168.0.255 nmask=255.255.255.0
    Got a positive name query response from 127.0.0.1 ( 192.168.0.4 )
    error connecting to 192.168.0.4:139 (No route to host)
    Error connecting to 192.168.0.4 (No route to host)
    Connection to buttafuco failed

    The only thing different today is that I have rebooted my pc.

    Also noticed that I always have 2 copies of nmbd running when I "ps -A | grep nmbd".
    When I shut down Samba, it always has trouble trying to kill one of them... odd

    -Paul

  2. #12
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    That's really strange! How can you get a NMB reply from localhost?! Could it be that WINS server setup of yours that's messing things up? You don't really need a WINS server (unless you want it for some other reason?), so try turning it off.

  3. #13
    Just Joined!
    Join Date
    Jun 2003
    Posts
    11
    Okay, I removed all WINS nonsense. My smb.conf looks like this:

    netbios name = manning1
    workgroup = shelbyville
    security = user
    encrypt passwords = yes
    server string = Pauls Linux Box

    Then I removed the WINS Address from my windows machine and rebooted. This does not seem to have resolved the problem but I do see new things, here is the output from my tests:

    [root@manning1 root]# smbclient -L buttafuco
    added interface ip=192.168.0.21 bcast=192.168.0.255 nmask=255.255.255.0
    Connection to buttafuco failed
    [root@manning1 root]# nmblookup buttafuco
    querying buttafuco on 192.168.0.255
    name_query failed to find name buttafuco
    [root@manning1 root]# nmblookup 192.168.0.4
    querying 192.168.0.4 on 192.168.0.255
    name_query failed to find name 192.168.0.4
    [root@manning1 root]# nmblookup -r -A 192.168.0.4
    Looking up status of 192.168.0.4
    BUTTAFUCO <20> - B <ACTIVE>
    BUTTAFUCO <00> - B <ACTIVE>
    SHELBYVILLE <00> - <GROUP> B <ACTIVE>
    BUTTAFUCO <03> - B <ACTIVE>
    SHELBYVILLE <1e> - <GROUP> B <ACTIVE>
    MELANIE <03> - B <ACTIVE>

    [root@manning1 root]# smbclient //buttafuco/share
    added interface ip=192.168.0.21 bcast=192.168.0.255 nmask=255.255.255.0
    Connection to buttafuco failed
    [root@manning1 root]# smbclient //buttafuco/melanie
    added interface ip=192.168.0.21 bcast=192.168.0.255 nmask=255.255.255.0
    Connection to buttafuco failed
    [root@manning1 root]# smbclient //192.168.0.4/share
    added interface ip=192.168.0.21 bcast=192.168.0.255 nmask=255.255.255.0
    session request to 192.168.0.4 failed (Called name not present)
    session request to 192 failed (Called name not present)
    Password:
    Domain=[SHELBYVILLE] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
    smb: \>


    - Paul

  4. #14
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I see that nmblookup -r -A 192.168.0.4 worked this time. However, you didn't try just nmblookup -A 192.168.0.4 (you only tried nmblookup 192.168.0.4, which will never work). Could you do that as well?

  5. #15
    Just Joined!
    Join Date
    Jun 2003
    Posts
    11
    Nothing

    [root@manning1 samba]# nmblookup -A 192.168.0.4
    Looking up status of 192.168.0.4

    [root@manning1 samba]#


    Then I tried this:

    [root@manning1 samba]# nmblookup -r -A 192.168.0.4
    Looking up status of 192.168.0.4
    BUTTAFUCO <20> - B <ACTIVE>
    BUTTAFUCO <00> - B <ACTIVE>
    SHELBYVILLE <00> - <GROUP> B <ACTIVE>
    BUTTAFUCO <03> - B <ACTIVE>
    SHELBYVILLE <1e> - <GROUP> B <ACTIVE>
    MELANIE <03> - B <ACTIVE>

  6. #16
    Just Joined!
    Join Date
    Jun 2003
    Posts
    11
    Here is some more meaningless info.

    Did a tcpdump on port 139, then went to my Windows pc and did a:

    C:\ net view /domain:shelbyvillle

    Here is the tcpdump on from the Linux box if that helps:

    [root@manning1 root]# tcpdump port 139 -n
    tcpdump: listening on eth0
    19:11:57.430656 192.168.0.4.1045 > 192.168.0.21.netbios-ssn: S 1831559442:1831559442(0) win 64240 <mss 1460,nop,nop,sackOK> (DF)
    19:11:57.430741 192.168.0.21.netbios-ssn > 192.168.0.4.1045: S 2651445517:2651445517(0) ack 1831559443 win 5840 <mss 1460,nop,nop,sackOK> (DF)
    19:11:57.430877 192.168.0.4.1045 > 192.168.0.21.netbios-ssn: . ack 1 win 64240 (DF)
    19:11:57.430898 192.168.0.4.1045 > 192.168.0.21.netbios-ssn: P 1:73(72) ack 1 win 64240NBT Packet (DF)
    19:11:57.430936 192.168.0.21.netbios-ssn > 192.168.0.4.1045: . ack 73 win 5840 (DF)
    19:11:57.455925 192.168.0.21.netbios-ssn > 192.168.0.4.1045: P 1:5(4) ack 73 win 5840NBT Packet (DF)
    19:11:57.456177 192.168.0.4.1045 > 192.168.0.21.netbios-ssn: P 73:210(137) ack 5 win 64236NBT Packet (DF)
    19:11:57.490453 192.168.0.21.netbios-ssn > 192.168.0.4.1045: . ack 210 win 5840
    (DF)
    19:11:57.490885 192.168.0.21.netbios-ssn > 192.168.0.4.1045: P 5:98(93) ack 210
    win 5840NBT Packet (DF)
    19:11:57.493217 192.168.0.4.1045 > 192.168.0.21.netbios-ssn: P 210:348(13 ack
    98 win 64143NBT Packet (DF)
    19:11:57.493257 192.168.0.21.netbios-ssn > 192.168.0.4.1045: . ack 348 win 5840
    (DF)
    19:11:57.513199 192.168.0.21.netbios-ssn > 192.168.0.4.1045: P 98:211(113) ack 348 win 5840NBT Packet (DF)
    19:11:57.513636 192.168.0.4.1045 > 192.168.0.21.netbios-ssn: P 348:470(122) ack
    211 win 64030NBT Packet (DF)
    19:11:57.514039 192.168.0.21.netbios-ssn > 192.168.0.4.1045: P 211:348(137) ack
    470 win 5840NBT Packet (DF)
    19:11:57.705189 192.168.0.4.1045 > 192.168.0.21.netbios-ssn: . ack 348 win 63893 (DF)

  7. #17
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    That wan't necessary. Everything is quite clear from the last post. Your firewall is simply blocking the reply from the windows box. Just because NMB services listen to port 137, it doesn't mean the nmblookup will bind to that port to query a node. The -r option forces it to bind on port 137, in order to work with Win95 nodes (which only reply to port 137). What is your firewall setup?

  8. #18
    Just Joined!
    Join Date
    Jun 2003
    Posts
    11
    Here is my iptables setup. Some of it was generated for me by Security tool that Gnome provides. I added the entries for SAMBA.

    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [4:288]
    :RH-Lokkit-0-50-INPUT - [0:0]
    -A INPUT -j RH-Lokkit-0-50-INPUT
    -A FORWARD -j RH-Lokkit-0-50-INPUT
    -A RH-Lokkit-0-50-INPUT -p udp -m udp --sport 123 --dport 123 -j ACCEPT
    -A RH-Lokkit-0-50-INPUT -s 192.168.0.0/255.255.255.0 -p tcp -m tcp --dport 139 -j ACCEPT
    -A RH-Lokkit-0-50-INPUT -s 192.168.0.0/255.255.255.0 -p udp -m udp --dport 137:138 -j ACCEPT
    -A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
    -A RH-Lokkit-0-50-INPUT -s 192.168.0.1 -p udp -m udp --sport 53 -j ACCEPT
    -A RH-Lokkit-0-50-INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j REJECT --reject-with icmp-port-unreachable
    -A RH-Lokkit-0-50-INPUT -p udp -m udp -j REJECT --reject-with icmp-port-unreachable
    COMMIT

  9. #19
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    It actually appears that it rejects all UDP packets except for port 137 and 138. Try just disabling those below 1024 instead. Ie., change the last REJECT line into this:
    Code:
    -A RH-Lokkit-0-50-INPUT -p udp --dport 0&#58;1023 -j REJECT --reject-with icmp-port-unreachable

  10. #20
    Just Joined!
    Join Date
    Jun 2003
    Posts
    11
    Dats it.

    One change though. Your iptables entry did not work.

    -A RH-Lokkit-0-50-INPUT -p udp --dport 0:1023 -j REJECT --reject-with icmp-port-unreachable

    I had to modify it to add a 'mark':

    -A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 0:1023 -j REJECT --reject-with icmp-port-unreachable

    Don't know why but I kept getting errors without it.

    Can you explain what this new rule allows that the previous one did not allow? From my observation it appears that my firewall is rejecting UDP packets where the destination port is between 0 and 1023. Does that mean that all incoming udp packets with a port # above 1023 are ACCEPTED.

    Thanks for your help.

    -Paul

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •