ERR_CERT_AUTHORITY_INVALID error while communicating from angular server(letsencrypt cert installed) to node server(self signed certs installed) - mean-stack

I have my angular server installed with let'sencrypt certificate issued with a host name. and back end node servers are running with public ips with self signed certificates installed.
am getting this error(net::ERR_CERT_AUTHORITY_INVALID) while accessing my application in the browser. and browser also shows "not secure".
thanks for the help.

I edited my answer.
If you can setup OpenSSH server on your node.js back-end, then you can make your angular server forward requests through SSH tunnel to the node.js server.
First, setup a daemon to run the following command:
ssh -N -L <port-#A>:<port-on-node-server> <node-server-address>
This forwards connection to port-#A on the angular server to the specified port on the node server. The first time connection is made, the public key of the node server is saved. I recommend setup authorized keys on the node server, so that your angular server can communicate with the node server using public-key cryptography.

Related

How to set up ssl certificate on apache server that is running on aws ec2 WIndows server instance?

I have already set up a DNS record to point my domain to the ec2 instance IP. Next, I don't know how to configure an ssl certificate on Apache that is running on a Windows server. I already have ssl certificate details.
Check out for the conf/httpd.conf in apache that is where you need to edit and add ssl..checkout this link but now you can use letecrypt certificate or any other instead of the one in the link..Or you can use any other the process is the same https://www.entrust.com/knowledgebase/ssl/how-to-configure-an-entrust-ssl-certificate-on-apache-for-windows

External IP + SSL

how can i use the external ip of my centos7 instance with https, like for example https://external_ip to open an application like https://external_ip:Port/my_application
Generate a self-sign certificate using openssl.
Check this out here:
https://stackoverflow.com/a/10176685/9662626
Open a https port on your webserver. Set the certificate in the config (I can't be specific here because I don't know about your operating system and your choice of web server). Finally setup a reverse proxy to proxy the web server port to your app port.

No response while using ngrok to expose a local web server

I'm trying to expose my local web server IIS Express using ngrok.
Followed steps from https://ngrok.com/docs and fired the tunnel, but can't get response.
Screenshot - ngrok fired
I'm using Visual studio via IIS Express. (Debug mode, local website works well.)
If local website not started, access to XXXXX.eu.ngrok.io will get error directly:
Failed to complete tunnel connection
The connection to https://2713343d.eu.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:44320.Make sure that a web service is running on localhost:44320 and that it is a valid address.The error encountered was: dial tcp [::1]:44320: connectex: No connection could be made because the target machine actively refused it.
No errors shows on Ngrok's Web Interface too.
Is there any way to check where the problems are? or see ngrok's log?
Indeed it works with http, but it is strongly recommended to work with https, so you should properly start ngrok in order to work with https:
ngrok http -host-header=localhost https://localhost:{your_IIS_express_port}
After this you should be able to access your URL:
https://{id}.ngrok.io
Credits
Try make your service as http, not https.

Using SSL Cert for ngrok dev environment

I am working to setup my application to watch calendar events through Google's Calendar API. In doing so I must setup a "Push" endpoint on my server that has a valid SSL certificate (not self-signed).
My production environment is running on Heroku so setting up an SSL cert was easy using Expidited SSL. I have two CNames setup in GoDaddy, one for my production application and one for my development environment tunneled through ngrok. I'm using the paid ngrok feature of white labeled domain tunneling (dev.mydomain.com).
Host Points To
www saga-1234.herokussl.com
dev ngrok.com
The problem is that my ssl certificate is recognized when you hit the production application (www.mydomain.com), but it uses ngrok's certificate when you visit the development application (dev.mydomain.com).
How can I setup my ngrok tunnel to use my ssl certificate?
Ngrok's white labeled domain does not support HTTPS if you are using your own domain. Simply because it serves it's own certificate, where you need to serve your domain's. That's why you are getting certificate mismatch issue.
Here's what you could do to watch calendar events on your dev machine:
Point ngrok.mydomain.com to another server, let's say a new EC2
micro instance
Point wildcard CNAME to ngrok.mydomain.com
Compile ngrok server and client to use your certificate (rather than
ngrok.com)
Run the ngroku-server on EC2 instance
On your dev machine config the client to use ngrok.mydomain.com instead of ngroku.com
Run ngrok -subdomain=dev 80
Your local dev machine's 80 port should be accessible via https://dev.mydomain.com
This is really cool and is very helpful when debugging Google's webhooks, which require valid HTTPS and a verified root domain name.
Another interesting trick is to use CloudFlare's universal SSL to have a valid https://dev-machine.mydomain.com pointing to your dev machine without purchasing a certificate. The steps are exactly the same except that you need to issue your own certificate for ngrok client-server communications and use CloudFlare's Flex SSL for dev-machine.yourdomain.com.
ngrok has a new feature that tunnels and terminates SSL. Thus you can use your own domain and HTTPS. No need to open ports in your router or PC. They call it TLS Tunneling. The following is a link to a GitHub repos that describes how to do it.
How to use your own domain to access your home PC over the internet. Use HTTPS without raising SSL errors.

How to add a certificate on a windows service

I have a custom soap-service for windows server which listens on a portnumber (for ex. 1024). When I make a call to this service using http:// (ip or domain):1024 the service works well.
When I try to make the same call to https:// (ip or domain):1024 I get the following response:
SSL connection errorUnable to make a secure connection to the server.
This may be a problem with the server, or it may be requiring a client
authentication certificate that you don't have.
When I try to connect to the same ip without the portnumber my IIS responds without any issue (I have a certificate installed).
Any help would be welcome!
Let's clarify:
a)-- Your delphi code is directly opening a socket and listening on a port
or
b)-- Your delphi code is hosted by IIS, and IIS is listening on a port
If it is 'a', then you need to add SSL support to your delphi app, so that your delphi app can speak SSL to clients. E.g. if you use Indy, or remote objects, or whatever, then your SSL work will happen at that level.
If it is 'b' then you go through the standard process of IIS SSL management (e.g. create a request file in IIS, then purchase a cert, then install the cert in IIS.... http://support.microsoft.com/kb/299875 )

Resources