Static IP Address with Heroku (not Proximo)

You can use QuotaGuard Static Heroku add-on.

QuotaGuard can be attached to a Heroku application via the command line:

$ heroku addons:add quotaguardstatic

After installing, the application should be configured to fully integrate with the add-on.
When you sign up you will be provided with a unique username and password that you can use when configuring your proxy service in your application

A QUOTAGUARDSTATIC_URL setting will be available in the app configuration and will contain the full URL you should use to proxy your API requests.
This can be confirmed using the next command:

$ heroku config:get QUOTAGUARDSTATIC_URL
http://user:[email protected]:9293 

All requests that you make via this proxy will appear to the destination server to originate from one of the two static IPs you will be assigned when you sign up.

You can use A simple HTTP and REST client for Ruby for detecting your IP:

$ gem install rest-client

Next, you can run the below example in an IRB session and verify that the final IP returned is one of your two static IPs.

$ irb

>require "rest-client"

>RestClient.proxy = 'http://user:[email protected]:9293'

>res = RestClient.get("http://ip.jsontest.com")

That’s it:)

Leave a Comment