+ Responder ao Tópico



  1. #1

    Padrão DNS Bind9 FreeBSD

    Ola,
    Gostaria de uma informação...
    quando vou executar o comando dentro da pasta /etc/namedb no freebsd apos ter instalado ou apenas habilitado no rc.conf o named_enable o arquivo de makelocalhost n existe alguem ja passou por isso para executar os arquivos localhost ou se não e necessario pelo que eu vi no handbook é necessario.
    obrigado a todos

  2. #2

    Padrão

    procurar por "make-localhost"

    vc criar os localhost manualmente,procurar na net exemplos

  3. #3

    Padrão

    Amigo,
    Tem como da um exemplo de como eu crio os make-localhost
    pois n consegui...
    se possivel
    obrigado.

  4. #4

    Padrão

    Código :
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
    export PATH
     
    if [ "`hostname -s`" != "`hostname`" ]; then
            # hostname must contain domain
     
            host=`hostname -s`
            fullhost=`hostname`
            domain=`echo $fullhost | sed "s/^$host\.//"`
    else
            host=`hostname`
     
            if [ -z "$1" ]; then
                    echo -n 'Enter your domain name: '
                    read domain
            else
                    domain="$1"
            fi
     
            # strip trailing dot, if any
            domain=`echo $domain | sed 's/\.$//'`
            fullhost="$host.$domain"
    fi
     
    date=`date +"%Y%m%d"`
     
    mkdir -p master
     
    mv -f master/localhost-v6.rev master/localhost-v6.rev.BAK 2>/dev/null
     
    sed -e "s/@host@/$fullhost/g" \
            -e "s/@domain@/$domain/g" \
            -e "s/@date@/$date/g" \
            < PROTO.localhost-v6.rev > master/localhost-v6.rev
     
    mv -f master/localhost.rev master/localhost.rev.BAK 2>/dev/null
     
    exec sed -e "s/@host@/$fullhost/g" \
            -e "s/@domain@/$domain/g" \
            -e "s/@date@/$date/g" \
            < PROTO.localhost.rev > master/localhost.rev

  5. #5

    Padrão

    Amigo,
    Obrigado pelo script
    mas poderia me dar mais uma ajudinha
    esta me dando o seguinte erro
    gateway2# sh make-localhost
    make-localhost: cannot open PROTO.localhost-v6.rev: No such file or directory
    make-localhost: cannot open PROTO.localhost.rev: No such file or directory
    não esta localizando alguns arquivos....

    estou executando o bind sobre freebsd

  6. #6

    Padrão

    Amigo,
    Obrigado pelo script
    mas poderia me dar mais uma ajudinha
    esta me dando o seguinte erro
    Código :
    gateway2# sh make-localhost
    make-localhost: cannot open PROTO.localhost-v6.rev: No such file or directory
    make-localhost: cannot open PROTO.localhost.rev: No such file or directory
    não esta localizando alguns arquivos....

    no sh make-localhost ja tentei executar assim tbm
    Código :
    gateway2# sh make-localhost [URL="http://www.site.com.br"]www.site.com.br[/URL]
    mas acontece o mesmo erro

    estou executando o bind sobre freebsd

  7. #7

    Padrão

    Bom, eu sei que é sobre freebsd. É que nos novos freebsd o make-localhost nao ta mais presente.

    Pois bem....



    PROTO.localhost.rev
    Código :
    ;       From: @(#)localhost.rev 5.1 (Berkeley) 6/30/90
    ; $FreeBSD: src/etc/namedb/PROTO.localhost.rev,v 1.6 2000/01/10 15:31:40 peter Exp $
    ;
    ; This file is automatically edited by the `make-localhost' script in
    ; the /etc/namedb directory.
    ;
     
    $TTL    3600
     
    @       IN      SOA     @host@. root.@host@.  (
                                    @date@  ; Serial
                                    3600    ; Refresh
                                    900     ; Retry
                                    3600000 ; Expire
                                    3600 )  ; Minimum
            IN      NS      @host@.
    1       IN      PTR     localhost.@domain@.



    PROTO.localhost-v6.rev

    Código :
    ;       From: @(#)localhost.rev 5.1 (Berkeley) 6/30/90
    ; $FreeBSD: src/etc/namedb/PROTO.localhost-v6.rev,v 1.1 2002/01/22 17:22:41 ume Exp $
    ;
    ; This file is automatically edited by the `make-localhost' script in
    ; the /etc/namedb directory.
    ;
     
    $TTL    3600
     
    @       IN      SOA     @host@. root.@host@.  (
                                    @date@  ; Serial
                                    3600    ; Refresh
                                    900     ; Retry
                                    3600000 ; Expire
                                    3600 )  ; Minimum
            IN      NS      @host@.
            IN      PTR     localhost.@domain@.


    Feito.


    Saudações,