Indice

Maintenance mode

  1. Nella vista utenti selezionare solo email. Copincollare in un client di posta elettronica togliendo gli indirizzi particolari.
  2. Disattivare sincronizzazione su DNS e DHCP
  3. In /etc/apache2/sites-enabled/indirizzi.conf commentare il resto e lasciare solo
    Require ip 140.105.171.240/28
  4. Riavviare apache con
    apache2ctl reload

    e verificare raggiungimento da fuori units

Modifica del mac address da parte di utenti non amministratori

root@schermo:/var/www/phpipam/app/subnets/addresses# diff address-modify.php.original address-modify.php
281,282c281,283
<                 print ' <input type="text" name="mac" class="ip_addr form-control input-sm" placeholder="'._('MAC address').'" value="'. $address['mac']. '" size="30" '.$delete.' disabled="disabled">'.$mcast_help_block;
<                 print ' <input type="hidden" name="mac" value="'. $address['mac']. '">';
---
>                 print ' <input type="text" name="mac" class="ip_addr form-control input-sm" placeholder="'._('MAC address').'" value="'. $address['mac']. '" size="30" '.$delete.'>'.$mcast_help_block;
>                 #print ' <input type="text" name="mac" class="ip_addr form-control input-sm" placeholder="'._('MAC address').'" value="'. $address['mac']. '" size="30" '.$delete.' disabled="disabled">'.$mcast_help_block;
>                 #print ' <input type="hidden" name="mac" value="'. $address['mac']. '">';

Popolazione del last seen con i dati di netdisco

Crontab postgres

  */10 * * * * /var/lib/postgresql/aggiornalastseensuphpipam.sh > /var/lib/postgresql/aggiornalastseensuphpipam.log
#/bin/bash
pgrep -f aggiornalastseensuphpipam > /dev/null ||\
echo "select INET_NTOA(ip_addr) from ipaddresses" |  mysql -N -u phpipam -pHooqu8ae -D phpipam 2>/dev/null | while read ip; do psql netdisco -qtc "select ip,to_char(time_last,'YYYY-MM-DD HH24:MI:SS') from node_ip where active=TRUE and ip='$ip'"; done | sed '/^\s*$/d' | awk -F'|' '{print $1,$2}' | awk '{print "update ipaddresses set lastSeen=#"$2,$3"# , state=2  where ip_addr=INET_ATON(#"$1"#)"";"}' | sed "s/#/\'/g" | mysql -vvvv -u phpipam -pHooqu8ae -D phpipam