Home > Enterprise >  Raspberry pi refusing connection to bottle server
Raspberry pi refusing connection to bottle server

Time:07-07

I'm trying to host a bottle server on my raspberry pi (4, zero w or zero 2 with newest pi os) to supply some configuration for a project.

The raspberry pi itself will not have internet access but will be its own wifi accespoint. i set it up in the way the docs describe (search for "Setting up a Routed Wireless Access Point") I have skipped the "Enable Routing and IP Masquerading" step because i don't need traffic to be rerouted to another network

The tutorial works fine and i'm able to connect to the hotspot. I'm also able to run the bottle server example and connect to it locally.

However, i'm not able to connect to it from a device that is connected to the hotspot. i'm getting an ERR_CONNECTION_REFUSED(when supplying the ip of the raspberry and port of the bottle server to the browser)

I don't really know where to start looking Is there a firewall setting i missed? Should i have done the "Enable Routing and IP Masquerading" step? Is there something entirely different i need to look at?

Can someone point me in the right direction?

CodePudding user response:

Try starting bottle on the 0.0.0.0 interface rather than localhost. That makes it listen for incoming connections on all interfaces, whereas if you start on localhost it only listens for connections from the local host.

  • Related