UFW blocks Samba despite permissions

Hi all!
I configured Samba to share files between Linux and Windows PCs.
It works OK in UFW is disabled.
I added a rule to UFW allowing Samba and enabled UFW.
Nothing works.
So UFW blocks Samba despite the permission.
How to fix this issue?

Please show output of sudo ufw status verbose

Did you follow the instructions here: https://wiki.archlinux.org/title/Samba#UFW_Rule ?

If not, delete the rule that you have added and try the instructions given in ArchWiki.

HTH

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To Action From


137,138/udp ALLOW IN Anywhere
139,445/tcp ALLOW IN Anywhere
137,138/udp (v6) ALLOW IN Anywhere (v6)
139,445/tcp (v6) ALLOW IN Anywhere (v6)

All the ports are enabled

1 Like

Maybe worth trying to reload the rules? :thinking:

sudo ufw reload

Hm, that’s looking ok.

To make sure ufw denies, did you check if samba is working ok with ufw disabled?

Then if you find that ufw denies it is a good idea to check the logs to see what ufw is complaining about.

Samba is working smooth with UFW disabled.

So, as said, check the logs to see why ufw is in bad mood.

I have no idea how to check ufw logs

Run journalctl -xe and look for [UFW BLOCK] messages

1 Like

It blocks local IP.
[UFW BLOCK] IN=enp3s0 OUT= MAC=08:60:6e:55:3a:a3:8c:35:92:02:01:0f:08:00 SRC=192.168.1>

So I added a new rule for the whole subnet:
sudo ufw allow from 192.168.1.0/24

But I got another problem.
I can see now in Dolphin two Network folders: WindowsPC and EOS. I can open Windows folder and get to common files. But if I open EOS it leads to my Home folder.
The path is smb: eos.local
and asks for password and login. And rejects them. Where is my mistake?
Somehow I renewed password. But I don’t understand clearly, why did this error occured.
I shall have a break for about 2 or 3 hours. I will inform you later if everything is OK.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.