What's new

Can't login when device has hostname six or fewer characters long

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

tdev

New Around Here
I have two Asus RT-N66Us both with 380.70. They get their IPs via DHCP. On the DHCP server, which is also the DNS server for the local network, I gave them their IP addresses and the hostnames wap1 and wap2. I then went to:

http://wap1/

...and attempt to login. After submitting user and pass (whether right or wrong), I was redirected right back to the login page.

This didn't happen when you access them via IP address, i.e. http://192.168.x.y/. So after some experimenting I figured out that this would happen whenever the devices' hostnames were six characters or less. Trying to login to http://abcdef/ didn't work and just redirected back to the login page, but http://abcdefg/ worked fine.

Is there a reason for this, is it a bug that's gone unnoticed, or have I done something wrong I haven't figured out yet?
 
I discovered that logging in when the device has a hostname 6 characters or less works if you follow the hostname with the local domain, e.g.:

http://wap1.mydomain.com/

Whereas, as stated before, you can't login here:

http://wap1/

And trying to get around it by logging in at the first address and then going here:

http://wap1/index.asp

...redirects you to the login page.

Anyone?
 
Last edited:
Purely speculation, but I think it’s because the HTTP header ‘Referer’ is too short.
When you navigate to http://abcde, httpd would redirect you to the login page with ‘Referer: abcde’, and there’s probably a check for it and only accepts domains longer than 5 chars, as to why, I don’t know.

Edit: you can test this by navigating to http://wpa1/index.asp but with a browser extension to overwrite the ‘Referer’ header with 12345 and 123456
 
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top