I received an error in Chrome one day trying to connect to my router’s gateway page like:
This site can’t be reached
192.168.1.1 refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
I tried to restart my router, but to no avail it still acted the same…
The Fix
I ended up going into “View Network Computers and Devices“. You can type this into your search bar to find it on Windows 10 or navigate into your Control Panel and find Network and Internet settings.
After I was in the View network Computers and Devices under the section called “Network Infrastructure” there was my modem as “RT-AC68P“. You can then right click and go to: “View device webpage” or go to Properties > Network Device [tab] > Device webpage
Right away I knew what was wrong. I remember I had set my router to use HTTPS authentication for it’s homepage. I was trying https://192.168.1.1/ earlier but that was also giving me the connection refused error. The new port it was using was 8443 so the new homepage URI was https://192.168.1.1:8443/
How to use port 443 for Asus RT-AC68P Authentication Method
Why use port 443? This is the default port for a secure connection via “https” this way you will not have to remember any silly port like 8443 and you can securely access your modem conviently via https://192.168.1.1/ or https://router.asus.com/
So the problem is that if you try to use port 443 for the Administration > System > Authentication Method settings you’ll get an alert error like, “This port is for Cloud Disk.” Right away the hacker in me knew this was a client side validation, and like most routers this client side validation could be circumvented, removed, and wouldn’t be checked after we pushed the value to the router. I’m not using Cloud Disk so I do not care about that port being occupied for the router’s homepage.
Circumventing this is quite simple
WARNING! Make sure you are not using Cloud Disk in the AiCloud 2.0 section of your router.
It’s possible this could cause a conflict where the port is already in use and bricks your router or would require a hard reset to your router.
I assume no responsibility for what you’re about to do. This should be low risk if you verify the above warning message.
- Simply right click in Chrome then goto “Inspect Element” or hit Ctrl + Shift + I on Windows to open the Developer Tools.
- Then open the console tab, or hit esc to toggle the console on the current tab.
- Next paste this code in
isPortConflict = function(){return false;}
Here’s the original code for those interested. This can be accessed by searching for the alert message (Ctrl+Shift+F in Chrome’s Developer Tools), or putting isPortConflict (without parenthesis) into the console to get the function.
function isPortConflict(_val) {
if (_val == '80')
return "This port is for HTTP LAN port.";
else if (_val == '')
return "This port is for Download Master.";
else if (_val == '8082')
return "This port is for Cloud Disk.";
else if (_val == '443')
return "This port is for Cloud Disk.";
else
return false;
}
- Now you can close out of the Developer Tools for Chrome
- You should be able to submit port 443 for the Authentication Method in the Administration > System settings.
Now you can access your router via https://192.168.1.1/ or https://router.asus.com/
A few Interesting Things I Found out digging around
This was the first and only thread I ran across while trying to figure out how to use port 443 for my router’s homepage:
Don’t enable HTTPS login on the ASUS RT-N66U (& how to fix it if you have)
It didn’t have the information I was looking for, but it was entertaining that it said not to enable https. The author didn’t seem to understand ports and how a server service works. You should be using https for your browser if you want to keep your credentials secure on your local network. It’s just unfortunate that they block the port you should be using and the router doesn’t do a good job re-routing you after you’ve changed the settings. You can choose to have Authentication Method: Both but you’ll likely forget to use the secure connection. What I would like to see is the router continue to keep port 80 up for http and throw a permanent redirect to your https endpoint.
If you do have Both chosen it will reroute http://192.168.1.1/ to http://router.asus.com/ which is interesting.
The above article and having Both chosen for the authentication method opened my eyes back up to the fact that you can access your router via: router.asus.com which is a nifty trick they did to route the subdomain to the router at all times no matter what IP it is using.