Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hi there, I've got a funny problem with DNS resolution. I'm away from home staying in a Hotel which supplies internet to each room via ethernet. An address is assigned ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    5

    Incorrect DNS resolutions


    Hi there,

    I've got a funny problem with DNS resolution. I'm away from home staying in a Hotel which supplies internet to each room via ethernet. An address is assigned via DHCP and a DNS server is also supplied from DHCP.

    However, on trying to access any domain name (via ping, Firefox, anything), especially for the first time, often an incorrect IP is returned -- always 169.254.1.1. Of course, google.com isn't at 169.254.1.1 so the connection will time out.

    If I type in the correct IP (obtained from calling ping a few times until it returns something other than 169.254.1.1) then it will work perfectly.

    Now, the odd thing, is that even if I supply an alternative DNS server (for example, Google's 8.8.8.8 and 8.8.4.4, or even the DNS servers from my home ISP), it still performs the same behaviour. How could the hotel's router affect that?

    Typing in `route' shows nothing out of the ordinary in the routing table.

    When I'm on-site at work (as I am now), the ethernet connection works perfectly and shows the same routing table (just a different gateway).

    Does anybody have any idea what is going on?

    For reference, I'm running Ubuntu 10.04 with Gnome's network manager. However my co-workers Windows laptop appears to be producing the same behaviour in the same hotel.

    Many thanks!

  2. #2
    Just Joined!
    Join Date
    Sep 2006
    Location
    Norfolk Island
    Posts
    31
    The results you are seeing suggests that they are using a hotspot type server/service which will happily hijack & proxy DNS requests and return their own IP on web requests which redirect your browser to a login page, etc.

    The fact you are getting a 169.254.1.1 address back in DNS which is a "link-local" address suggests that the gateway may have gotten a bit lost. There's pretty good info on link-local at wikipedia.

    I'd be interested to know what address details you are getting from DHCP in this situation as the DHCP server may be running OK on their server/gateway but their server may have lost it's IP configuration & hence is using link-local.

    In any case the type of setup you are seeing is not particularly unusual for a hotel setup, but the details you are getting don't look good. Tell the hotel they have a problem and show them the service not working if you have to.

    cheers

  3. #3
    Just Joined!
    Join Date
    Nov 2008
    Posts
    5
    Hi there, thanks for the response!

    That's interesting that it's intercepting the DNS requests. It solves a lot of my confusion.

    I would advise them that there might be an issue with their server but the problem is that I'm a New Zealander here in Poland -- I have enough difficulty telling the hotel staff what dates we're staying let alone trying to explain a potential issue with a proxy server

    What I might try is set my DNS server to 127.0.0.1 (so it won't go through the default gateway), and use an ssh tunnel back to my computer at home and out to a New Zealand DNS server. DNS resolutions might be a little slow but I'll be happy as long as it works.

    Will update tonight if that technique works.

    Thanks once again,

    -Tom

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Sep 2006
    Location
    Norfolk Island
    Posts
    31
    wierd that the connection through works, but dns doesn't. something not happy. You could go to babelfish and covert "your gateway is f..." into polish then show them your screen

    best of luck

  6. #5
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Quote Originally Posted by xerxesdaphat View Post

    What I might try is set my DNS server to 127.0.0.1 (so it won't go through the default gateway), and use an ssh tunnel back to my computer at home and out to a New Zealand DNS server. DNS resolutions might be a little slow but I'll be happy as long as it works.

    Will update tonight if that technique works.
    The tunnel is what I would try also, but I've never done ssh port redirection with UDP, so I'm not sure about it.

    Munging up the DNS is a technique used by some hotspot implementations to interfere with usage by unauthorized machines. Is there any kind of splash screen wanting authentication or a key code or anything when you connect?

  7. #6
    Just Joined!
    Join Date
    Nov 2008
    Posts
    5
    Quote Originally Posted by greyhairweenie View Post
    The tunnel is what I would try also, but I've never done ssh port redirection with UDP, so I'm not sure about it.

    Munging up the DNS is a technique used by some hotspot implementations to interfere with usage by unauthorized machines. Is there any kind of splash screen wanting authentication or a key code or anything when you connect?
    Ah. UDP. Bugger.

    I just did a quick Google and it looks like it is possible to do UDP tunneling with ssh, so long as you use netcat at both ends and a fifo. So it is possible, just not so clean.

    Just once, I saw a very brief splash screen. You don't have to log in, but it looked like it was doing a quick redirect.

    Thanks for the responses.

  8. #7
    Just Joined!
    Join Date
    Sep 2006
    Location
    Norfolk Island
    Posts
    31
    If you were thinking of a dirty solution, here's another option & probably handy anyway (assuming your machine at home is linux).

    Set up SSL VPN server on your home machine and a caching DNS service (named).

    Set your VPN to only supply route to home network & point your DNS to your home machine.

    General web stuff will route as normal but dns will go to home machine which will handle them for you out via your NZ ISP.

    Both are SSL VPN and Named are well documented & simple to set up.

    cheers

  9. #8
    Linux Newbie previso's Avatar
    Join Date
    Jan 2010
    Location
    SC
    Posts
    116
    You could change the DNS properties of your card, from automatic to Google's public DNS (To try it out:

    * Configure your network settings to use the IP addresses 8.8.8.8 and 8.8.4.4 as your DNS servers)

  10. #9
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Quote Originally Posted by previso View Post
    You could change the DNS properties of your card, from automatic to Google's public DNS (To try it out:

    * Configure your network settings to use the IP addresses 8.8.8.8 and 8.8.4.4 as your DNS servers)
    Looks like he already did that. OP

  11. #10
    Just Joined!
    Join Date
    Nov 2008
    Posts
    5
    Well I have it working with ssh. I followed a guide on the net that used socat to package the UDP up in TCP packets. It works, of course there is a delay but it's better than no access!

    The odd thing is, if I use ping or nslookup etc. everything works well every time. However, often Firefox or other programs immediately give a "host not found" error, without pausing at all to try and resolve it. It's instant -- but usually trying to load the page again works straight away. It's quite odd. It's almost like by specifying 127.0.0.1 as the DNS server it's expecting almost instant resolutions and gives up quickly. Or maybe socat is mangling the packets somehow.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •