Linux - Netzwerk und Serveradminstration NTP: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(7 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 3: Zeile 3:
  
 
== Vorbereitungen ==
 
== Vorbereitungen ==
* VirtualBox Server-Vorlage mit neuen MAC-Adressen klonen
+
* VirtualBox Server-Vorlage klonen
 
* Der Host soll im ''DMZ''-Netzwerk liegen
 
* Der Host soll im ''DMZ''-Netzwerk liegen
* IP-Adresse herausfinden über das DHCP-Log oder die Konsole
+
* statische IP-Adresse nach dem Netzwerkplan setzen (''/etc/network/interfaces'')
* statische IP-Adresse nach dem Netzwerkplan setzen
+
* SSH-Schlüssel des Kit Hosts für User ''kit''  hinterlegen
* Hostname ändern
+
=== Netzkonfiguration DNS-Server (DMZ) ===
* DNS-Eintrag vornehmen
 
* SSH-Server anpassen
 
  
===Daten===
+
{| class="wikitable" style="background-color: #f2f2f2;"
*NET: DMZ
+
! Parameter !! Wert !! Erläuterung
*IP 10.88.2XX.17/24
+
|-
*GW 10.88.2XX.1
+
| '''Netzwerk (NIC)''' || DMZ || Interface-Zuweisung in VirtualBox
*NS 10.88.2XX.21
+
|-
*NA ntp.it2XX.int
+
| '''IP''' || 10.88.2XX.17 || Statische IP
 +
|-
 +
| '''CIDR''' || 24 || Classless Inter-Domain Routing Präfixlänge
 +
|-
 +
| '''GW''' || 10.88.2XX.1 || GATEWAY
 +
|-
 +
| '''NS''' || 10.88.2XX.21 || Resolver
 +
|-
 +
| '''FQDN''' || ntp.it2XX.int || Fully Qualified Domain Name
 +
|-
 +
| '''SHORT''' || ntp || Short Name
 +
|-
 +
| '''DOM''' || it2XX.int|| Domain Name
 +
|}
 +
;Anpassen des Templates
 +
*[[Anpassen des Debian Templates]]
  
*[[Anpassen der Virtuellen Maschinen Netzwerk und Serveradministration]]
+
=installieren ntp=
 +
*sudo apt install ntpsec
 +
=Anpassen=
 +
*cat /etc/ntpsec/ntp.conf
 +
driftfile /var/lib/ntpsec/ntp.drift
 +
leapfile /usr/share/zoneinfo/leap-seconds.list
 +
tos maxclock 11
 +
tos minclock 4 minsane 3
 +
pool 0.debian.pool.ntp.org iburst
 +
pool 1.debian.pool.ntp.org iburst
 +
pool 2.debian.pool.ntp.org iburst
 +
pool 3.debian.pool.ntp.org iburst
 +
restrict default kod nomodify noquery limited
 +
restrict 10.88.2XX.0 mask 255.255.255.0 nomodify notrap
 +
restrict 172.26.2XX.0 mask 255.255.255.0 nomodify notrap
 +
restrict 10.2XX.1.0 mask 255.255.255.0 nomodify notrap
 +
restrict ::1
  
installieren ntp
+
=Handling wie gehabt=
*sudo apt install ntpsec
+
*systemctl status  ntpsec
 +
*journalctl -fu ntpsec
 +
*ntpq -p
  
===NTP mit DHCP verteilen===
+
=Wo lauscht der ntpserver=
 +
*ss -lnup | grep 123
 +
=Wie bindet man die Clients=
 +
==Statitsch==
 +
;Inmstallation auf dem Client
 +
*apt install ntpsec
 +
;Konfiguration
 +
*cat /etc/ntpsec/ntp.conf
 +
driftfile /var/lib/ntpsec/ntp.drift
 +
leapfile /usr/share/zoneinfo/leap-seconds.list
 +
tos maxclock 11
 +
tos minclock 4 minsane 3
 +
restrict default kod nomodify noquery limited
 +
restrict 127.0.0.1
 +
restrict ::1
 +
server ntp.it213.int
 +
==NTP mit DHCP verteilen==
 
*[[KEA DHCP NTP-Konfiguration - Netzwerk und Serveradministration]]
 
*[[KEA DHCP NTP-Konfiguration - Netzwerk und Serveradministration]]

Aktuelle Version vom 24. April 2026, 09:02 Uhr

NTP Server

Vorbereitungen

  • VirtualBox Server-Vorlage klonen
  • Der Host soll im DMZ-Netzwerk liegen
  • statische IP-Adresse nach dem Netzwerkplan setzen (/etc/network/interfaces)
  • SSH-Schlüssel des Kit Hosts für User kit hinterlegen

Netzkonfiguration DNS-Server (DMZ)

Parameter Wert Erläuterung
Netzwerk (NIC) DMZ Interface-Zuweisung in VirtualBox
IP 10.88.2XX.17 Statische IP
CIDR 24 Classless Inter-Domain Routing Präfixlänge
GW 10.88.2XX.1 GATEWAY
NS 10.88.2XX.21 Resolver
FQDN ntp.it2XX.int Fully Qualified Domain Name
SHORT ntp Short Name
DOM it2XX.int Domain Name
Anpassen des Templates

installieren ntp

  • sudo apt install ntpsec

Anpassen

  • cat /etc/ntpsec/ntp.conf
driftfile /var/lib/ntpsec/ntp.drift
leapfile /usr/share/zoneinfo/leap-seconds.list
tos maxclock 11
tos minclock 4 minsane 3
pool 0.debian.pool.ntp.org iburst
pool 1.debian.pool.ntp.org iburst
pool 2.debian.pool.ntp.org iburst
pool 3.debian.pool.ntp.org iburst
restrict default kod nomodify noquery limited
restrict 10.88.2XX.0 mask 255.255.255.0 nomodify notrap
restrict 172.26.2XX.0 mask 255.255.255.0 nomodify notrap
restrict 10.2XX.1.0 mask 255.255.255.0 nomodify notrap
restrict ::1

Handling wie gehabt

  • systemctl status ntpsec
  • journalctl -fu ntpsec
  • ntpq -p

Wo lauscht der ntpserver

  • ss -lnup | grep 123

Wie bindet man die Clients

Statitsch

Inmstallation auf dem Client
  • apt install ntpsec
Konfiguration
  • cat /etc/ntpsec/ntp.conf
driftfile /var/lib/ntpsec/ntp.drift
leapfile /usr/share/zoneinfo/leap-seconds.list
tos maxclock 11
tos minclock 4 minsane 3
restrict default kod nomodify noquery limited
restrict 127.0.0.1
restrict ::1
server ntp.it213.int

NTP mit DHCP verteilen