Announcement

Collapse
No announcement yet.

Best way to set DNS addresses in Kubuntu 9.04?

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

    Best way to set DNS addresses in Kubuntu 9.04?

    I am used to the way MS Win handles networks and find it very easy. So I have tried to find out where I can set the DNS servers I want to use.

    The rest of the settings should remain on DHCP, but I always prefer using the inhouse DNS as my first DNS, then two servers from OpenDNS as my next addresses.

    As I do not control the DHCP server (part of the ISP setup and a common way of doing things here in Brazil) I can not change the DNS'es there. So I have my own caching DNS set up on my Ubuntu server.

    What is the easiest way to change the DNS?
    Regards,
    Oceanwatcher
    Blog: http://www.wisnaes.com/
    Pictures: http://www.oceanwatcher.com/
    Software tips (in Norwegian): http://www.datahverdag.com/

    #2
    Re: Best way to set DNS addresses in Kubuntu 9.04?

    You should edit /etc/dhcp/dhclient.conf as root.
    You will see a few commented examples but if you want only the DNS servers you specify use
    supersede domain-name-servers 192.168.0.3 208.69.39.2;

    or you can put your first but have the others using
    prepend domain-name-servers 192.168.0.3 208.69.39.2;

    After your lease is renewed look at /etc/resolv.conf to make sure you are getting what you want.

    Comment


      #3
      Re: Best way to set DNS addresses in Kubuntu 9.04?

      Great. I will try that. And now to the scheduled stupid question:

      Is there a way to do this in the GUI? It should be so simple...

      I do not have any /etc/dhcp, but I have /etc/dhcp3. I guess it works the same?
      Regards,
      Oceanwatcher
      Blog: http://www.wisnaes.com/
      Pictures: http://www.oceanwatcher.com/
      Software tips (in Norwegian): http://www.datahverdag.com/

      Comment


        #4
        Re: Best way to set DNS addresses in Kubuntu 9.04?

        It is simple. You may be able to find a GUI to complicate it and screw it up, but I do not know of any.

        Comment


          #5
          Re: Best way to set DNS addresses in Kubuntu 9.04?

          It might be simple, but as I know there will be a lot of people that are used to be doing this in a very simple way, you should expect the gui question coming from others as well :-)

          Anyway - to make sure I do not mess things up, here is what I have in the file now. Could you be so kind to show me where I add and what?

          Code:
          option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
          
          send host-name "<hostname>";
          #send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
          #send dhcp-lease-time 3600;
          #supersede domain-name "fugue.com home.vix.com";
          #prepend domain-name-servers 127.0.0.1;
          request subnet-mask, broadcast-address, time-offset, routers,
          	domain-name, domain-name-servers, domain-search, host-name,
          	netbios-name-servers, netbios-scope, interface-mtu,
          	rfc3442-classless-static-routes, ntp-servers;
          #require subnet-mask, domain-name-servers;
          #timeout 60;
          #retry 60;
          #reboot 10;
          #select-timeout 5;
          #initial-interval 2;
          #script "/etc/dhcp3/dhclient-script";
          #media "-link0 -link1 -link2", "link0 link1";
          #reject 192.33.137.209;
          
          #alias {
          # interface "eth0";
          # fixed-address 192.5.5.213;
          # option subnet-mask 255.255.255.255;
          #}
          
          #lease {
          # interface "eth0";
          # fixed-address 192.33.137.200;
          # medium "link0 link1";
          # option host-name "andare.swiftmedia.com";
          # option subnet-mask 255.255.255.0;
          # option broadcast-address 192.33.137.255;
          # option routers 192.33.137.250;
          # option domain-name-servers 127.0.0.1;
          # renew 2 2000/1/12 00:00:01;
          # rebind 2 2000/1/12 00:00:01;
          # expire 2 2000/1/12 00:00:01;
          #}
          Regards,
          Oceanwatcher
          Blog: http://www.wisnaes.com/
          Pictures: http://www.oceanwatcher.com/
          Software tips (in Norwegian): http://www.datahverdag.com/

          Comment


            #6
            Re: Best way to set DNS addresses in Kubuntu 9.04?

            Had to try before any answer

            Here is what I did:

            Alt-F2
            kdesudo kate /etc/dhcp3/dhclient.conf

            Then added this line:

            prepend domain-name-servers 192.168.254.68 208.67.222.222 208.67.220.220;

            Hope that do it.

            Now I just need to find out how to renew the release. Do you know where that button is?
            Regards,
            Oceanwatcher
            Blog: http://www.wisnaes.com/
            Pictures: http://www.oceanwatcher.com/
            Software tips (in Norwegian): http://www.datahverdag.com/

            Comment


              #7
              Re: Best way to set DNS addresses in Kubuntu 9.04?

              Whatever applet you have for a network manager should do that. Unfortunately on my system the very cool looking plasma-widget-network-manager does not give me any control. Damn GUIs.

              sudo invoke-rc.d NetworkManager restart will probably do it. If not use
              sudo ifconfig eth0 down
              and then
              sudo invoke-rc.d NetworkManager restart

              I do expect people to ask about GUIs. I hope they expect me to tell them how to do what they want rather than which GUI to run in a failed attempt to do something.

              Comment


                #8
                Re: Best way to set DNS addresses in Kubuntu 9.04?

                Found at least one little thing that helps... I guess the morale is "Click on all buttons and menus to check where it can be hidden" because it is not always obvious.

                In the network widget, click on the interface in use.
                Click on IP Address
                There is a drop-down menu there that is on DHCP on my laptop
                One of the other choices is DHCP with manual DNS. Sounds very much like what I want. I tried it. It seems to do what I want, but It does not stick (when I checked now, it was on DHCP again.

                The DHCP renew on the other hand, is nowhere to be found...
                Regards,
                Oceanwatcher
                Blog: http://www.wisnaes.com/
                Pictures: http://www.oceanwatcher.com/
                Software tips (in Norwegian): http://www.datahverdag.com/

                Comment

                Working...
                X