Discussion:
I think I've broken samba or something???
(too old to reply)
RobH
2020-12-09 12:32:47 UTC
Permalink
I have been trying to sort out a wifi device not connecting to a port
number:
192.168.0.22:6053

So I hunted around and found this:

https://www.ibm.com/support/knowledgecenter/STXKQY_5.0.5/com.ibm.spectrum.scale.v5r05.doc/bl1adv_firewallportopenexamples.htm

Blindly and or stupidly I then used a few of the examples :

sudo iptables -A OUTPUT -p tcp -d 192.168.0.35/24 --sport 6053 -j ACCEPT

sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 --sport 6053 -j
ACCEPT

sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 6053 -j ACCEPT

then I did this:

sudo ufw allow 6053/tcp

sudo ufw enable


Now some of the devices I could either ssh into or connect to from my
desktop, are either not showing or not available. Neither can I connect
to my desktop from any other computer or device, which I could before.

Is there a way to get back to where I was before I changed things.....doh!
RobH
2020-12-09 15:25:30 UTC
Permalink
Post by RobH
I have been trying to sort out a wifi device not connecting to a port
192.168.0.22:6053
https://www.ibm.com/support/knowledgecenter/STXKQY_5.0.5/com.ibm.spectrum.scale.v5r05.doc/bl1adv_firewallportopenexamples.htm
sudo iptables -A OUTPUT -p tcp -d 192.168.0.35/24 --sport 6053 -j ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 --sport 6053 -j
ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 6053 -j ACCEPT
sudo ufw allow 6053/tcp
sudo ufw enable
Now some of the devices I could either ssh into or connect to from my
desktop, are either not showing or not available. Neither can I connect
to my desktop from any other computer or device, which I could before.
Is there a way to get back to where I was before I changed things.....doh!
Update:
I have managed to fix the problem:

sudo sed -i "/\\[global\\]/a client min protocol = SMB3" /etc/samba/smb.conf

I rebooted as well after doing the above.
I googled my own question and found a link with same.

I have no ideas as to why it went wrong after I did what I did yesterday.
RobH
2020-12-09 15:34:07 UTC
Permalink
Post by RobH
Post by RobH
I have been trying to sort out a wifi device not connecting to a port
192.168.0.22:6053
https://www.ibm.com/support/knowledgecenter/STXKQY_5.0.5/com.ibm.spectrum.scale.v5r05.doc/bl1adv_firewallportopenexamples.htm
sudo iptables -A OUTPUT -p tcp -d 192.168.0.35/24 --sport 6053 -j ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 --sport 6053 -j
ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 6053 -j ACCEPT
sudo ufw allow 6053/tcp
sudo ufw enable
Now some of the devices I could either ssh into or connect to from my
desktop, are either not showing or not available. Neither can I
connect to my desktop from any other computer or device, which I could
before.
Is there a way to get back to where I was before I changed
things.....doh!
sudo sed -i "/\\[global\\]/a client min protocol = SMB3"
/etc/samba/smb.conf
I rebooted as well after doing the above.
I googled my own question and found a link with same.
I have no ideas as to why it went wrong after I did what I did yesterday.
Nope, I spoke too soon.
Although my Ubuntu desktop can see the other connected devices, I still
can't access the shared folders on them, and my desktop is not
accessible from other devices or machines.

Oh dear!
Jonathan N. Little
2020-12-09 16:28:59 UTC
Permalink
Post by RobH
I have been trying to sort out a wifi device not connecting to a port
192.168.0.22:6053
https://www.ibm.com/support/knowledgecenter/STXKQY_5.0.5/com.ibm.spectrum.scale.v5r05.doc/bl1adv_firewallportopenexamples.htm
sudo iptables -A OUTPUT -p tcp -d 192.168.0.35/24 --sport 6053 -j ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 --sport 6053 -j
ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 6053 -j ACCEPT
sudo ufw allow 6053/tcp
sudo ufw enable
Now some of the devices I could either ssh into or connect to from my
desktop, are either not showing or not available. Neither can I connect
to my desktop from any other computer or device, which I could before.
Is there a way to get back to where I was before I changed things.....doh!
If you disable firewall does functionality return?

sudo ufw disable
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
RobH
2020-12-09 16:44:03 UTC
Permalink
Post by Jonathan N. Little
sudo ufw disable
Unfortunately no it doesn't return to what it was.
RobH
2020-12-09 16:58:27 UTC
Permalink
Post by RobH
Post by Jonathan N. Little
sudo ufw disable
Unfortunately no it doesn't return to what it was.
I have another Ubuntu 18.04 machine here and I compared the smb.conf on
my desktop with the other one. In the global section, where I had
min protocol = 3

In the other smb.conf file there was no entry at all, and that machine
could see all other connected devices and access the shared folders.

So I # out the min protocol= 3 line, and rebooted.

Now, so far anyway, all seems to be back to normal. That coupled with
disabling the firewall did the trick.

Thanks
Jonathan N. Little
2020-12-09 22:01:44 UTC
Permalink
Post by RobH
Post by RobH
Post by Jonathan N. Little
sudo ufw disable
Unfortunately no it doesn't return to what it was.
I have another Ubuntu 18.04 machine here and I compared the smb.conf on
my desktop with the other one. In the global section, where I had
min protocol = 3
In the other smb.conf file there was no entry at all, and that machine
could see all other connected devices and access the shared folders.
So I # out the min protocol= 3 line, and rebooted.
We that is an invalid value. It should be:

min protocol = SMB3

But you properly do not want that that is Window 8 - 10 version SMB 3.x
You probably want SMB2 which covers Vista -7 No some NAS and Phone apps
only support SMB1 so the setting would be

min protocol = NT1

TIP: man smb.conf
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jonathan N. Little
2020-12-09 22:04:05 UTC
Permalink
Post by RobH
So I # out the min protocol= 3 line, and rebooted
BTW you do done have to reboot:

sudo systemctl restart smbd
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
RobH
2020-12-09 22:49:19 UTC
Permalink
Post by Jonathan N. Little
Post by RobH
So I # out the min protocol= 3 line, and rebooted
sudo systemctl restart smbd
Yes I did that, but doesn't samba start anyway after a reboot
Jonathan N. Little
2020-12-10 01:02:14 UTC
Permalink
Post by RobH
Post by Jonathan N. Little
Post by RobH
So I # out the min protocol= 3 line, and rebooted
sudo systemctl restart smbd
Yes I did that, but doesn't samba start anyway after a reboot
Yes, but you do not need to reboot in order to "fix" samba.
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Bobbie Sellers
2020-12-09 17:03:22 UTC
Permalink
Post by RobH
Post by Jonathan N. Little
sudo ufw disable
Unfortunately no it doesn't return to what it was.
No backups of that working system?
--
bliss dash SF 4 ever at dslextreme dot com
RobH
2020-12-09 17:27:48 UTC
Permalink
Post by RobH
Post by Jonathan N. Little
sudo ufw disable
Unfortunately no it doesn't return to what it was.
    No backups of that working system?
Yes there is , but I hoped it would be a simple thing to correct, which
it was once I knew what to do.
Brian Gregory
2020-12-11 00:13:51 UTC
Permalink
Post by RobH
I have been trying to sort out a wifi device not connecting to a port
192.168.0.22:6053
https://www.ibm.com/support/knowledgecenter/STXKQY_5.0.5/com.ibm.spectrum.scale.v5r05.doc/bl1adv_firewallportopenexamples.htm
sudo iptables -A OUTPUT -p tcp -d 192.168.0.35/24 --sport 6053 -j ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 --sport 6053 -j
ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 6053 -j ACCEPT
sudo ufw allow 6053/tcp
sudo ufw enable
Now some of the devices I could either ssh into or connect to from my
desktop, are either not showing or not available. Neither can I connect
to my desktop from any other computer or device, which I could before.
Is there a way to get back to where I was before I changed things.....doh!
This linux box is your gateway/router ?
--
Brian Gregory (in England).
RobH
2020-12-11 09:20:56 UTC
Permalink
Post by Brian Gregory
Post by RobH
I have been trying to sort out a wifi device not connecting to a port
192.168.0.22:6053
https://www.ibm.com/support/knowledgecenter/STXKQY_5.0.5/com.ibm.spectrum.scale.v5r05.doc/bl1adv_firewallportopenexamples.htm
sudo iptables -A OUTPUT -p tcp -d 192.168.0.35/24 --sport 6053 -j ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 --sport 6053 -j
ACCEPT
sudo iptables -A OUTPUT -o eth1 -p tcp -d 192.168.0.35 6053 -j ACCEPT
sudo ufw allow 6053/tcp
sudo ufw enable
Now some of the devices I could either ssh into or connect to from my
desktop, are either not showing or not available. Neither can I
connect to my desktop from any other computer or device, which I could
before.
Is there a way to get back to where I was before I changed
things.....doh!
This linux box is your gateway/router ?
No it isn't

Continue reading on narkive:
Loading...