Some PHP snmp scripting

I was digging through some of my old notes and came across a few networking PHP scripts that I put together for some Proxim AP-4000 access points. I put this script and many others together to help manage these standalone access points before there were wireless controllers. This particular PHP script sets up a while loop to modify some snmp values to modify AP filters. The snmp values within this script can be modified to be used in changing other values as well. Your setup will require PHP installed along with the snmp package. Have fun.

<head>
<title>
AP-4000 Filter modification Script
</title>
</head>

<body>

<?php
//set the variable that will be the start number of the third octet within your IP range
$ip = 100;
//set your snmp RW password
$snmpRwPass = yoursnmppassword;

//setup the loop that will snmpset each AP mgmt IP address defined starting at your IP variable and completing before your max value
while ( $ip <= 111) {

//modifies snmp values of Proxim AP-4000 filters
snmpset(“192.168.1.$ip”,”$snmpRwPass”,”.1.3.6.1.4.1.11898.2.1.5.5.3.1.6.1″,”i”,”1″, “10”);

snmpset(“192.168.1.$ip”,”$snmpRwPass”,”.1.3.6.1.4.1.11898.2.1.5.5.3.1.6.2″,”i”,”1″, “10”);

snmpset(“192.168.1.$ip”,”$snmpRwPass”,”.1.3.6.1.4.1.11898.2.1.5.5.3.1.6.3″,”i”,”1″, “10”);

snmpset(“192.168.1.$ip”,”$snmpRwPass”,”.1.3.6.1.4.1.11898.2.1.5.5.1.0″, “i”,”1″, “10”);

//print output of each AP mgmt IP thats completed
echo “done with 192.168.1.”.$ip;
echo “<br>”;

//counter for increasing AP mgmt IP
$ip++;

}
?>
</body>
</html>

 

Leave a Reply

Your email address will not be published. Required fields are marked *