141 lines
4.2 KiB
TeX
141 lines
4.2 KiB
TeX
\chapter{Vorwort}
|
|
Diese Dokumentation beschreibt die Installation und den Betrieb des IPv6-VPN-Dienst auf Basis von OpenVPN.
|
|
Die Hintergründe zu der hier vorgestellten Konfiguration können in der dazugehörigen Masterarbeit \enquote{Konzeption und Umsetzung eines IPv6-VPN für die Abteilung Informatik} nachgelesen werden.
|
|
|
|
\section{Konfigurationsvorgaben}
|
|
Folgende Parameter wurden für die Konfiguration des Servers in Absprache mit dem IT-Team festgelegt:
|
|
\begin{itemize}
|
|
\item Hostname der Maschine: \texttt{aither.inform.hs-hannover.de}
|
|
\item Hostname des OpenVPN-Dienstes: \texttt{vpn-test.inform.hs-hannover.de}
|
|
\item IP-Adressen der Maschine
|
|
\begin{itemize}
|
|
\item \texttt{141.71.38.70/24}
|
|
\item \texttt{2001:638:614:1780::131/64}
|
|
\end{itemize}
|
|
\item IP-Adressen der zu benutzenden Gateways
|
|
\begin{itemize}
|
|
\item \texttt{141.71.38.1}
|
|
\item \texttt{2001:638:614:1780::1}
|
|
\end{itemize}
|
|
\item IP-Adressen des OpenVPN-Dienstes
|
|
\begin{itemize}
|
|
\item \texttt{141.71.38.7}
|
|
\item \texttt{2001:638:614:1780::7}
|
|
\end{itemize}
|
|
\item IP-Adressbereich für VPN-Clients
|
|
\begin{itemize}
|
|
\item \texttt{10.2.0.0/16}
|
|
\item \texttt{2001:638:614:1750::/64}
|
|
\end{itemize}
|
|
\end{itemize}
|
|
|
|
|
|
\chapter{Konfiguration des Grundsystems}
|
|
\paragraph{Hostname}
|
|
Sofern der Hostname bei der Installation von Debian nicht schon gesetzt wurde, so muss dies in den Dateien \texttt{/etc/hostname}, \texttt{/etc/mailname} und \texttt{/etc/hosts} nachgeholt werden.
|
|
\begin{lstlisting}
|
|
# echo "aither" > /etc/hostname
|
|
# echo "aither.inform.hs-hannover.de" > /etc/mailname
|
|
\end{lstlisting}
|
|
In \texttt{/etc/hosts} muss der Eintrag für \texttt{127.0.1.1} angepasst werden:
|
|
\begin{lstlisting}
|
|
127.0.1.1 aither.inform.hs-hannover.de aither
|
|
\end{lstlisting}
|
|
|
|
\paragraph{OpenSSH}
|
|
In der Datei \texttt{/etc/ssh/sshd\_config} muss folgende Option auskommentiert und angepasst werden:
|
|
\begin{lstlisting}
|
|
PermitRootLogin yes
|
|
\end{lstlisting}
|
|
|
|
Anschließend wird der OpenSSH-Dienst aktiviert und gestartet.
|
|
\begin{lstlisting}
|
|
# systemctl enable ssh.service
|
|
# systemctl start ssh.service
|
|
\end{lstlisting}
|
|
|
|
\paragraph{sudo}
|
|
Das IT-Team arbeitet mit passwortbasierten SSH-Sitzungen unter dem Benutzer \texttt{root}.
|
|
Damit in der Übergangsphase auf dem Server Anpassungen auch ohne Kenntnis des \texttt{root}-Passworts durchgeführt werden können
|
|
\begin{lstlisting}
|
|
# apt-get install sudo
|
|
# adduser jpt
|
|
# gpasswd -a jpt sudo
|
|
\end{lstlisting}
|
|
|
|
|
|
\paragraph{Hostname}
|
|
\texttt{/etc/hostname} und \texttt{/etc/hosts} anpassen
|
|
|
|
\begin{lstlisting}
|
|
|
|
# cat /etc/apt/sources.list.d/inform.list
|
|
deb http:/http.edu.inform.hs-hannover.de/depot/debian/stretch/Packages /
|
|
|
|
# cat /etc/apt/apt.conf.d/80proxy
|
|
Acquire::http::Proxy "http://proxy.inform.hs-hannover.de:3128";
|
|
|
|
# cat /etc/network/interfaces
|
|
[...]
|
|
auto eno1
|
|
allow-hotplug eno1
|
|
|
|
#-primary network interface
|
|
iface eno1 inet static
|
|
address 141.71.38.70/24
|
|
gateway 141.71.38.1
|
|
iface eno1 inet6 static
|
|
address 2001:638:614:1780::131/64
|
|
gateway 201:638:614:1780::1
|
|
|
|
#- virtual service interface
|
|
iface eno1:0 inet static
|
|
address 141.71.38.7/24
|
|
gateway 141.71.38.1
|
|
iface eno1:0 inet6 static
|
|
address 2001:638:614:1780::7/64
|
|
gateway 201:638:614:1780::1
|
|
|
|
# cat /etc/sysctl.d/04-enable-ipv4-forwarding.conf
|
|
net.ipv4.conf.all.forwarding = 1
|
|
|
|
# cat /etc/sysctl.d/04-enable-ipv4-forwarding.conf
|
|
net.ipv6.conf.all.forwarding = 1
|
|
\end{lstlisting}
|
|
|
|
|
|
\paragraph{Netzwerkkonfiguration}
|
|
IP-Adressen (physisch und für den Dienst)
|
|
Forwarding für IPv4 und IPv6 aktivieren
|
|
|
|
\paragraph{}
|
|
APT via Proxy proxy.inform.hs-hannover.de:3128
|
|
Zusätzliches Repository
|
|
\begin{lstlisting}
|
|
wget -O repositoryKeyFile http://http.edu.inform.hs-hannover.de/repository/repositoryKeyFile
|
|
apt-key add repositoryKeyFile
|
|
\end{lstlisting}
|
|
|
|
\paragraph{Zusätzliche Pakete installieren}
|
|
Es werden noch Pakete des IT-Teams installiert, die bestimmte Komponenten mit einer einheitlichen Konfiguration versorgen.
|
|
\begin{lstlisting}
|
|
apt-get install F4-I-SRV-Config-ALL-*
|
|
\end{lstlisting}
|
|
|
|
|
|
\paragraph{OpenVPN}
|
|
apt-get install openvpn
|
|
\dots
|
|
Zertifikate beantragen und
|
|
Konfiguration einspielen
|
|
\dots
|
|
systemctl enable openvpn@TODO.service
|
|
systemctl start openvpn@TODO.service
|
|
|
|
\paragraph{iptables}
|
|
Zugriffe aus dem VPN in die DMZ sind verboten
|
|
Zugriffe auf den Server sind nur via UDP/1194 und TCP/22 erlaubt
|
|
IPv4 NAT für 10.2.0.0/16
|
|
|
|
\paragraph{Einstellungen für Routing}
|
|
Viel ist es nicht |