Re: nameserver changing

From: Giorgos Keramidas (keramida_at_ceid.upatras.gr)
Date: 05/31/05

  • Next message: Vizion: "Re: I am sure I am dense - but I dont know why!!"
    Date: Wed, 1 Jun 2005 00:57:02 +0300
    To: Vizion <vizion@vizion.occoxmail.com>
    
    

    On 2005-05-31 14:33, Vizion <vizion@vizion.occoxmail.com> wrote:
    > Hi
    >
    > I want to be able to automatically remove/add one or more dns servers from the
    > list of dns's used as resolvers by particular machine(s) on a network which I
    > control from data stored in a file in each computer.
    > e.g file might contain lines such as:
    > xxx.xxx.xxx.xxx remove dns xxx.xxx.xxx
    > xxx.xxx.xxx.xxx add dns xxx.xxx.xxx
    > None of the machines are running their own dns servers.
    > The changes will be initiated by cron.
    >
    > Don't ask me why I need to do it -- the answer is far too complicated :-)
    >
    > Suggestions please

    You could use the "template" file as a source and generate a shell
    script that will be scp'ed and executed on each host. If you have enoug
    time, you could write a Perl script that will read this format:

            10.0.0.0/8 remove *
            10.0.0.0/8 add 10.0.0.2

    and then create one Perl script for every host. The script could be
    scp'ed (if you have SSH keys set up correctly) and run remotely, with
    something like:

            # cat scripts/10.0.0.1.sh | ssh -l root 10.0.0.1

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Vizion: "Re: I am sure I am dense - but I dont know why!!"

    Relevant Pages

    • Re: nameserver changing
      ... Re: nameserver changing: ... >> None of the machines are running their own dns servers. ... >script that will be scp'ed and executed on each host. ... >and then create one Perl script for every host. ...
      (freebsd-questions)
    • How to setup PerLDAP
      ... Copy a test Perl script getentry.pl on page 380: ... die "Could not connect to LDAP $host" unless $conn ... It obvious that I missed something while setting up PerLDAP. ... Directory Server: ...
      (SunManagers)
    • Re: Bash: How do I quote CR &| LF in a command?
      ... >> I want to do in bash what the above perl script does. ... Thanks for your reply too Stephane - I need the Host: header because ... I'm working with LVS real servers inside the realserver network, ...
      (comp.unix.shell)
    • scripting gethostbyname
      ... Here's a 3 line perl script that prints the IP address of a named host: ... use Socket; ...
      (microsoft.public.scripting.vbscript)