Forums

python IP

Hello, I'd like my pythonanywhere web app to execute http requests on a server that has limited access. To allow my pythonanywhere web app on my server I need to specify a fixed IP. So my question is just; is the IP returned when pinging username.pythonanywhere.com is fixed or not?

Thanks

The IP address of username.pythonanywhere.com is currently fixed, though that may change in the future. However, even the current setup probably won't help -- outgoing requests from your web app come from the web server backend that's handling your app, and that will be different to what you see if you ping the app, can change quite frequently, even over the course of a day, as we load-balance apps around our cluster.

Thanks for your answer, but do you think there is a way to allow pythonanywhere on our server ? Maybe with a fixed canonical name ?

Not really. If you have control of the machine, it would probably be better to implement some sort of authentication instead of trying to use the source of a request to act as a (not very good) access control mechanism.