I am running a Heroku app. I am supposed to answer the question "what is your server IP address" by some customer. I am used to figuring out the IP addresses through pinging my domains.
With Heroku, I have two issues here:
When I ping my custom domain the IP address I get is different from when I ping the original app domain.
The ping does not go through.
Examples:
myhost:~ 1111$ ping fstrk.herokuapp.com
PING us-east-1-a.route.herokuapp.com (23.23.207.27): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
^C
--- us-east-1-a.route.herokuapp.com ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss
myhost:~ 1111$ ping dashboard.fstrk.io
PING dashboard.fstrk.io.herokudns.com (54.243.243.251): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
^C
--- dashboard.fstrk.io.herokudns.com ping statistics ---
5 packets transmitted, 0 packets received, 100.0% packet loss
I have poor knowledge of networking so I am probably doing this wrong. What is the correct way to obtain the current IP address, and why are they different although they point at the same app?
Is your customer looking to whitelist your IP address in a firewall? If so you might need to setup your Heroku app with a static IP address. Heroku is by design a load balanced system. Depending on traffic, load, etc. you might not be running your app from the same IP address everytime. If you do need a static IP for your app, check out below:
Depending on the configuration of your Heroku App you can use Proximo to set a dedicated IP address for your app. Otherwise your app is running on a shared system and there is no guaranteed way to have an ip address.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With