Announcement

Collapse
No announcement yet.

No internet connection - DNS? /Firewall? problem

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    No internet connection - DNS? /Firewall? problem

    Hi
    I've just installed Kubuntu, and having problems with the Internet connection.
    In Konquerer I get "Connection to Server Refused" for any website unless I use it's IP address.

    however in Konsole I can ping websites by name

    (e.g. ping www.bbc.co.uk returns the IP address for the BBC, I can then connect to http://212.58.224.138 in Konquerer)

    So far I'm unable to install Firefox - but maybe this is probably a symptom of the network problem

    I've tried this with both wired and wireless connections, and double-checked my network settings against my other pc on the same network. (Both using static IP addresses via my ADSL router)

    As suggested in another topic on this site, I've just tried specifying the Open DNS servers 208.67.220.220 /208.67.222.222 instead of my router's address as the DNS servers on the pc and rebooted, but this appears to change nothing.

    (Oddly, the browser IS able to connect to kubuntuforums.net by name.)

    Any ideas what's happening here?
    (I'm very new to Linux, but know my way around TCP/IP a little)

    #2
    Re: No internet connection - DNS? /Firewall? problem

    How are you connecting to the Internet?
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: No internet connection - DNS? /Firewall? problem

      The answer to GG's question will be interesting.
      My thought was that there could be different ways to get a DNS resolution. Your /etc/resolv.conf file should have your DNS server(s) listed like this:
      Code:
      nameserver 192.168.1.254

      Comment


        #4
        Re: No internet connection - DNS? /Firewall? problem

        Not quite sure what details you're asking for, but...
        I'm using a wired connection to the Internet - (but have tried wireless too with the same results)
        It's just straightforward home ADSL broadband
        Using static IP addresses instead of DHCP, configured through "Network Connections" GUI from main Kubuntu menu

        Comment


          #5
          Re: No internet connection - DNS? /Firewall? problem

          Ole Juul is spot on!

          Going either wireless or wired but using a static IP will require that you fill in the DNS information in /etc/resolv.conf

          I use wicd. It has a config panel which allows one to check either dhcp or static IP address. If you choose the dhcp your /etc/resolv.conf should be filed in automatically when activated. If you chose static YOU must fill in /etc/resolv.conf. Use
          sudo kwrite
          from a Konsole to edit /etc/resolv.conf because it is owned by root and users have only a read permission.

          My /etc/resolv.conf was filled in automatically because my wireless is in the dhcp mode and I set wicd to use the dhcp mode. Here is its contents:

          domain earthlink.net
          search earthlink.net
          nameserver 207.69.188.186
          nameserver 207.69.188.187
          Substitute your ISP domain name for mine, on both the "domain" and "search" lines. Replace my ISP DNS IP numbers with YOUR ISP DNS numbers, or use a set of public DNS numbers.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Re: No internet connection - DNS? /Firewall? problem

            I am probably the person who suggested the use of Open DNS. I use it, I like it, and I have mentioned it on this site.

            However, I connect the numerous (obsolete) computers in this home to the internet through a router/switch. That device contains a firewall (whose firmware has to be updated periodically) from a vendor I do not recommend. Their device uses GNU software, but they do not provide instructions for setup in Linux.

            I believe (meaning I don't know for sure) that the router/switch uses dhcp to get an internet address (for itself) from my Internet Service Provider via cable modem, but (I think) the individual computers have fixed addresses from the router/switch that depend on which socket they are plugged in to at the router/switch that is plugged in to the cable modem. I don't know if you're confused yet, but I certainly am.

            Therefore, I believe that my router/switch gets an address from my ISP through the (ISP supplied) cable modem. I think the address of the cable modem, is the address by which all the computers in this house are known. ADSL, at least in the US, should be the same, except substitute the word "ADSL"for "cable" in front of modem.

            I have hand modified my /etc/resolv.conf file which now lists the two Open DNS Name Servers plus ONE of the original two dns addresses provided by my ISP. The second entry provided by the ISP is not used because
            # NOTE: the libc resolver may not support more than 3 nameservers.
            # The nameservers listed below may not be recognized.
            Unfortunately, they provide instructions only for Ubuntu and SUSE. If you don't feel confident about editing your resolv.conf file by hand, you can install a minimal Gnome installation to get access to the GUI (did someone say "blue-headed stepchild"?), and uninstall it afterward. NOTE: Step 8
            To avoid having your settings get revoked after reboots, or after periods of inactivity you may need to make the following changes via the command line
            $ sudo cp /etc/resolv.conf /etc/resolv.conf.auto
            $ gksudo gedit /etc/dhcp3/dhclient.conf
            # append the following line to the document
            prepend domain-name-servers 208.67.222.222,208.67.220.220;
            # save and exit
            $ sudo ifdown eth0 && sudo ifup eth0
            is really, really important.
            Of course, you will use will use kdesudo and kate instead of gksudo and gedit, or sudo and nano.
            Oh, did I mention that you really need to pay attention to step 8.
            Remember step 8.

            Comment


              #7
              Re: No internet connection - DNS? /Firewall? problem

              A router that isn't set for DHCP by default would not be common. Personally, I prefer to set up the network by hand using static addresses, but DHCP is fine for most people and DHCP clients are on ALL systems in the last 12 years or so - I even have a client that I could use for the earliest DOS! Anyway, I'm just rambling. The OP probably doesn't need to know this.

              Regarding Open DNS. I'm sure it works for most people, especially if you want to get some kind of filtering. However, I tried them and they didn't work for me. Certain sites (the FSF as I recall) were not there. It took me a little while to figure it out. I think what happened is that someone in the past had used my IP address (before I got it) and set up the filter. I would have had to sign up to change that. File under "strange but true".

              Comment


                #8
                Re: No internet connection - DNS? /Firewall? problem

                Originally posted by askrieger
                ..
                I believe (meaning I don't know for sure) that the router/switch uses dhcp to get an internet address (for itself) from my Internet Service Provider via cable modem, but (I think) the individual computers have fixed addresses from the router/switch that depend on which socket they are plugged in to at the router/switch that is plugged in to the cable modem. I don't know if you're confused yet, but I certainly am.
                ...
                My Linksys WRT54GL wireless router (connected to the EarthLink.net Modem via cat5 eth link) allows me to configure it to connect to PCs via static or dhcp. My ISP, EarthLink, has used the SAME IP address to represent me to the Internet since I contracted with them a year ago. I have my wireless router set for DHCP to dispense IP addresses beginning with 192.168.1.100 and up for 5 addresses only. I have a Samsung ML-1210 laser printer attached to a Linksys Wireless Print Server via a USB cable. The Print Server is connected to the wireless router with a cat5 eth cable. The Printer Server is set up "adhoc" to deliver a static IP of 192.168.1.99 to the printer. That way, the printer IP address does not depend on the sequence of the wireless log in.
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  Re: No internet connection - DNS? /Firewall? problem

                  The key point for kpedrox is that his Domain Name Server isn't working. I like Open DNS specifically because you are NOT tied to the vagaries and (in my case) delays introduced by the domain name servers of your specific Internet Service Provider.

                  I don't believe that the fact that you use either a static or dhcp address at your end matters to the ISP's domain name servers. When they get a request for the IP address associated with a particular domain name, they do one of two things. If the name is in their current cache, they send it right back to the IP address that requested it. If it's not they send it up to the next level of domain name servers (See "TCP/IP" by Comer or Tanenbaum's "Computer Networks", or any other book that covers the subject). It is in their best interest to keep their DNS server small because it's an overhead item that COSTS THEM MONEY, and most users don't even know what's going on. In contrast, Open DNS (with whom I have no personal connection other than as a satisfied user at the lowest level of service) has a much bigger, busier cache than your ISP because that's their business, THEY MAKE MONEY.

                  Hence, it shouldn't matter how you're connected at your end (unless your ip address can change in a minute). The point of my discussion of my setup is to point out that depending on how you look at it, I'm using both a fixed IP address and DHCP. The crucial issue is to make sure that your /etc/resolv.conf file isn't munged, and the way to do that is presented on the OpenDNS site (step 8 ). I suspect that kpedrox's problem has to do with the way konqueror is setup. I have no idea why he can't set up Firefox, but I doubt that it's related to his DNS server. Perhaps a new topic describing EXACTLY what happens when he tries would help, but one problem at a time.

                  Comment


                    #10
                    Re: No internet connection - DNS? /Firewall? problem

                    Thanks for all your help - i'm now fully connected (even now have Spotify working - which was one thing that was holding me to windows)

                    editing resolv.conf does [seems] to have done the trick, and I've stuck with the Open DNS servers

                    i've subsequently been able to install firefox

                    as i said at the start, i've little experience with linux (quite a lot with microsoft) but spent some time trying to get to grips with it over the last couple of days, and i think i may be heading for conversion... also slightly embarrassed to say that it's a little difficult to be specific about how this has all resolved, as i'm finding my way around, trying lots of stuff somewhat randomly, and not troubleshooting in any structured manner at the moment...but thanks again

                    Comment


                      #11
                      Re: No internet connection - DNS? /Firewall? problem

                      Glad you got it fixed. Yes, DHCP or static is not generally of any particular importance, what matters is that the machine knows where to get the DNS resolution. One thing that I've noticed is that the various Linux network managers vary in effectiveness over time and have even been seen to be broken for a little while. For someone like you who obviously has a bit of a grip on the software and know how to use an editor, I recommend you get friendly with how to set up your network by hand. I won't give details here because you can easily find your own favourite howto, but it is very simple. You basically just need to fill in the resolv.conf, interfaces, and hosts files. BTW, you might want to know: to avoid rebooting or other contortion to restart the network, you can simply:
                      Code:
                      sudo /etc/init.d/networking restart
                      -Ole

                      Comment


                        #12
                        Re: No internet connection - DNS? /Firewall? problem

                        You might find THIS website useful!
                        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                        – John F. Kennedy, February 26, 1962.

                        Comment

                        Working...
                        X