Successfully connected Pi to Wi-Fi but it still cannot connect to the internet

What is the problem?
So I built my Voron 2.4 about a month ago and everything worked just fine. Then, I woke up one day and I could not connect to the printer wirelessly anymore. The IP address shows up and everything but it is unable to connect unless I put a LAN cable between my PC and the Pi.

I tried pinging google and it said "ping: google.com: Temporary failure in name resolution"
I tried setting a static IP through the "dhcpcd.conf" file as well as the router's IP and the DNS
I set the network it was on to 2.4 GHz.

I have a Verizon router, everything is updated, but I know relatively little about Octoprint aside from about 10 hours of trouble shooting.

Here's the dhcpcd.conf file:

A sample configuration for dhcpcd.

See dhcpcd.conf(5) for details.

Allow users of this group to interact with dhcpcd via the control socket.

#controlgroup wheel

Inform the DHCP server of our hostname for DDNS.

hostname

Use the hardware address of the interface for the Client ID.

clientid

or

Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.

Some non-RFC compliant DHCP servers do not reply with this set.

In this case, comment out duid and enable clientid above.

#duid

Persist interface configuration when dhcpcd exits.

persistent

Rapid commit support.

Safe to enable by default because it requires the equivalent option set

on the server to actually work.

option rapid_commit

A list of options to request from the DHCP server.

option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes

Respect the network MTU. This is applied to DHCP routes.

option interface_mtu

Most distributions have NTP support.

#option ntp_servers

A ServerID is required by RFC2131.

require dhcp_server_identifier

Generate SLAAC address using the Hardware Address of the interface

#slaac hwaddr

OR generate Stable Private IPv6 Addresses based from the DUID

slaac private

static IP configuration:

interface wlan0
static ip_address=192.168.200.6
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 8.8.4.4

It is possible to fall back to a static IP if DHCP fails:

define static profile

#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

fallback to static profile on eth0

#interface eth0
#fallback static_eth0

Are you sure this is correct?
Your router is on another subnet then the pi

If that was a mistake use the correct subnet (either 200 or 1) and add /24 to the IP ( for example ip_address=192.168.200.6/24)

Thanks for the suggestion; I tried it out and it seems nothing has changed. Anymore ideas?

How does your dhcpcd.conf look now?

What happens when you ping an IP like 1.1.1.1 or 8.8.8.8?

When I ping 8.8.8.8, I get this every time since the Pi stopped working

pi@octopi:~ $ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.200.6 icmp_seq=1 Destination Host Unreachable

And it's not much different with 1.1.1.1

pi@octopi:~ $ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
From 192.168.200.6 icmp_seq=1 Destination Host Unreachable

Here's the dhcpcd.conf

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Most distributions have NTP support.
#option ntp_servers

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

# static IP configuration:
interface wlan0
static ip_address=192.168.200.6/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 8.8.4.4

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0

And when I put ifconfig in PuTTY,

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.145.254  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::e8ff:3d2d:9477:1dc4  prefixlen 64  scopeid 0x20<link>
        ether e4:5f:01:d6:36:89  txqueuelen 1000  (Ethernet)
        RX packets 250805  bytes 44108568 (42.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 260366  bytes 104691589 (99.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 12802  bytes 9244234 (8.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12802  bytes 9244234 (8.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.200.6  netmask 255.255.255.0  broadcast 192.168.200.255
        inet6 fe80::2d08:4e44:792e:3259  prefixlen 64  scopeid 0x20<link>
        ether e4:5f:01:d6:36:8a  txqueuelen 1000  (Ethernet)
        RX packets 269  bytes 17445 (17.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3223  bytes 299936 (292.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0**strong text**

Thanks again.

They're still in two different subnets.
The third number of the ip

No difference. Here's the updated dhcpcd.conf

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Most distributions have NTP support.
#option ntp_servers

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

# static IP configuration:
interface wlan0
static ip_address=192.168.1.52
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 8.8.4.4

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0

And an updated ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.145.254  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::e8ff:3d2d:9477:1dc4  prefixlen 64  scopeid 0x20<link>
        ether e4:5f:01:d6:36:89  txqueuelen 1000  (Ethernet)
        RX packets 538  bytes 56974 (55.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 222  bytes 60575 (59.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 175  bytes 17000 (16.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 175  bytes 17000 (16.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.52  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2d08:4e44:792e:3259  prefixlen 64  scopeid 0x20<link>
        ether e4:5f:01:d6:36:8a  txqueuelen 1000  (Ethernet)
        RX packets 16  bytes 1008 (1008.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 232  bytes 24854 (24.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Thanks again for the help!

Looks similar to I can't get Octopi/Octoprint to connect to the internet to download plugins which is a relatively new post as well. @PrintedWeezl can you combine posts?

1 Like

I'm losing my mind over this. I have started from scratch so many times, I've lost count, at least 15 from scratch: flash the sd card with the Pi imager. I have a dedicated pi for Octoprint, no other software will be used on this Pi. I have a 3.5a 5.1v power supply (also tested with 2 other 2.5a power supplies), a "power blocker" usb adapter to plug into an Ender 3 with cr touch and 4.2.7 board. I have used multiple, known-working, raspberry pi's but this happens on all of them.

I can ping local devices ie: 192.168, but a ping to google.com, or anything outside, 100% packet loss. I can access Octoprint, it works with the printer, hell, it connects to home assistant but it won't connect to the internet. I do have PiHole running (on another device), but I can't ping 1.1.1.1 or 8.8.8.8 either.

I am using a raspberry pi 3 a+ (yeah, all I could get), and a 4 B+ with 2gb. I apologize about not attaching the Systeminfo Bundle, my latest attempt has been ruined by desperate attempts to get this to work. Everything is the latest versions of firmware/software: Marlin 2.1.2, OctoPi 1.0.0, Octoprint 1.8.7.

Happy to answer any questions. I have searched these forums pretty hard, but this seems a little different than the others, not to say I could've missed something...

Any help is appreciated!

This sounds like a network routing/firewall blocking issue. Will probably need more details as to how your pihole is configured. Is it acting as your network's DHCP server or just set as DNS server from your router's DHCP server settings? Next question is are you able to resolve names at all, ie can you ping www.google.com and it convert to an IP address?

It's funny, I'm hoping you're right! I have my router pointing to the PiHole as the primary dns and 1.1.1.1 for secondary. My router (Unifi) handles the DHCP server. PiHole is a basic setup, aside from adding repositories for the ad blocking, I don't think anything else has been changed. ALSO, I have tried the option in PiHole disable blocking. I'd set it for 4 hours to give me time to diagnose without a potential second issue to fight.

Here are the pings:

pi@octoprint:~ $ ping google.com
PING google.com (142.250.191.142) 56(84) bytes of data.
^C
--- google.com ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 9358ms

pi@octoprint:~ $ ping 142.250.191.142
PING 142.250.191.142 (142.250.191.142) 56(84) bytes of data.
^C
--- 142.250.191.142 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5217ms

pi@octoprint:~ $

I tried 142.250.191.142 in my laptop and google popped up, surprise!

Thank you for the help!

Well, the DNS seems to be resolving perfectly fine. What about a trace route to google from the pi?

traceroute www.google.com

recent similar post in the networking section.

@mikem30303, Please provide the output from ifconfig, route, cat /etc/resolv.conf, and traceroute 1.1.1.1. You can start with screen -L, type the above commands, exit and post the text file screenlog.0.

Pardon my linux skillset, when I exit the "screen -L", how do I post to screenlog.0?

The results are:


Access OctoPrint from a web browser on your network by navigating to any of:

http://octoprint.local
http://192.168.1.200
http://[fd06:4f86:46fe:4a4f:a4d3:218:ee8c:cb0a]

https is also available, with a self-signed certificate.

This image comes without a desktop environment installed because it's not
required for running OctoPrint. If you want a desktop environment you can
install it via

sudo /home/pi/scripts/install-desktop

OctoPrint version : 1.8.7
OctoPi version : 1.0.0

pi@octoprint:~ $ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 56843 bytes 20392479 (19.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 56843 bytes 20392479 (19.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.200 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fd06:4f86:46fe:4a4f:a4d3:218:ee8c:cb0a prefixlen 64 scopeid 0x0
inet6 fe80::b647:717b:48bc:fef prefixlen 64 scopeid 0x20
ether b8:27:eb:ea:d8:fe txqueuelen 1000 (Ethernet)
RX packets 668003 bytes 213777548 (203.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 75672 bytes 13813896 (13.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

pi@octoprint:~ $ route
Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface
default unifi.localdoma 0.0.0.0 UG 302 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 302 0 0 wlan0

pi@octoprint:~ $ cat /etc/resolv.conf

Generated by resolvconf

domain localdomain
nameserver 192.168.1.1
pi@octoprint:~ $ traceroute 1.1.1.1
traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 60 byte packets

1 unifi.localdomain (192.168.1.1) 79.628 ms 79.761 ms 79.680 ms

2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 *^C
pi@octoprint:~ $

Thank you! (I added carriage returns on a few lines for this post to display correctly, if something doesn't look right)

I'm going to guess that are using SSH to connect to your RPi and I'm going to assume you are doing that from a Windows system using PuTTY. If I'm right, install WinSCP and with your SSH credentials, you can download and upload files from your RPi to your desktop.

Another suggestion... Use the </> tool to surround output from commands that you post to avoid having it "mangled" by the markdown being used here. You can use three backticks (```) at the beginning and end of multiline text.

Now to the meat of my answer. From the output of route it appears that the path to the outside world should go through 192.168.1.1, your unifi router. The output from traceroute shows that the first hop in the path is indeed 192.168.1.1 but the router doesn't pass the packet on to the next location.

Tell us more about your PiHole system. Output from the same commands I suggested before would probably be useful. Next, please detail the modifications you made to the unifi router to support the PiHole. Have you tried removing those to see if the symptoms change?

1 Like

FOUND IT!

I had a IP Group setup for ip cameras so they couldn't reach the internet. This was before I learned how to use VLANs, so these were the same untagged LAN that OctoPi is in. Guess which ip was in that group? So, I deleted this group and killed the Group firewall rule, no need since I block the entire VLAN for the cameras now, never again!

I can't say thank you enough, I've pulled my hair out on this one. I looked over the firewall rules, settings, scoured this forum, reddit, anything I could find... I bet I looked at that 30 times now, facepalm!

THANK YOU THANK YOU THANK YOU!

2 Likes

Alright. Here's the systeminfo bundle. I couldn't find any personal information so I think we're all good.

octoprint-systeminfo-20230307175046.zip (576.6 KB)

@Spencinator This topic got sidetracked by @mikem30303's similar issue but my advice to him applies equally to you. There is no need for a systeminfo bundle at this point because you network configuration is not working which is not an OctoPrint issue.

Please provide the output from ifconfig , route , cat /etc/resolv.conf , and traceroute 1.1.1.1 . You can start with screen -L , type the above commands, exit and post the text file screenlog.0 which you can copy off of your RPi by using WinSCP. Either zip the file and upload here or if you post the text, please use the </> tool in your reply.