Can't connect to RPi through ethernet switch [solved]

I recently got an Ethernet switch. I'm trying to ssh into my raspberry pi from my main PC both connected to the switch but only get Connection refused every time. The pi shows up if i do a IP scan of my network. Ive tried searching for guides on the web and forums but found nothing that helps.

what is running on the pi?

Just the normal Raspbian with Pi-Hole added. I can connect if I plug it into my router in the other room but id like it to be on the switch.

so only when trough the switch it says connection refused? and you know everything else is correct like ip adress etc...?

A switch should not have effect on the network. Unless something changed in my definition of a switch.

This is how the setup changed


The IP for the PC and pi are still the same. I can ping the pi but can't ssh or connect to the web server running on the pi.

Yeah i was afraid for this setup. Theoretically it should work. What type switch is it? but right now i got no clue. Maybe search on the internet you switch type. maybe a config is wrong or maybe somebody else here know its.

You don't have another device to test?
I got no clue but something in my head is saying i have seen this somewhere before.

Impossible. A switch is a layer 2 device. Unless it is a managed switch, with configurable port security. You need to enable ssh-server on the PI to be able to ssh into it remotely.

What's impossible? ssh is enabled on the pi as I was able to ssh into it before when it was connected to the router and I didn't change anything on the pi just unplugged and moved to the other room and connected to the switch. It still has the same static IP and ssh should be on.

what switch is it?
Model Number, manufacturer, etc.

1 Like

same what i wanted to ask, because something is wrong with that switch, but wasn't sure.

Hmm might be a long shot but can you set the IP address on dynamic and check if it works?

D-Link DES-105
I'll try setting the IP to dynamic

I did a fresh install on the pi and now it connects. I don't know what was wrong with the previous install. Thanks for the help anyway. :)