Question:
How to redirect all traffic intended for passing through port 80 to be passed through port 443 by the router?
?
2017-01-28 17:10:29 UTC
Hi,
I wanted to know if it's possible for router to force http requests to become https requests?
Six answers:
Dave
2017-01-28 17:14:30 UTC
If you have a commercial grade router, you can do that. But most residential routers do not have the functionality.
?
2017-01-30 21:46:28 UTC
Notice, you to to an http site and it switches to https? This is not simply changing the port, it is usually done via the http SERVER doing a redirect from http/port 80, to https/443. And it is not simply changing the port, the server sends to your browser a redirect and your browser reopens to the secure site.



You cannot have end to end security if you use port 80. It is possible to use a reverse proxy to do this, but once again you are giving a false sense of security by doing it.



So the answer is, on the server side it is up to the server to redirect, not a router. On the client side, you can do it but it breaks the fundamental security ssl can give you.
efflandt
2017-01-29 03:21:10 UTC
Port 443 is for secure https (encrypted) which typically requires a certificate from a trusted 3rd party for the domain and proper DNS and is a different protocol than plain text http on port 80. So forwarding outside port 80 to inside port 443 of a web server could result in miscommunication (ie, might not work at all) if the internal web server on port 443 is expecting an https connection unless you specifically configure that to use http. But they why wouldn't you simply use port 80 all the way through?
Adrian
2017-01-28 20:35:29 UTC
It is possible with any home router that supports "PAT" (Port Address Translation). Most do. It is set when you do the port forwarding and specify the Internet incoming port (80), then the LAN outgoing port (443). Usually this works. In a few cases, you may have to define outgoing PAT as well (convert 443 back to 80), but usually the port forwarding does this.

Only way to know for sure is to try it. Some routers will not do it, or not properly. Others will work fine. My Linksys router used PAT for SSH port translation, I used a unusual Internet port (22022) and did a PAT to port 22 for the internal SSH server. It worked just fine in both directions. I did this to prevent hackers who keep probing known ports like 22 in attempts to hack. Hackers would never try port 22022, as it is not a standard port they expect to see responses to.

(PS: 22022 is not the real port I used - I would never post it, but a good example)
VP
2017-01-28 19:24:53 UTC
This article talks how the conversion from HTTP to HTTPS can be done.



https://blog.dnsimple.com/2016/08/https-redirects/
chrisjbsc
2017-01-28 18:25:29 UTC
Not possible.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...