简体   繁体   中英

How can I get the Node-Red IP address on IBM Cloud?

I am working on IBM Cloud with Node Red.

https://username.eu-gb.mybluemix.net

I want to connect a sql db server but our firewall access deny from node-red. I need to know the IP address for this node-red application working on the server. How can I find that IP address to allow access to our server?

The actual machine that Node-RED is running on will be on a private network segment and will be accessing the outside via NAT so there is no way to interrogate the instance directly.

The only way will be to connect out to some other service that can tell where the connection came from. You could use a HTTP-Request node to access http://whatismyip.akamai.com/ which will return a text string with the external IP address.

If you trigger the request with a inject node and wire the output to a debug node it should show the ip address in the sidebar.

(Be aware that the address may change if your Node-RED instance is moved to a different machine by IBM Cloud's system)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM