Debian/Ubuntu aggiungere delle rotte statiche allo startup

Per aggiungere delle rotte statiche allo startup occorre andare a modificare il file /etc/network/interfaces Ed aggiungere le direttive post-up e post-down alla direttiva iface ethX. Ecco un esempio: auto eth0 iface eth0 inet static address 10.9.38.76 netmask 255.255.255.240 network 10.9.38.64 broadcast 10.9.38.79 ### static routing ### post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.9.38.65 pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 10.9.38.65
Read more...Debian iptables startup script

Per prima cosa occorre salvare la configurazione del firewall con il comando iptables-save > /etc/firewall.conf Poi occorre andare creare un file in /etc/network/if-up.d cd /etc/network/if-up.d touch iptables chmod 755 iptables e al suo interno occorre scrivere #!/bin/sh iptables-restore < /etc/firewall.conf
Read more...Installare un server Rsync in debian

Per prima cosa installiamo i pacchetti necessari apt-get install rsync openbsd-inetd Poi creiamo il file /etc/rsyncd.conf (in questo esempio andremo a sincronizzare l cartella /home/prova per l’utente pippo) max connections = 10 log file = /var/log/rsync.log timeout = 300 pid file=/var/run/rsyncd.pid [prova] comment = Rsync prova path = /home/prova read only = no list = yes uid = pippo gid = root auth users=pippo list = yes hosts allow =…
Read more...Debian configurare Zabbix per fare un Wake on Lan tramite un UserParameter

Per prima cosa installiamo i pacchetti per mandare il magic packet che farà il WOL apt-get install etherwake wakeonlan Poi creiamo un file in /etc/zabbix di nome check_wol.sh e diamoli i giusti permessi touch /etc/zabbix/check_wol.sh chown zabbix.root /etc/zabbix/check_wol.sh chmod 750 /etc/zabbix/check_wol.sh Modifichiamolo e inseriamo al suo interno il seguente codice #!/bin/bash if ! ping -c 1 -w 5 “$1″ &>/dev/null ; then /usr/bin/wakeonlan -i “$1″ “$2″ echo “0″ else echo…
Read more...Tags:debian , UserParameter , wake on lan , wakeonlan , wol , Zabbix