You are not logged in.
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
Is this from within a LAN? Can you ping the host successfully? Can you connect to the CIFS port through nc or telnet?
Offline
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
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
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
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
nmap -p139,445 your_server_ip
Online
Or on the server
ss -l '( sport = :139 or sport = :445)'
Offline
@loqs, you forgot a blank ;-)
ss -l '( sport = :139 or sport = :445 )'
Please provide both.
Online
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
Is "nmap -p139,445 localhost" (on the server) "filtered" as well?
Online
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
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