cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone a networking expert ?

Community Veteran
Posts: 5,472
Thanks: 292
Fixes: 4
Registered: 11-08-2007

Anyone a networking expert ?

I am in the process of rearranging the various networking services on my home network.
Because I have a lot of networked devices I am converting from using static IP addresses everywhere to using named services,
therefore when services get changed between servers with different IP addresses, I only have to change the IP address for that service in my DNS servers hosts file.
So some simple examples would be -
192.168.1.1   =  adsl_gateway.mydomain.co.uk
192.168.1.2   =  dns.mydomain.co.uk
192.168.1.3   =  ntp.mydomain.co.uk
192.168.1.4   =  smtp.mydomain.co.uk
192.168.1.5   =  pop3.mydomain.co.uk
192.168.1.6   =  printserver.mydomain.co.uk
192.168.1.7   =  Windows_PC.mydomain.co.uk
192.168.1.8   =  Ubuntu_PC.mydomain.co.uk
192.168.1.9   =  Laptop.mydomain.co.uk
192.168.1.10  =  PS2.mydomain.co.uk
192.168.1.11  =  DSi.mydomain.co.uk
192.168.1.12  =  Mobile_Phone.mydomain.co.uk
192.168.1.13  =  nas.mydomain.co.uk
192.168.1.14  =  media_streamer.mydomain.co.uk
192.168.1.15  =  scanner.mydomain.co.uk
192.168.1.16  =  fax.mydomain.co.uk
192.168.1.17  =  answer_machine.mydomain.co.uk
192.168.1.18  =  webcam.mydomain.co.uk
192.168.1.19  =  www.mydomain.co.uk
192.168.1.20  =  intranet.mydomain.co.uk

I appear to have got the DNS server working, and can even get a full list of connected devices using nmap and the details resolved by rdns.
HOWEVER
When I try and access my ADSL gateway (Linksys WAG54G) using the IP address, I get the "Authentication Required" window, enter the username and password, and it works fine.
BUT when I use "adsl_gateway.mydomain.co.uk", the same "Authentication Required" window appears, but now it NEVER accepts the username/password ?
I don't see what the difference is, from the gateway's point of view, because my DNS server has told my Firefox browser the correct IP address, this IP address has caused the correct "Authentication Required" window to appear,  but somehow the username/password is being processed differently !!!
Any ideas ?
BTW, I also have several other Linksys network devices (bridges, printserver, wireless access points) and all those behave as I would expect them to,  so it is something about the gateway !.
9 REPLIES
VileReynard
Seasoned Pro
Posts: 10,823
Thanks: 245
Fixes: 10
Registered: 01-09-2007

Re: Anyone a networking expert ?

I'm guessing that when you use an ip address you are talking to the gateway, but when you use the name you are talking to another PC (the DNS server)?
What happens if you put the address of your gateway in your local hosts file?

Community Veteran
Posts: 5,472
Thanks: 292
Fixes: 4
Registered: 11-08-2007

Re: Anyone a networking expert ?

[quote=A Fox is Evil ]but when you use the name you are talking to another PC (the DNS server)?
When using the name version in my browser, the browser requests the IP address from the DNS server, I can even see the DNS request and correct DNS response using Wireshark.
I definitely get the correct logon screen ("Authentication Required" window) for my gateway, so the browser is talking to the correct address.
The difference is that the screen is not accepting the login information, but accessing the same screen directly by IP address then it works.
[quote=A Fox is Evil]What happens if you put the address of your gateway in your local hosts file?
I don't see what difference that would make, because the name must already be getting correctly resolved as I get the expected login page.
MrC
Grafter
Posts: 523
Thanks: 2
Registered: 17-07-2008

Re: Anyone a networking expert ?

Have you tried deleting all information to do with the relevant ip address and FQDN (eg session cookies and saved user/passwords) in your browser?
Community Veteran
Posts: 3,789
Registered: 08-06-2007

Re: Anyone a networking expert ?

it sounds like a cookie related problem tbh.
I suspect that the router is trying to set a cookie to store your login, but the cookie path isn't the same as the DNS path.
If you log into the router, do you have the option to set an internal hostname and dns domain?  These will need to match the fqdn you have set in DNS.  I suspect that currently, they do not.
B.
Community Veteran
Posts: 4,729
Registered: 04-04-2007

Re: Anyone a networking expert ?

Its not a network expert that you need, its a hosting expert.
When you are trying to authenticate, the web server in the router is looking at the URL used as well as the username and password. As it does not have a list of usernames and password for adsl_gateway.mydomain.co.uk, its rejecting your request.
Its a miss configuration in the virtual hosting configuration on the router. You could try updating the firmware on the router.
Or even one of the alternate firmwares available for the WAG54G router, but make sure that you know the hardware version and are using the correct firmware. And you are willing to lose the router.
Quote
The most popular router by far for customisation is the LinkSys WAG54G series. Like all routers, this has developed through a range of variants and updates. Also, like all other routers, this has often meant that only the box has remained similar – the circuitry and chipsets used in various models are completely different, so check the model and version number carefully before trying to flash some custom firmware.
If you have one of the variants you have a choice between a selection of projects, including freewrt (www.freewrt.org/trac), ddwrt (www.dd-wrt.com/dd-wrtv3/index.php), openwrt and Tomato (www.polarcloud.com/tomato). Tomato adds the widest range of extensions and options, including static DHCP, which can speed up network connections, and the ability to add bridging features, so that you can use multiple routers to extend range. If you want the most powerful possible router for the least cost, it's worth buying a WAG54G model just so you can install these features on it. You'll get high end professional options for the cost of a much cheaper unit– and that can't be bad.
Read more: http://www.techradar.com/news/internet/hack-your-router-459785#ixzz0u2OxLhXD
Community Veteran
Posts: 5,472
Thanks: 292
Fixes: 4
Registered: 11-08-2007

Re: Anyone a networking expert ?

Thanks for all the suggestions so far.
[quote=MrC]Have you tried deleting all information to do with the relevant ip address and FQDN
Tried that, also changed PC, changed browser, with no change.
[quote=Barry Zubel ]These will need to match the fqdn you have set in DNS.  I suspect that currently, they do not.
You were correct, but setting it made no difference.
[quote=Chill! ]You could try updating the firmware on the router.
I might try that the next time my network is not being used, and when I have got my backup gateway out (just in case of a flashing disaster !)
[quote=Chill! ]the web server in the router is looking at the URL used as well as the username and password
That sounds like a possibility.  I have done a few experiments with the DNS settings, by setting the gateway DNS manually to point at my local LAN DNS server, when I use another PC to either access the gateway by it's FQDN, or even just requesting an internet web page, the gateway DOES NOT send any DNS lookup request to the local network, presumably it is only sending DNS requests to the WAN port.  Therefore if your theory is correct, because my DNS is on the local LAN and gateway DNS lookups appear to go to the WAN, then the gateway will not be resolving it's own FQDN correctly because it is not routing the specified local DNS address to the local network.
BrianE
Grafter
Posts: 29
Registered: 22-07-2010

Re: Anyone a networking expert ?

You have separate IP addresses (and maybe even physical hardware) for NTP, Intranet and 'www'?!
Though as per the other posts, it's almost definitely a cookie problem - The router's sending a header instructing your browser to retain a cookie for probably '/' on what it thinks is its IP address, and your browser a) isn't allowing that cookie to be stored [Same Origin Policy - It's not valid for adsl_gateway.mydomain.co.uk to store a cookie for 192.168.2.2] and b) wouldn't send it again for adsl_gateway.mydomain.co.uk anyway
A fix would be to find a setting on your router(gateway) to make it set cookies for adsl_gateway.mydomain.co.uk, or a workaround to just use its IP address for web-based administration
If accessing it via its IP address works fine, then it's ^ that problem, though if you're using HTTP authentication rather than a webpage-based login box, it can't be and you'll need to look into other solutions
Ben_Brown
Grafter
Posts: 2,839
Registered: 13-06-2007

Re: Anyone a networking expert ?

I'm with Chill! on this one, sounds like a virtualhost type issue, rather than a cookies one.
BrianE
Grafter
Posts: 29
Registered: 22-07-2010

Re: Anyone a networking expert ?

Re-reading his first post, I didn't notice he said "Authentication Required", which is probably an HTTP authentication box from his browser, which means it isn't a cookie issue (uses 'Authorization' header rather than cookies for a domain)
But it's not likely to be a vhost config issue, either - Most routers are configured to show the web panel from any host, and even if it was singling out a single vhost the HTTP auth likely wouldn't be requested, rather some sort of 'page not found' or blank page shown
OP: Try dumping the headers the web server sends, then your browser's response after entering the password, then the web server's response on a second request and maybe paste them here or check it looks alright yourself, other than that there's nothing much else I can think to help