How to make iron web server accessable at my ip

Hi all.
Im working through the iron lib and i realy want to know if it is possible to make my iron server accessible at my ip. For example:
'Iron::new(some_routing).http("192.234.0.90:80").unwrap();'
Just panics! but on localhost:80 its ok.:
'Iron::new(some_routing).http("localhost:80").unwrap();' // OK!
What is the solution for my problem????
Thanks.

Try with

Iron::new(some_routing).http(“0.0.0.0:80”).unwrap()

i have already. It is the same as localhost, but by ip it is unreachable. (((((

same post as this one?

https://users.rust-lang.org/t/how-to-make-iron-server-accessable-to-others-by-my-ip/15121

2 Likes

I ve decided to copy it in to get more chances for a reply.

Please don't do this, that is double-posting, and increase noise in the default "all categories" view that most people use.
There is only a single forum, and the "categories" are more like tags, not limits on visibility.

3 Likes

Couple of things:

  • Binding to 0.0.0.0 is "any IP address" rather than binding to a particular one, try this out.
  • Binding to a port less than 1024 on linux will require superuser privileges - try binding to 0.0.0.0:8080 and pointing your browser to http://localhost:8080/
  • If these still fail - check out if localhost is actually your loopback device - $ dig localhost should show 127.0.0.1
  • To eliminate the browser as an issue when the service is running, try curl'ing the host / port and see if you get a response.
1 Like

Thanks very much. Im not sure but im the dummiest of the dummiest because
im on grey ip. I'l try my project out on the white one see if it works.