Deutsch| English

Eigene DNS Server (Primär und Sekundär) mit ISPConfig 3 aufsetzen (Debian Squeeze)

Version 1.0

Author: Falko Timme <ft [at] falkotimme [dot] com>, <c [dot] schmalfeld [at] projektfarm [dot] de>

Follow me on Twitter

Last edited 08/26/2011

Dieses Tutorial zeigt Ihnen, wie Sie mit ISPConfig 3 ihre eigenen primären und sekundären DNS Server aufsetzen können. Um dies zu bewerkstelligen, brauchen Sie zwei Server mit verschiedenen öffentlichen IP-Adressen und installiertem ISPConfig 3. Ich werde für beide DNS Server Debian Squeeze benutzen, um den Setup-Prozess und die ISPConfig 3 Installation zu demonstrieren, sobald Sie ISPConfig 3 jedoch installiert haben, ist die Distribution die Sie benutzen im Grunde egal, da die ISPConfig 3 Konfiguration für alle Distributionen identisch ist.

Ich gebe für den Inhalt dieses Tutorials keinerlei Garantie!

1 Vorbemerkung

Unsere derzeitige Situation sieht wie folgt aus: wir haben

  • ISPConfig server #1 (server1.example.com):
    IP address 1.2.3.4; dies wird unser
    primäre
    Nameserver.
  • ISPConfig server #2 (server2.example.com):
    IP address 1.2.3.5; dies wird unser sekundäre
    Nameserver.

server1.example.com wird eine vollwertige ISPConfig 3 Installation. Er wird der Master ISPConfig 3 Server (welcher die ISPConfig Kontrolloberfläche benutzt) und als Email-, Web-, DNS- und MySQL-Server agieren (dies ist das häufigste Setup - ein Server mit allen Funktionen). server2.example.com wird der Slave ISPConfig 3 Server (keine ISPConfig Kontrolloberfläche) und wird nur als sekundärer DNS Server agieren. Natürlich können Sie alle Dienste aufteilen wie Sie es wollen - das englischsprachige Tutorial Installing A Multiserver Setup With Dedicated Web, Email, DNS And MySQL Database Servers On Debian 5.0 With ISPConfig 3 müsste Ihnen hier weiterhelfen können.

DNS A Records für server1.example.com und server2.example.com müssen bereits existieren (Sie können sie in der Kontrolloberfläche ihres Domainregistrars erstellen). Wir werden server1.example.com und server2.example.com später als Nameserver für unsere Zonen benutzen; wenn Sie etwas wie ns1.example.com und ns2.example.com lieber mögen als server1.example.com und server2.example.com, können sie stattdessen diese Namen benutzen,  stellen Sie dann jedoch sicher, dass es DNS A Records für ns1.example.com und ns2.example.com gibt (die auf die gleichen IPs zeigen wie server1.example.com oder server2.example.com).

Ich werde Ihnen zeigen, wie man Zonen für die Domain mydomain.com erstellt - diese Domain muss bereits durch einen Domainregistrar registriert worden sein. Nachdem ich die mydomain.com Zone erstellt habe und verifiziert habe, dass sowohl server1.example.com als auch server2.example.com allen mydomain.com Records korrekt unterstellt sind, werde ich zeigen, wie man server1.example.com und server2.example.com zu den authoritativen Nameservern für mydomain.com macht(siehe Kapitel 8).

Mehr Details darüber, wie man DNS Zonen/Records erstellt, finden Sie in Kapitel 4.8 und 5.12 des ISPConfig 3 Manual.

2 Aufsetzen von server1.example.com (Primärer DNS Server)

server1.example.com:

Bitte setzen Sie server1.example.com wie in diesem Tutorial auf, Der Perfekte Server - Debian Squeeze (Debian 6.0) mit BIND und Courier [ISPConfig 3], halten Sie jedoch vor der ISPConfig 3 Installation ein.

Um allen Exemplaren von MySQL zu erlauben, auf dieser Verbindung während der ISPConfig 3 Installation auf die MySQL Datenbank
zuzugreifen, müssen Sie zunächst MySQL root-Benutzer Records für jeden Slaveserver Hostnamen und jede IP-Adresse zur Master Datenbank hinzufügen. Loggen Sie sich dazu in MySQL ein:

mysql -u root -p

Benutzen Sie in der MySQL Shell folgende Befehle:

CREATE USER ‘root’@'1.2.3.5′ IDENTIFIED BY
‘yourrootsqlpassword’;

GRANT ALL PRIVILEGES ON * . * TO ‘root’@'1.2.3.5′ IDENTIFIED BY
‘yourrootsqlpassword’ WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0
MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS
0 ;

CREATE USER ‘root’@’server2.example.com’ IDENTIFIED
BY ‘yourrootsqlpassword’;

GRANT ALL PRIVILEGES ON * . * TO ‘root’@’server2.example.com’
IDENTIFIED BY ‘yourrootsqlpassword’ WITH GRANT OPTION
MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR
0 MAX_USER_CONNECTIONS 0 ;

FLUSH PRIVILEGES;

quit;

Stellen Sie sicher, dass Sie 1.2.3.5 mit der IP-Adresse und server2.example.com mit dem Hostnamen Ihres sekundären DNS Servers ersetzen!

Nun können Sie ISPConfig 3 wie folgt auf server1.example.com installieren:

cd /tmp

wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz

tar xfz ISPConfig-3-stable.tar.gz

cd ispconfig3_install/install/

php -q install.php

root@server1:/tmp/ispconfig3_install/install# php -q install.php

--------------------------------------------------------------------------------

_____ ___________   _____              __ _         ____

|_   _/  ___| ___  /  __             / _(_)       /__

| |  `--.| |_/ / | /  / ___  _ __ | |_ _  __ _    _/ /

| |  `--.   __/  | |    / _ | ’_ |  _| |/ _` |  |_ |

_| |_/__/ / |     | __/ (_) | | | | | | | (_| | ___

___/____/_|      ____/___/|_| |_|_| |_|__, | ____/

__/ |

|___/

--------------------------------------------------------------------------------

>> Initial configuration

Operating System: Debian 6.0 (Squeeze/Sid) or compatible

Following will be a few questions for primary configuration so be careful.

Default values are in [brackets] and can be accepted with <ENTER>.

Tap in ”quit” (without the quotes) to stop the installer.

Select language (en,de) [en]: <-- ENTER

Installation mode (standard,expert) [standard]: <-- expert

Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [server1.example.com]: <-- ENTER

MySQL server hostname [localhost]: <-- ENTER

MySQL root username [root]: <-- ENTER

MySQL root password []: <-- Ihrrootsqlpasswort

MySQL database to create [dbispconfig]: <-- ENTER

MySQL charset [utf8]: <-- ENTER

Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: <-- ENTER

Adding ISPConfig server record to database.

Configure Mail (y,n) [y]: <-- ENTER

Configuring Postfix

Generating a 2048 bit RSA private key

………………………………………………………………………………..+++

……………………..+++

writing new private key to ’smtpd.key’

-----

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter ’.', the field will be left blank.

-----

Country Name (2 letter code) [AU]: <-- ENTER

State or Province Name (full name) [Some-State]: <-- ENTER

Locality Name (eg, city) []: <-- ENTER

Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER

Organizational Unit Name (eg, section) []: <-- ENTER

Common Name (eg, YOUR name) []: <-- ENTER

Email Address []: <-- ENTER

Configuring SASL

Configuring PAM

Configuring Courier

Configuring Spamassassin

Configuring Amavisd

Configuring Getmail

Stopping Postfix Mail Transport Agent: postfix.

Starting Postfix Mail Transport Agent: postfix.

Stopping SASL Authentication Daemon: saslauthd.

Starting SASL Authentication Daemon: saslauthd.

Stopping amavisd: amavisd-new.

Starting amavisd: amavisd-new.

Stopping ClamAV daemon: clamd.

Starting ClamAV daemon: clamd Bytecode: Security mode set to ”TrustSigned”.

.

Stopping Courier authentication services: authdaemond.

Starting Courier authentication services: authdaemond.

Stopping Courier IMAP server: imapd.

Starting Courier IMAP server: imapd.

Stopping Courier IMAP-SSL server: imapd-ssl.

Starting Courier IMAP-SSL server: imapd-ssl.

Stopping Courier POP3 server: pop3d.

Starting Courier POP3 server: pop3d.

Stopping Courier POP3-SSL server: pop3d-ssl.

Starting Courier POP3-SSL server: pop3d-ssl.

Configure Jailkit (y,n) [y]: <-- ENTER

Configuring Jailkit

Configure FTP Server (y,n) [y]: <-- ENTER

Configuring Pureftpd

Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -Y 1 -8 UTF-8 -H -D -b -O clf:/var/log/pure-ftpd/transfer.log -E -u 1000 -A -B

Configure DNS Server (y,n) [y]: <-- ENTER

Configuring BIND

Hint: If this server shall run the ISPConfig interface, select ’y' in the ’Configure Apache Server’ option.

Configure Apache Server (y,n) [y]: <-- ENTER

Configuring Apache

Configuring Vlogger

Configuring Apps vhost

Configure Firewall Server (y,n) [y]: <-- ENTER

Configuring Firewall

Install ISPConfig Web Interface (y,n) [y]: <-- ENTER

Installing ISPConfig

ISPConfig Port [8080]: <-- ENTER

Enable SSL for the ISPConfig web interface (y,n) [y]: <-- ENTER

Generating RSA private key, 4096 bit long modulus

…………………………………………………………………………………………………..++

…………………………….++

e is 65537 (0×10001)

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter ’.', the field will be left blank.

-----

Country Name (2 letter code) [AU]: <-- ENTER

State or Province Name (full name) [Some-State]: <-- ENTER

Locality Name (eg, city) []: <-- ENTER

Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER

Organizational Unit Name (eg, section) []: <-- ENTER

Common Name (eg, YOUR name) []: <-- ENTER

Email Address []: <-- ENTER

Please enter the following ’extra’ attributes

to be sent with your certificate request

A challenge password []: <-- ENTER

An optional company name []: <-- ENTER

writing RSA key

Configuring DBServer

Installing ISPConfig crontab

no crontab for root

no crontab for getmail

Restarting web server: apache2 … waiting .

Installation completed.

root@server1:/tmp/ispconfig3_install/install#

Sollten Sie sich dafür entschieden haben, SSL für die ISPConfig Weboberfläche zu benutzen, können Sie diese nun unter https://server1.example.com:8080 oder http://server1.example.com:8080 erreichen.

3 Aufsetzen von server2.example.com (Sekundärer DNS Server)

server2.example.com:

server2.example.com kann nach Kapitel 6 des englischsprachigen Tutorials Installing A Multiserver Setup With Dedicated Web,
Email, DNS And MySQL Database Servers On Debian 5.0 With ISPConfig 3
aufgesetzt werden. Ich werde die Schritte hier wiederholen:

apt-get -y install ntp ntpdate

apt-get -y install mysql-client mysql-server

New password for the MySQL “root” user: <-- Ihrrootsqlpasswort

Repeat password for the MySQL “root” user: <-- Ihrrootsqlpasswort

apt-get -y install php5-cli php5-mysql php5-mcrypt
mcrypt

apt-get -y install bind9 dnsutils

ISPConfig 3 kann nun wie folgt installiert werden:

cd /tmp

wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz

tar xfz ISPConfig-3-stable.tar.gz

cd ispconfig3_install/install/

php -q install.php

root@server2:/tmp/ispconfig3_install/install# php -q install.php

--------------------------------------------------------------------------------
_____ ___________   _____              __ _         ____
|_   _/  ___| ___  /  __             / _(_)       /__
| |  `--.| |_/ / | /  / ___  _ __ | |_ _  __ _    _/ /
| |  `--.   __/  | |    / _ | ’_ |  _| |/ _` |  |_ |
_| |_/__/ / |     | __/ (_) | | | | | | | (_| | ___
___/____/_|      ____/___/|_| |_|_| |_|__, | ____/
__/ |
|___/
--------------------------------------------------------------------------------

>> Initial configuration

Operating System: Debian 6.0 (Squeeze/Sid) or compatible

Following will be a few questions for primary configuration so be careful.

Default values are in [brackets] and can be accepted with <ENTER>.

Tap in ”quit” (without the quotes) to stop the installer.

Select language (en,de) [en]: <-- ENTER

Installation mode (standard,expert) [standard]: <-- expert

Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [server2.example.com]: <-- ENTER

MySQL server hostname [localhost]: <-- ENTER

MySQL root username [root]: <-- ENTER

MySQL root password []: <-- Ihrrootsqlpasswort

MySQL database to create [dbispconfig]: <-- ENTER

MySQL charset [utf8]: <-- ENTER

Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: <-- y

MySQL master server hostname []: <-- server1.example.com

MySQL master server root username [root]: <-- ENTER

MySQL master server root password []: <-- Ihrrootsqlpasswort_auf_server1.example.com

MySQL master server database name [dbispconfig]: <-- name_der_ispconfig_database_auf_server1.example.com

Adding ISPConfig server record to database.

Configure Mail (y,n) [y]: <-- n

Configure Jailkit (y,n) [y]: <-- n

Configure FTP Server (y,n) [y]: <-- n

Configure DNS Server (y,n) [y]: <-- ENTER

Configuring BIND

Hint: If this server shall run the ISPConfig interface, select ’y' in the ’Configure Apache Server’ option.

Configure Apache Server (y,n) [y]: <-- n

Configure Firewall Server (y,n) [y]: <-- ENTER

Configuring Firewall

Install ISPConfig Web Interface (y,n) [y]: <-- n

Configuring DBServer

Installing ISPConfig crontab

no crontab for root

Installation completed.

root@server2:/tmp/ispconfig3_install/install#

 

 

Kommentar

Du musst eingeloggt um einen Kommentar zu hinterlassen.