Running an HTTPS server in a local network? - http

I am building a progressive web app for printer management, which will be deployed in a local network. Since it is a PWA, it needs to be served over HTTPS, so HTTP is not an option. Currently, I am using HTTPS localhost to create an HTTPS server on localhost, but that certificate obviously is not valid when other devices visit the URL and I get a warning message.
What is the best (and easiest) way to get a valid HTTPS server running in a local network?

Related

Having Issue with Cloudflare and Nginx proxy manager where it does not connect to my local server. (Error 522/523)

I'm trying for the first time to connect my local server (Synology) through NGINX and Cloudflare so I can access it through my own domain name. I have the proxy host all set up pointing to my local IP address with the port and I have an SSL encryption using Let's Encrypt. The site gives me either a timed out error or unreachable, however one time somehow the site took my to ASUS aicloud which is through my ASUS ac68u router but I was not even pointing NGINX to that.
using cloudflare diagnostic center site it syas the request failed because the web server did not respond.
I'm not sure whether my router is blocking Cloudflare or if there is any other issue going on, would appreciate any help with the matter!

'Invalid hostname' response from http.sys

We have web service running hosted on an OwinHttpListener (http.sys behind the scenes). Whenever we send requests to the app on the IP address, it responds with 'Invalid hostname'.
After much trawling of stack overflow and google, im not really any closer to a solution. The requests are getting through to http.sys, as i can see them in the HTTP error log. I can log onto the server in question and access the service locally (using localhost or 127.0.0.1) and i can use the server name to successfully get through, the only failure condition is using the servers IP address.
Ive tried the following:
Ensure the app is listening on all interfaces (http://+:8080)
Ensure IIS is not trying to use the port (it isnt)
Ensure windows firewall is configured to allow traffic on that port (it is)

How to set up nginx to allow HTTP on LAN, and redirect and authorize on external connections

I'm trying to setup Nginx for some personal web services I have running on my home server.
The network is setup with router between the server and the internet, the router has a Dynamic DNS service running such that I can connect to it while not at home.
I would like Nginx to handle connections from the local network such that it will serve the web services over HTTP and HTTPS without any authentication.
Connections from outside the local network, should redirected to HTTPS for security, and should also be required to authenticate.
The available web services are the same in the both cases. Connections directly to the IP should also be handled in the same way. I already have the web services running over HTTP, so this question is only about how to setup my server blocks
Is this possible?

Simulate SSL termination with IIS Express

In our production environment a website runs under HTTPS with SSL terminating on a load balancer and passing traffic to the IIS servers as HTTP.
There are various in-house and 3rd party components and controls within the site and some of them use mechanisms similar to the .NET System.Web.HttpRequest.IsSecureConnection property which simply queries the HTTPS server variable to return its result. As the connection into the web server from the load balancer is HTTP, these methods return the incorrect value and cause some components to fail. For example, a component might direct the user to a HTTP URL instead of HTTPS for a JavaScript file and cause the browser not to load the mixed content.
In order to debug these components and to develop a workaround, I need to recreate this scenario on my development machine. My question is Is there an easy way to simulate an externally terminated SSL connection for the Visual Studio / IIS Express development environment?
I've found a way using Port Forwarding Wizard.
Create a single TCP mapping with Listen Port set to a spare port (e.g. 443), destination as localhost with web server port (e.g. 80). Leave everything else as default, but go into SSL Encryption and generate a Root Key and Certificate in CA Center. Once done, select Enable SSL Encryption and select Server. Generate a Private Key file, Cert Req file and a Certificate and then bob's your uncle, you get terminated SSL forwarding to your local IIS Express server: Simply Start your port mapping and then connect to https://localhost with your web browser (specifying the port if it's not 443).

Unable to obtain tokenresult oauthClient.ExchangeCodeForAccessToken; unreachable network 69.171.229.24:443

I developed an FBConnect web application using C# .Net Framework 4.0 recently. Tested with my UAT server, everything just works fine, I'm able to login with my Facebook account, and perform all operation.
Unfortunately when I deploy the same code to my client's production environment, the FBConnect return "unreachable network 69.171.229.24:443". After several investigation, notice the port 443 is blocked! And due to corporate policy, this port is not allowed!!
Is there alternate way I can tweak my facebook app settings NOT to authenticate via port 443? instead of rewriting my code?
Please advice.
No, there is no alternative.
Port 443 is for secure HTTPS connections using TLS and SSL. Facebook, quite correctly, restricts access to their authentication mechanism to this port: (as far as I know) there are no alternative mechanisms that use a different port or an insecure login on port 80.
Check with your client to see if there's an proxy server that can be used for HTTPS connections.
Otherwise, request that your client opens that port.

Resources