Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: Santos on May 08, 2023, 05:30:22 AM
-
Hello
I was trying to protect my home network by getting the Cloudfare's DNS server (1.1.1.1) to avoid malware.
But ever since I changed the DNS address on my router I'm unnable to connect to ssh server within my LAN network.
Got computer1 with sshd, it works, logging into localhost works.
Computer2 will try to access computer1 through ssh. But it doesn't work.
I thought the family DNS would be like prohibiting any local IP to be accessed, but I reversed changes (DNS is 0.0.0.) but still cannot connect to any ssh session.
ssh works on both computer, I used a third computer to test connection and it worked but with my tiny core box is not giving any chance.
EDIT:
Coreplus 12 x64
-
Resolved!
I tried changing different settings but I just unplug the router and plug it back in. :)
-
Resolved!
I tried changing different settings but I just unplug the router and plug it back in.
just to clarify/confirm...you used the electrical supply cord plug to remove and then reconnect to your mains electricity(so a cold-boot for your router unless it has some internal/auxillary power source)?
-
Hello
Yes, a cold boot. I unplug the power cable. Wait ~20 seconds and plug it back in. No internal power source in the router, I checked and there is no battery compartment.
-
And one more thing, when connecting to the ssh server it will check with reverse dns lookup if the ip correspond to the hostname and it take some time to do that. If you disable that feature first in the sshd_config
with UseDNS no
and start the daemon sshd with -u0, you should see some performance to connect. It doesn't need to timeout.
And one more great fature with sshd you can check what being set with this command.
sudo sshd -T | grep -i UseDNS
You should also see that the sshd server internally not using some uppercase letters in the config.
-
@patrikg
1. Does that means that changing the DNS server on my router could block me from accessing other LAN machines if sshd not properly set up?
2. If I understand correctly, the DNS lookup that is done by the sshd server uses the DNS configured on the router, and because I used a Cloudfare 'family' address (1.1.1.2) I could get blocked from local sshd instances, correct?
3. And by setting UseDNS to 'no' should be fixing that, right?
EDIT:
I verified and on my machine, the option was set to 'no'.
useDNS no
-
Since a router reboot helped, it was likely a router glitch and nothing to do with the DNS.
-
Like curaga says that not the problem, the problem like you said stays somewhere else. If you started over and the problem was over,,maybe the problem was arp or something else.
And "usedns no", I think this was not default before.
I don't know if the sshd server use the -u0 as start parameter, i don'r know how tc start the sshd.
-
Hey there.
I did a little troubleshooting on my machine. Turns out it wasn't the router nor the DNS server.
I have a laptop. Sometimes I used it with WiFi and other times with a wired connection.
This is what happened.
I thought that it will be good to avoid any conflicts between internet interfaces, so before I plug the Ethernet cable, I ran the wifi.sh utility, it asked me if I wanted to disconnect and rescan and I said 'yes'. But I do not reconnect back again, instead y close the utility (select 'q' as an answer to exit).
I get access to the internet, but I do not know what happens since I'm blocked from accessing ssh server in my LAN.
If instead, just plug the Ethernet cable without messing with the wifi.sh script and run sudo udhcpc to get internet connection with the eth0 interface, everything works. Internet and ssh connections.
So I'm guessing the wifi.sh script does something to the interfaces that allows me to access the internet but somehow routes LAN traffic in an odd way.
-
The default utilities can't handle complex setups like two simultaneous network interfaces, they only expect one. They clear the routes and set new ones.
-
I'm happy to hear that.
I was doing it that way since I wanted my computer to stay without any internet connection. Just to keep it excluded from the internet when I'm not using my laptop.
So, knowing that by running sudo udhcpc is enough to have eth0 up and running is good for me. It means that, after disconnecting the Ethernet cable, my computer will be truly isolated from the internet.
I consider this issue resolved, thank you all for your responses!
Take care. :)