User avatar
midola
Posts: 19
Joined: Fri Jul 01, 2016 8:58 pm

Ssh but no internet?

Fri May 24, 2019 8:08 pm

I have a router on xxx.xxx.xxx.1
I have a pi-hole on xxx.xxx.xxx.25
and I have my Pi zero W on xxx.xxx.xxx.217

I can ssh into the zero on 217 but I don't have internet on it.

Also I can't ping with it to 8.8.8.8

ip route gives

Code: Select all

default via 192.168.178.25 dev wlan0 src 192.168.178.217 metric 302
192.168.178.0/24 dev wlan0 proto kernel scope link src 192.168.178.217 metric 302
Can anybody help me out here?

Ernst
Posts: 1141
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Ssh but no internet?

Fri May 24, 2019 8:26 pm

Please provide full information so that we can try to help.
We want to know what, we want to know how, and we want to know where.
And we want to know the full information when it comes to internal addresses.
If you do not understand it will be a good exercise to do some research in the forum to see what others users have provided.

What I would like to point out you forgot a few xxxx in the routing information.
The road to insanity is paved with static ip addresses

Andyroo
Posts: 3373
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Ssh but no internet?

Fri May 24, 2019 8:29 pm

No need to hide local LAN addresses - we can not get to them from the outside (a clue is in the code block :) ) and if they are two sub-nets it makes life very difficult to diagnose bits.

I would check the contents of your /etc/dhcpcd.conf file first.

Do you have anything like:

Code: Select all

interface wlan0
static ip_address=192.168.178.217/24
static routers=192.168.178.1
static domain_name_servers=192.168.178.25
I think (but new to Linux networking) that your Pi-hole has been set as the gateway rather than the router - Pi-hole is only the DNS server
Need Pi spray - these things are breeding in my house...

Andyroo
Posts: 3373
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Ssh but no internet?

Fri May 24, 2019 8:34 pm

I would also add - how is DHCP set up on the network? i.e. is it under control of the router or Pi-hole?

I found pointing my router at pi-hole for DNS caused lots and lots of issues - so much so, I moved DHCP off the router and on to pi-hole to issue the info correctly to clients on the network.

Talking with the router tech support - they think the code in the router REQUIRES an external DNS server and goes a 'bit odd' to quote when its internal...
Need Pi spray - these things are breeding in my house...

Andyroo
Posts: 3373
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Ssh but no internet?

Fri May 24, 2019 8:34 pm

Ernst wrote:
Fri May 24, 2019 8:26 pm
Please provide full information so that we can try to help.
We want to know what, we want to know how, and we want to know where.
And we want to know the full information when it comes to internal addresses.
If you do not understand it will be a good exercise to do some research in the forum to see what others users have provided.

What I would like to point out you forgot a few xxxx in the routing information.
:lol:
Need Pi spray - these things are breeding in my house...

User avatar
midola
Posts: 19
Joined: Fri Jul 01, 2016 8:58 pm

Re: Ssh but no internet?

Fri May 24, 2019 8:41 pm

Oh, sorry I'm a fool with this, but I figured it out what went wrong.
With setting up a static adress I entered the pi-hole's ip instead of the router's ip.
By deleting it from etc/dhcpcd.conf it worked again.

And I found out I could define a static dhcp lease to the zero in the pi-hole so I guess I never needed it in the first place.

problem solved, but tx for thinking with me

Andyroo
Posts: 3373
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Ssh but no internet?

Fri May 24, 2019 10:08 pm

midola wrote:
Fri May 24, 2019 8:41 pm
Oh, sorry I'm a fool with this, but I figured it out what went wrong.
With setting up a static adress I entered the pi-hole's ip instead of the router's ip.
By deleting it from etc/dhcpcd.conf it worked again.

And I found out I could define a static dhcp lease to the zero in the pi-hole so I guess I never needed it in the first place.

problem solved, but tx for thinking with me
That’s a better place as you can back them up unlike my darn router. Well technically I can back them up but only restore it to the same bit of kit - not a replacement unit...

Glad your up and running :)
Need Pi spray - these things are breeding in my house...

Return to “Troubleshooting”