You are not logged in.

#1 2017-11-20 01:52:50

Noorquacker
Member
Registered: 2017-08-16
Posts: 15

[SOLVED] SMBD server running on Arch is unreachable

Hi everyone,
I have Samba 4.7.1-1 right now and I'm trying to set up an SMB server on my Arch PC.
Here's my /etc/samba/smb.conf:

[global]
workgroup = WORKGROUP
server string = %h server (Samba, Arch Linux)
dns proxy = no
name resolve order = lmhosts bcast host wins
log file = /var/log/samba/log.%m
max log size = 1000
panic action = /usr/share/samba/panic-action %d
server role = standalone server
map to guest = bad user
usershare allow guests = yes
[kdrive]
path = /drv/K
valid users = noorquacker
read only = no
[testshare]
path = /home/noorquacker/Pictures
valid users = noorquacker
read only = no
[tmp]
comment = temporary files
path = /tmp
read only = yes

Problem is, when I try accessing it from any other PC via smbclient, it asks for my password, then it says NT_STATUS_HOST_UNREACHABLE.
I've been trying to dig into this for a while now, and have found no results.

Last edited by Noorquacker (2017-11-23 16:19:49)

Offline

#2 2017-11-20 04:29:44

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] SMBD server running on Arch is unreachable

Is this from within a LAN? Can you ping the host successfully? Can you connect to the CIFS port through nc or telnet?

Offline

#3 2017-11-22 19:09:41

Noorquacker
Member
Registered: 2017-08-16
Posts: 15

Re: [SOLVED] SMBD server running on Arch is unreachable

Hi, sorry for the late reply.
Pinging my computer from another works fine, but I can't telnet into ports 139 or 445, but port 22 works, as OpenSSH is running fine.
The other computer, however, has a successful Samba server and telnet works on ports 139 and 445.

Offline

#4 2017-11-22 19:45:34

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 288

Re: [SOLVED] SMBD server running on Arch is unreachable

did you try this? https://bbs.archlinux.org/viewtopic.php?id=230979

Last edited by WFV (2017-11-22 19:48:15)


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

#5 2017-11-22 21:04:26

seth
Member
Registered: 2012-09-03
Posts: 50,977

Re: [SOLVED] SMBD server running on Arch is unreachable

If ports 445 & 139 are filtered/closed there's either a firewall or the smb daemon isn't running - check the process list and the samba logs.

Online

#6 2017-11-22 21:15:13

Noorquacker
Member
Registered: 2017-08-16
Posts: 15

Re: [SOLVED] SMBD server running on Arch is unreachable

Sorry, but WFV, I tried it just now, and no results.
seth, checking through process list, smbd is running and there's no firewall. SMBD logs don't show anything other than it's ready and waiting for connections.

Offline

#7 2017-11-22 21:17:52

seth
Member
Registered: 2012-09-03
Posts: 50,977

Re: [SOLVED] SMBD server running on Arch is unreachable

nmap -p139,445 your_server_ip

Online

#8 2017-11-22 22:01:31

loqs
Member
Registered: 2014-03-06
Posts: 17,315

Re: [SOLVED] SMBD server running on Arch is unreachable

Or on the server

ss  -l '( sport = :139 or sport = :445)'

Offline

#9 2017-11-23 07:46:04

seth
Member
Registered: 2012-09-03
Posts: 50,977

Re: [SOLVED] SMBD server running on Arch is unreachable

@loqs, you forgot a blank ;-)

ss  -l '( sport = :139 or sport = :445 )'

Please provide both.

Online

#10 2017-11-23 15:20:01

Noorquacker
Member
Registered: 2017-08-16
Posts: 15

Re: [SOLVED] SMBD server running on Arch is unreachable

Running nmap from another computer says the host seems to be down, but can be overridden with -Pn, so adding -Pn returns this

PORT    STATE    SERVICE
139/tcp filtered netbios-ssn
445/tcp filtered microsoft-ds

Running ss on the server returns the following

Netid  State      Recv-Q Send-Q               Local Address:Port                                Peer Address:Port                
tcp    LISTEN     0      50                         0.0.0.0:netbios-ssn                              0.0.0.0:*                    
tcp    LISTEN     0      50                         0.0.0.0:microsoft-ds                             0.0.0.0:*                    
tcp    LISTEN     0      50                            [::]:netbios-ssn                                 [::]:*                    
tcp    LISTEN     0      50                            [::]:microsoft-ds                                [::]:*

Offline

#11 2017-11-23 15:57:26

seth
Member
Registered: 2012-09-03
Posts: 50,977

Re: [SOLVED] SMBD server running on Arch is unreachable

Is "nmap -p139,445 localhost" (on the server) "filtered" as well?

Online

#12 2017-11-23 16:06:43

Noorquacker
Member
Registered: 2017-08-16
Posts: 15

Re: [SOLVED] SMBD server running on Arch is unreachable

seth wrote:

Is "nmap -p139,445 localhost" (on the server) "filtered" as well?

No, it's open. smbclient on the server as localhost works as well.

Offline

#13 2017-11-23 16:18:39

Noorquacker
Member
Registered: 2017-08-16
Posts: 15

Re: [SOLVED] SMBD server running on Arch is unreachable

I figured it out.
iptables wasn't running, thought that turning it off would fix it.
Thank you, seth, loqs, WFV, and x33a for helping me.
Just starting iptables, creating an empty config file because it won't start without one, and doing
iptables -I INPUT -p tcp --dport 139 -j ACCEPT
iptables -I INPUT -p tcp --dport 445 -j ACCEPT
solved it all. This took me 3 days to solve and it was just that >.<

Offline

Board footer

Powered by FluxBB