CentOS 7 OPSI

Aus Vosp.info
Wechseln zu:Navigation, Suche

Ziele

  • OPSI-Server mit Samba Domain im NT4 Style
    • LXC-Host auf Basis von CentOS 7

Installation Host

Boot vom ISO/CD

Installation vom ISO in eine VirtualBox 4.13.8 Debian Jessie

  • Partitionierung
    • Manuell auswählen
      • /boot : 250M, ext4
      • / im LVM: 7 GB, ext4
      • volume group maximieren

ssh starten

systemctl start sshd

Name des Trägersystems

hostname set-hostname <hostname>-carrier

Basispakete installieren

yum install vim wget net-tools bridge-utils bash-completion

LXC installieren

rpm -Uhv http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
yum install lxc (epel)

Ergebnisse sollten alle grün sein.

lxc-checkconfig

Bridges

Verbindung der CTs ins Internet

vim /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge

DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes


IPADDR0=10.255.255.1
NETMASK=255.255.255.0

ONBOOT=yes
BOOTPROTO=none
NM_CONTROLLED=no
DELAY=0
STP=yes

Verbindung der CTs ins Intranet

Forwarding

vim /etc/sysctl.conf

net.ipv4.ip_forward = 1
sysctl -p /etc/sysctl.conf

Firewall

Ich bin mit firewalled nicht vetraut und nutze iptables.

systemctl stop firewalld.service 
systemctl disable firewalld.service
yum -y install iptables-services
iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE

Regel abspeichern

service iptables save
systemctl start iptables.service
systemctl status iptables.service

Avahi ausschalten

Zeroconf wird nicht benötigt.

systemctl stop avahi-daemon.socket
systemctl disable avahi-daemon.socket
systemctl stop avahi-daemon.service
systemctl disable avahi-daemon.service