Thursday, March 14, 2013

dns and dhcp loops of death

 dhcp loop fun

for i in {1..2};do  index=$(($i+28-1)); echo -e "\t\thost war-vm-$ {\n\t\t\thardware ethernet xx:xx:xx:xx:xx:$index;\n\t\t\tfixed-address war-vm-$;\n\t\t}"; done

Give you this sexy output

host {
                        hardware ethernet xx:xx:xx:xx:xx:28;
                host {
                        hardware ethernet xx:xx:xx:xx:xx:29;

dns fun

if you want to generate entry's from war-vm-1 to 60 but your ip dose not start at 1.
its time do have your dns server do some math

 $GENERATE       7-67    war-vm-\${-6,0} A 66.66.66.$


$GENERATE       7-67   $       PTR     war-vm-\${-6,0}

No comments: