Konfiguracja Podstawowa(SSH Root Firewall) PokażUkryj
passwd; \ mkdir -p /root/.config/mc; \ echo -e '[Midnight-Commander]\nuse_internal_edit=true\neditor_fill_tabs_with_spaces=true\neditor_tab_spacing=4\n\n[Panels]\nnavigate_with_arrows=true' > /root/.config/mc/ini; \ \ echo -e "\nAllowGroups remote-console\n" >> /etc/ssh/sshd_config; \ /etc/init.d/ssh restart; \ \ echo "auth required pam_wheel.so trust group=admin" >> /etc/pam.d/su; \ \ rsync -avz -e ssh jadmin@deploy.justnet.pl:storage/baseconfig/firewall/* /; \ SERVER_IP=`ip li|grep ',UP,'|grep -v lo|cut -d':' -f 2| xargs`; \ mkdir -p /etc/gen/firewall/host:${SERVER_IP}/22:tcp:ssh; \ echo -e "78.9.185.84\t# JustNet VPN" > /etc/gen/firewall/host\:${SERVER_IP}/22\:tcp\:ssh/allow; \ /etc/init.d/ip_firewall restart; \ update-rc.d ip_firewall defaults; \ echo "Europe/Warsaw" > /etc/timezone; \ rm /etc/localtime; \ ln -s /usr/share/zoneinfo/Europe/Warsaw /etc/localtime; \ \ echo 'DAEMON_ARGS="-c -s -e"' >> /etc/default/lldpd; \ systemctl restart lldpd;
Debian - Zabbix instalacja i konfiguracja PokażUkryj
apt -y update; \ apt-get -y install git sudo zabbix-agent rsync; \ \ git clone https://github.com/H-Software/Zabbix-Template-Linux-LXC.git /tmp/zabbix; \ cp /tmp/zabbix/conf/zabbix-lxc.conf /etc/zabbix/zabbix_agentd.conf.d/; \ cat /tmp/zabbix/conf/sudoers.d-zabbix-agent >> /etc/sudoers; \ mkdir -p /etc/zabbix/scripts; \ rm -rf /tmp/zabbix/; \ rsync -avz -e ssh jadmin@deploy.justnet.pl:storage/baseconfig/zabbix/* /; \ /etc/init.d/zabbix-agent restart; \ mkdir -p /etc/gen/firewall/host\:${SERVER_IP}/10050\:tcp\:zabbix; \ echo -e "78.9.185.79\t# Zabbix" > /etc/gen/firewall/host\:${SERVER_IP}/10050\:tcp\:zabbix/allow; \ /etc/init.d/ip_firewall restart; \ echo "Dodaj z laski swojej host $HOSTNAME o ip ${SERVER_IP} do zabbiksa";