Daniel
Daniel

Reputation: 709

Access server on raspberry pi on local network

I am running a server on my raspberry pi (rpi) on port 8088.

The server is rust/actix and I run it with cargo run.

I ssh into the rpi with ssh [email protected] and I run curl localhost:8088. The server returns 200 OK and an index.html file. As expected.

I use hostname -I to find the IP address of the rpi 192.168.0.25 and this one 172.17.0.1.

When I go to another device on the same local network and run curl 192.168.0.25:8088 or curl raspberrypi.local:8088 I get ERR_CONNECTION_REFUSED

If I run curl 172.17.0.1:8088 I get ERR_CONNECTION_TIMED_OUT

How do I access the server running on my raspberry pi from another machine on my local network?

Upvotes: 2

Views: 1908

Answers (1)

Daniel
Daniel

Reputation: 709

Thanks to the answers in the comments I noticed I had bound the ip to localhost.

By binding it to 0.0.0.0, the problem got fixed and I can access the server externally

Upvotes: 1

Related Questions