Es geht um die Umstellung u.a. interfaces-Konfiguartion auf Netplan.
Ich habe ein wenig Angst, dass ich mir den Internetzugang kaputt mache und möchte das lieber vorher bestätigt wissen. https://wiki.ubuntuusers.de/Netplan/ habe ich gelesen
netplan.io 0.40.1~18.04.4 ist installiert.
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface ## Fritzbox auto enp2s0 iface enp2s0 inet static address 192.168.178.100 netmask 255.255.255.0 network 192.168.178.0 broadcast 192.168.178.255 gateway 192.168.178.1 # dns-* options are implemented by the resolvconf package, if installed #dns-nameservers 192.168.178.1 #dns-search .......org ## lokales Netz auto enp9s0 iface enp9s0 inet static address 192.168.2.100 netmask 255.255.255.0 up /sbin/iptables -F up /sbin/iptables -X up /sbin/iptables -t nat -F up /sbin/iptables -A FORWARD -o enp2s0 -s 192.168.0.0/16 -m conntrack --ctstate NEW -j ACCEPT up /sbin/iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT up /sbin/iptables -t nat -A POSTROUTING -o enp2s0 -j MASQUERADE up /sbin/sysctl -w net.ipv4.ip_forward=1 ## DNS können nach Bedarf auch ergänzt oder angepasst werden post-up /bin/echo 'domain .......org' | tee /etc/resolv.conf post-up /bin/echo 'search .......org' | tee -a /etc/resolv.conf post-up /bin/echo 'nameserver 192.168.178.1' | tee -a /etc/resolv.conf post-up /bin/echo 'nameserver 80.237.196.2' | tee -a /etc/resolv.conf post-up /bin/echo 'nameserver 85.214.73.63' | tee -a /etc/resolv.conf post-up /bin/echo 'nameserver 87.118.104.203' | tee -a /etc/resolv.conf
Ich lege also für die 2 NICs 2 Dateien in /etc/netplan an. Im Wiki wird aber das alte eth0 verwendet und jetzt werde ich schon mal unsicher ...