I want to connect to my node js application by ipaddress - openshift

I want to connect to my nodejs application through ipaddress which i have deployed on openshift.
following is the url of my app
http://myapp-nnms.rhcloud.com/
is this possible to connect through ip address

Usually these shared hosting servers use CNAME to resolve to your server. Means there will be many such server running for same IP, router decides to connect to your server based on host name. So its not possible. If you used your own dedicated server its possible.

Related

Redirect FTP requests

I have an application that connects to a domain using port 3306 (MySQL) and port 21 (FTP).
I've had to move the MySQL hosting to another server (AWS) and need to keep the FTP server as is.
Now the problem I have is that the application doesn't allow you to specify a different server name for each service so it's trying to connect via FTP to the MySQL server in AWS.
Is there any way to setup Windows to redirect certain ports only to a different IP?
Is there a way to set up the new server to bounce FTP requests back to the older server?
Alternatively is there a way to setup the domain DNS to point MySQL port requests to the MySQL server?
One of the ways to fix this is, install a TCP proxy server (Eg. nginx, haproxy) on the new server and pass the request to the old server based on the request type.

Connect localhost Mysql from Docker .net core

I have working WebAPI in .net core in Docker. I want to deploy this API on AWS EC2 instance with local mysql database working with other web app.
How can I reach this Mysql from inside docker?
Locally I can do it by using my private ip addres in
=> optionsBuilder.UseMySql(#"Server=$my_local_ip;database=db_name;uid=user;pwd=pass;");
Ho to determine which $my_local_ip should I use in order to connect to DB?
But while using the private ip on EC2 I got error while sending request that it can't connect to any MYSQL host.
For MySQL server you generally have to specify the port to connect to, as each instance on the same server uses a different port.
Use --network=host flag while starting the Web API container and use the localhost in you connection string as the host name. This will enable the Docker container to access the host network. Hence you can access MySQL Database from the container.
Note: This is an insecure for running containerized workloads. Click Here to learn more

Fail to access remote server from another remote server

I have a remote server to which I need to connect to. Let's say the hostname is Remote01. From my local, I am connecting to it via a VPN (Juniper). I have another remote server in my intranet which is an RHEL server. I loginto this RHEL server (let's call it Remote02) and in the command line I type:
ping Remote01
This returns
ping unknown host Remote01
Do I need a VPN installed in Remote02 as well?
You would need to install the VPN client on Remote02 as well in order to reach Remote01.
Or, if you're comfortable changing the routing table and firewall of your own server/machine, you can changing the routing table on Remote02. For the network of Remote01, instead of going to the default gateway, point it to your local machine. On your local machine, modify the firewall to accept incoming packets from Remote02 to forward to to Remote01 via the existing VPN connection.
I would say the first solution is much simpler. But if for some reason, the VPN client is not available on Linux then you can try the second solution.

How to access remote MySQL database from Heroku?

We have a legacy application running in a shared hosting service (JustHost). Due to which I am not able to write any newer technology apps easily.
I have created a test heroku app to talk to the MySQL database that is in the remote server. I have followed the steps from the Heroku side, with respect to adding the remote db url, etc.
But my hosting service allows remote access only from whitelisted IP address (as it should). How does one get a public IP (or IP range) for a Heroku app?
You can try some sort of proxy node with a static IP that securely communicates to your Heroku app
Did you try to search heroku addons for providing static IP? or try this one https://devcenter.heroku.com/articles/quotaguardstatic

Heroku Node.js Remote Mysql Database IP Address

I have a remote Mysql database that I am connecting to through Node.js on Heroku. My MySql host (bluehost) wants me to input IP Adresses of all remote MySql connections.
Heroku doesn't have a dedicated IP for my app, so how can I connect to it? Bluehost mentions something about a Class C IP on its page, but I'm not sure Heroku has one...
Also, I believe I already have all of the heroku environment variables set up correctly:
(heroku config:add EXTERNAL_DATABASE_URL=...)
Thanks :D
Here's what blue host says about dynamic ip addresses:
Dynamic IP Addresses
Having a dynamic IP address means that the connecting IP address can
change periodically depending on the Internet Service Provider (ISP).
You must update the connecting IP in Remote MySQL every time it
changes.
from https://my.bluehost.com/cgi/help/89.
So at least each time you redeploy your application, you have a chance to get a different ip address. So this seems highly impractical. Why don't you use Heroku's MySQL offering?
You can use one of 'static ip' addons and proxy connection via that static ip - see this discussion