Search code examples
node.jsip-addressibm-cloud

How to block specific IP address in Bluemix?


I want to block some IP addresses from accessing my website, which is hosted over IBM Bluemix with Node.js runtime.

However, I don't know how I can block the list of IP addresses there. The only solution I came up with is not configure on Bluemix but write it on my Node.js app, such like:

function(req, res) {
    req.ip // use this property to diverge, depending on the user's IP address
}

However, I would like to get it done on Bluemix part, not on my node.js app. Is it feasible to do it?

For your information, this was not feasible in Heroku, another PaaS. Maybe is it feasible in AWS, IaaS, right?


Solution

  • Blocking specific IP addresses is not possible as part of your described scenario. This is related to any PaaS as they are dealing with apps and services, not the network infrastructure itself.

    There are slightly more options when operating on Bluemix Dedicated or Bluemix Local. The Secure Gateway service has options for blacklisting IP addresses, but that feature is used to secure your on-prem resources, not the app.