ngrok https/tls tunnel not working? - ssl

I have a private web site like internal.mycompany.com which is only accessible within company's private network. I am trying to make this web site publicly accessible using ngrok. (I purchased a business plan). No matter what I tried I was not able to open the web site using https. http works fine but it is not ideal because web site normally redirects http requests to https. Then I tried similar thing using google.
Below is what my .ngrok2/ngrok.yml file looks like:
http-google-com:
addr: www.google.com:80
host_header: "rewrite"
subdomain: "http-google-com"
proto: http
https-google-com:
addr: www.google.com:443
host_header: "rewrite"
subdomain: "https-google-com"
proto: http
tls-google-com:
addr: www.google.com:443
host_header: "rewrite"
subdomain: "tls-google-com"
proto: tls
Then I run ngrok start --all and these are the results for each case when I browse the urls with my browser. All results are same for my internal web site.
http-google-com: When I browse http://http-google-com.ngrok.io/ (or https://) browser opens https://www.google.com. Seems like it some how redirects.
https-google-com: When I browse http://https-google-com.ngrok.io/ (or https://) I get "502 Bad Gateway" error
tls-google-com: When I browse https://tls-google-com.ngrok.io/ browser says that the ssl certificate is for "google.com" domains not for "ngrok.io". After adding security exception, browser displays google's classic 404 page which says "404. That’s an error. The requested URL / was not found on this server. That’s all we know."
UPDATE
I tried proto:tcp but it did not work also.
tcp-google-com:
addr: www.google.com:443
host_header: "rewrite"
subdomain: "tcp-google-com"
proto: tcp

Related

How to enable HTTPS/SSL on XAMPP (Windows) using ngrok reverse proxy?

I am using ngrok to make my local instance of Apache (running through XAMPP on Windows 10) viewable to the internet. It works fine to access http://example.com but if I try https://example.com it gives me a certificate error (because the certificate is issued for its ngrok.io domain). I know I can avoid the cert error by using a url that ngrok generates for https, but I'd rather use my own domain name. How can I avoid the certificate error and get my site to load over https? I've seen a few guides for enabling https/ssl on localhost, but that's not what I need to do - I need to enable it for example.com, not localhost, and as I said, serving the site over http is working fine.

How to use SSL-certificates to call https://localhost with apache2 on Raspberry Pi

So I am currently working on a project where I use the Instagram API to get some user Data onto my Localhost webpage on the Raspberry. The API however needs secure redirect uri (https). But when the API wants do redirect to https://localhost/instagram it says
"404 Not Found The requested URL /instagram was not found on this server. Apache/2.4.25 (Raspbian) Server at localhost Port 443"
In the url-bar it says "Not secure", the https part is marked red and is crossed out. When I test my stuff on another computer which has Xampp and Apache running everything works fine and even if I type https://localhost it redirects straight to localhost.
I found out that I might need a SSL certificate in order to make use of https links even if I'm running on localhost. But I don't really know how I should do this on my raspberryPi. There are already some SSL modules enabled inside the Apache2 folder.

requests to HTTPS work while requests to HTTP do not work

I have a web application running on Apache/Tomcat on a cloud with Linux (Digital Ocean). It had a domain name - example.com. I've encrypted both example.com and www.example.com using Let's Encrypt and now requests to https://example.com and to https://www.example.com work.
Then I wanted to redirect HTTP requests to HTTPS. But noticed that for some reason requests to http://example.com and to http://www.example.com do not work, and I'm not getting any response from my server. I tried to play with Apache configuration files of VirtualHost, but nothing worked for me so far.
Using tcpdump I see that I am receiving requests on port 80 on the server, but nothing happens except that.
What might be the reason for requests to HTTPS to work while requests to HTTP not to work?
Thanks.
Well, if someone else encounters this behavior - the reason for it was the firewall - port 443 (used by HTTPS) was open but port 80 (used for HTTP) was simply closed. Opening it solved it.

Can Owasp Zap be used to proxy all http and https traffic through an HTTPS connection?

I've just started using Zap, and am successfully running it in Firefox and Chrome.
I'd like to use it to automatically serve it's SSL cert for non https sites as well.
So for example, I'd like it to be able to serve
http://example.com
as
https://example.com
even though example.com normally wouldn't serve an SSL cert.
This would allow me to test local development sites without ever creating a self signed cert for them, or having to configure the cert with a webserver.
I've tried to port forward my dev port (18000) to port 443, but there's no SSL cert being served by my webserver, and the connection fails. I've also tried this with sni terminator zap plugin with no luck, though it feels like it's super close!
Any suggestions?
No application can choose communication protocol on which a client communicates. Web servers communication is strictly client driven except server redirects. For client to choose HTTP(s) out of two options http and http(s) you may install browser plugins like HTTP(s) everywhere which will seek for https first even if http is entered in browser

SSL Certificates installed on my site. but still browser shows unsafe connection

I have installed ssl certificates on my site but the browsers still showing unsafe connection. However i can access a safe connection by using https:// before site url
If you want to force https you'll need to set that up.
As explained on the apache wiki the recommended method is to setup the http virtual host to redirect to the https virtual host. Alternatively, you can use mod_rewrite to redirect from http to https.