Loading ...
Sorry, an error occurred while loading the content.
 

Editing resolv.conf

Expand Messages
  • Victor Hadianto
    Hi, I m making mods on my resolv.conf to add new name servers (using OpenDNS): nameserver 208.67.222.222 nameserver 208.67.220.220 But when I rebooted NSLU it
    Message 1 of 8 , Aug 30, 2009

      Hi,

      I'm making mods on my resolv.conf to add new name servers (using OpenDNS):

      nameserver 208.67.222.222
      nameserver 208.67.220.220

      But when I rebooted NSLU it overwrote resolv.conf to its original settings. How do I change the nameservers properly?

      Thanks,
      Victor
    • vhadiant
      Hi, I m making mods on my resolv.conf to add new name servers (using OpenDNS): nameserver 208.67.222.222 nameserver 208.67.220.220 But when I rebooted NSLU it
      Message 2 of 8 , Aug 30, 2009
        Hi,

        I'm making mods on my resolv.conf to add new name servers (using OpenDNS):

        nameserver 208.67.222.222
        nameserver 208.67.220.220

        But when I rebooted NSLU it overwrote resolv.conf to its original settings. How do I change the nameservers properly?

        Thanks,
        Victor
      • Brian Wood
        ... Are you using DHCP? This will do what you see. Try using a static IP, or telling your DHCP server to use the desired nameservers. -- Brian Wood
        Message 3 of 8 , Aug 30, 2009
          On Sunday 30 August 2009 13:11:17 vhadiant wrote:
          > Hi,
          >
          > I'm making mods on my resolv.conf to add new name servers (using OpenDNS):
          >
          > nameserver 208.67.222.222
          > nameserver 208.67.220.220
          >
          > But when I rebooted NSLU it overwrote resolv.conf to its original settings.
          > How do I change the nameservers properly?

          Are you using DHCP? This will do what you see.

          Try using a static IP, or telling your DHCP server to use the desired
          nameservers.


          --
          Brian Wood
          bwood@...
        • Victor Hadianto
          ... Yes I am using DHCP. I can change my router to set the static IP to the NSLU but unfortunately I can t change the DNS settings on the router (locked by the
          Message 4 of 8 , Aug 30, 2009
            > On Sunday 30 August 2009 13:11:17 vhadiant wrote:
            > > Hi,
            > >
            > > I'm making mods on my resolv.conf to add new name servers (using OpenDNS):
            > >
            > > nameserver 208.67.222.222
            > > nameserver 208.67.220.220
            > >
            > > But when I rebooted NSLU it overwrote resolv.conf to its original settings.
            > > How do I change the nameservers properly?
            >
            > Are you using DHCP? This will do what you see.
            >
            > Try using a static IP, or telling your DHCP server to use the desired
            > nameservers.


            Yes I am using DHCP. I can change my router to set the static IP to
            the NSLU but unfortunately I can't change the DNS settings on the
            router (locked by the ISP).

            How do I set NSLU to use static IP?

            Thanks,
            Victor
          • Brian Wood
            ... The buggers :-) Often an ISP wants to be sure you use their DNS servers so they can direct you to their search page in the event of an unfound domain
            Message 5 of 8 , Aug 30, 2009
              On Sunday 30 August 2009 15:00:11 Victor Hadianto wrote:
              > > On Sunday 30 August 2009 13:11:17 vhadiant wrote:
              > > > Hi,
              > > >
              > > > I'm making mods on my resolv.conf to add new name servers (using
              > > > OpenDNS):
              > > >
              > > > nameserver 208.67.222.222
              > > > nameserver 208.67.220.220
              > > >
              > > > But when I rebooted NSLU it overwrote resolv.conf to its original
              > > > settings. How do I change the nameservers properly?
              > >
              > > Are you using DHCP? This will do what you see.
              > >
              > > Try using a static IP, or telling your DHCP server to use the desired
              > > nameservers.
              >
              > Yes I am using DHCP. I can change my router to set the static IP to
              > the NSLU but unfortunately I can't change the DNS settings on the
              > router (locked by the ISP).

              The buggers :-) Often an ISP wants to be sure you use their DNS servers so
              they can direct you to their search page in the event of an unfound domain
              (nxerror).

              Personally I would complain loudly to my ISP if they tried something like
              that, but that's up to you.

              Try browsing to a non-existent domain and see if your ISP's search page comes
              up, and complain if it does, they should not be doing that IMHO, it means
              they are fooling around with DNS responses, not their job to do that.

              >
              > How do I set NSLU to use static IP?

              I'm not sure, it would depend in what version of Linux you are running on your
              slug. I use Debian, which you can set to static thusly:

              http://www.nflug.org/pipermail/nflug/2005-July/021014.html

              I know the other NSLU2 firmwares are different from standard Debian, but I
              haven't used anything but Debian on my slugs in years.

              I thought you could set up a static IP in the firmware during the setup of the
              slug, but it's been a long time...

              You could also run a script to echo the desired nameservers
              into /etc/resolv.conf. after the system comes up. Again, I can tell you how
              to do this on Debian, not sure how your version would need to be set up.

              It's also possible you could set up resolv.conf with 444 or 400 permissions,
              I'm not sure if that would prevent the dhcp client from changing them or not,
              but it might.

              Hopefully someone more familiar with your particular version of firmware can
              give you more specific info.

              --
              Brian Wood
              bwood@...
            • Legrandin
              At least for Debian, if resolv.conf is installed, /etc/resolv.conf is just a symbolic link, and to have your own you just need to replace the link with a
              Message 6 of 8 , Aug 30, 2009
                At least for Debian, if resolv.conf is installed, /etc/resolv.conf is
                just a symbolic link, and to have your own you just need to replace
                the link with a proper file.

                Otherwise, if resolv.conf is really overwritten by dhclient, you
                should add an entry like:

                supersede domain-name-servers <dns1-ip>, <dns2-ip>;

                into you /etc/dhclient.conf file.

                > I'm making mods on my resolv.conf to add new name servers (using OpenDNS):
                >
                > nameserver 208.67.222.222
                > nameserver 208.67.220.220
                >
                > But when I rebooted NSLU it overwrote resolv.conf to its original
                > settings. How do I change the nameservers properly?
                >
              • Victor Hadianto
                ... This file does not exist on my nslu. I m using Unslung by the way, what s the equivalent of this file in Unslung? Regards, Victor
                Message 7 of 8 , Aug 30, 2009
                  > At least for Debian, if resolv.conf is installed, /etc/resolv.conf is
                  > just a symbolic link, and to have your own you just need to replace
                  > the link with a proper file.
                  >
                  > Otherwise, if resolv.conf is really overwritten by dhclient, you
                  > should add an entry like:
                  >
                  > supersede domain-name-servers <dns1-ip>, <dns2-ip>;
                  >
                  > into you /etc/dhclient.conf file.

                  This file does not exist on my nslu. I'm using Unslung by the way,
                  what's the equivalent of this file in Unslung?

                  Regards,
                  Victor
                • Mike Westerhof (mwester)
                  ... Unslung is the Linksys firmware, opened up. It is not very compatible with any standard Linux system, I m afraid. You ll have to set your Unslung system
                  Message 8 of 8 , Aug 31, 2009
                    Victor Hadianto wrote:
                    >> At least for Debian, if resolv.conf is installed, /etc/resolv.conf is
                    >> just a symbolic link, and to have your own you just need to replace
                    >> the link with a proper file.
                    >>
                    >> Otherwise, if resolv.conf is really overwritten by dhclient, you
                    >> should add an entry like:
                    >>
                    >> supersede domain-name-servers <dns1-ip>, <dns2-ip>;
                    >>
                    >> into you /etc/dhclient.conf file.
                    >
                    > This file does not exist on my nslu. I'm using Unslung by the way,
                    > what's the equivalent of this file in Unslung?

                    Unslung is the Linksys firmware, opened up. It is not very compatible
                    with any standard Linux system, I'm afraid. You'll have to set your
                    Unslung system to boot with a fixed IP, then you can enter the DNS
                    servers that you wish.

                    There may be a way to do this with diversion scripts, but I rather
                    suspect the Linksys code will simply overwrite your changes each time it
                    renews the DHCP lease. Just go the easy way; use a static IP on Unslung.

                    Mike (mwester)
                  Your message has been successfully submitted and would be delivered to recipients shortly.