A while ago I attended an OfferZen Make Day and learnt about SSH tunneling which creates a secure connection between a local computer and a remote machine through which services can be relayed.
At the time, I couldn't get it working and I became a great joke to the *nix guys.
Trying it out recently, I got it to work with IIS Express with little effort.
I'm using Serveo because you don't need to install anything, provided you're on Windows 10.
URL Binding IIS Express
If you don't want to run Visual Studio with administrative privileges.
You'll need to configure HTTP.sys to allow these bindings for a standard user.
In an elevated command prompt, run the following commands.
Remember to replace the http and https port numbers with the ones actually used by your web app.
netsh http add urlacl url=http://*:56246/ user=Everyone
netsh http add urlacl url=https://*:44304/ user=Everyone
Modify your applicationhost.config file
In your ASP.NET web project folder, you'll find
applicationhost.config at the following path,
Find the url bindings, it will look something like
<bindings> <binding protocol="http" bindingInformation="*:56246:localhost" /> <binding protocol="https" bindingInformation="*:44304:localhost" /> </bindings>
You'll need to remove
localhost, this allows the web app to work with forwarding and locally.
<bindings> <binding protocol="http" bindingInformation=":56246:" /> <binding protocol="https" bindingInformation=":44304:" /> </bindings>
ssh -R 80:localhost:56246 serveo.net
ssh -R 44300:localhost:44304 serveo.net
For https, you can't use port 443. Use any other port so Serveo can forward the TCP connections.
You might get a certificate mismatch warning in your browser, just ignore it.