1

I have set up a Pi 3 as a web server on my college's WPA2 Enterprise network, with a static IP configured in /etc/dhcpcd.conf.

I've connected it to the Wi-Fi manually by editing /etc/wpa_supplicant/wpa_supplicant.conf (and am using a CA certificate). It stays connected to the Wi-Fi consistently, so I can always access it remotely through a RealVNC cloud connection.

Since the Pi is set up as a web server, students whose laptops are connected to the same Wi-Fi network should be able to access it simply by entering the IP address in their web browser. However, most of the time the IP address is not accessible, and attempting to load it in a browser results in a "connection timed out" error.

If I connect to the Pi through VNC over the cloud, then the IP address loads in a web browser instantly, and continues to work for about 10 minutes or so afterwards. It seems like there is a timeout on accessing the IP address over the Wi-Fi, but somehow starting a cloud connection enables it temporarily.

I can't do pings on my school's network, but I tried running a traceroute command on the Pi every minute to see if that kept the IP address accessible, and it didn't. I'm not sure what is affecting whether the IP address can be accessed?

  • 1
    It's possible that the laptops are on a different subnet from the static IP address of the Pi3. Can you confirm that all hosts attempting to connect to the Pi3 through the Wifi are on the same subnet? – RubberStamp Nov 17 '17 at 22:07
  • @RubberStamp It seems like that might indeed be the problem. I discovered today that if a device's IP address has the same first 3 octets, then it can always connect to the Pi. If the third octet in the IP is different, the problem still exists, so it seems like there is a /24 subnet. – tjohnson Nov 30 '17 at 17:14
0

I figured out the cause of the problem and the solution was so simple it made me feel dumb.

When I configured the static IP address in /etc/dhcpd.conf, I used /24 as my CIDR number for some reason. Once I changed the CIDR subnet mask to /21, the webpage on the Pi started working across all 8 of the class C networks on my college's campus.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.