Mon forum PunBB

Malheureusement personne ne peut vous dire ce que PunBB est - vous devez le voir par vous-même.

Vous n'êtes pas identifié.

#1 30-01-2019 18:26:35

willy
Administrateur
Date d'inscription: 13-02-2016
Messages: 8

Bind9 en local et apache 2.4 sur un autre pc

named.conf.options

Code:

options {
    directory "/var/cache/bind";

    // If there is a firewall between you and nameservers you want
    // to talk to, you may need to fix the firewall to allow multiple
    // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

    // If your ISP provided one or more IP addresses for stable 
    // nameservers, you probably want to use them as forwarders.  
    // Uncomment the following block, and insert the addresses replacing 
    // the all-0's placeholder.

     forwarders {
         212.27.40.241;
        212.27.40.240;
     };

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
};

named.conf.local

Code:

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
include "/etc/bind/zones.rfc1918";

    zone "home" IN {
                    type master;
                    file "/etc/bind/db.home";
    };

    zone "0.168.192.in-addr.arpa" {
                    type master;
                    notify no;
                    file "/etc/bind/db.0.168.192.in-addr.arpa";
    };

db.home

Code:

;
; BIND data file for local loopback interface
;
$TTL    604800
@    IN    SOA    ns.home. admin.home. (
            201901303    ; Serial
             604800        ; Refresh
              86400        ; Retry
            2419200        ; Expire
             604800 )    ; Negative Cache TTL
;
@    IN    NS    ns.home.
@    IN    A    127.0.0.1
@    IN    AAAA    ::1
NS    IN    A    192.168.0.2
web    IN    A    192.168.0.4
angular    IN    CNAME    web
mvc-ar    IN    CNAME    web
api    IN    CNAME    web

db.0.168.192.in-addr.arpa

Code:

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@    IN    SOA    ns.home. admin.home. (
             201901301    ; Serial
             604800        ; Refresh
              86400        ; Retry
            2419200        ; Expire
             604800 )    ; Negative Cache TTL
;
@    IN    NS    ns.home.
2    IN    PTR    ns.home.

et rajouter dans les vhost d'apache un alias nomdusite.home
ex ServerAlias angular.home

qui peut être appeler par http://angular.home

Hors ligne

 

#2 31-01-2019 11:52:21

willy
Administrateur
Date d'inscription: 13-02-2016
Messages: 8

Re: Bind9 en local et apache 2.4 sur un autre pc

On peut aussi mettre l'adresse de la box pour la redirection des dns du FAI

named.conf.options

Code:

options {
    directory "/var/cache/bind";

    // If there is a firewall between you and nameservers you want
    // to talk to, you may need to fix the firewall to allow multiple
    // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

    // If your ISP provided one or more IP addresses for stable 
    // nameservers, you probably want to use them as forwarders.  
    // Uncomment the following block, and insert the addresses replacing 
    // the all-0's placeholder.

     forwarders {
        //212.27.40.241;
        //212.27.40.240;

        // Adresse ip de la box free
        192.168.0.254
     };

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
};

Hors ligne

 

#3 31-01-2019 12:02:06

willy
Administrateur
Date d'inscription: 13-02-2016
Messages: 8

Re: Bind9 en local et apache 2.4 sur un autre pc

On peut aussi éviter les CNAME qui sont parait-il plus long

db.home

Code:

;
; BIND data file for local loopback interface
;
$TTL    604800
@    IN    SOA    ns.home. admin.home. (
            201901303    ; Serial
             604800        ; Refresh
              86400        ; Retry
            2419200        ; Expire
             604800 )    ; Negative Cache TTL
;
@    IN    NS    ns.home.
@    IN    A    127.0.0.1
@    IN    AAAA    ::1
NS    IN    A    192.168.0.2
web    IN    A    192.168.0.4
angular    IN    A    192.168.0.4
mvc-ar     IN   A    192.168.0.4
api    IN    A    192.168.0.4

Hors ligne

 

Pied de page des forums

Propulsé par PunBB
© Copyright 2002–2005 Rickard Andersson
Traduction par punbb.fr