Author Archives: Miha
Author Archives: Miha
To simplify API calls etc. I created a separate GitHub repository to have a collection of phpipam API clients for different languages etc. If you created a client and want to share it head over to https://github.com/phpipam/phpipam-api-clients and share yours !
To start I created a php class to work as API client, now available in repo in php-client folder.
https://github.com/phpipam/phpipam-api-clients/tree/master/php-client
It supports all API calls, also encrypted requests are supported by setting $api_key variable in config file. Supported output formats are json/xml/array/object.
Here is a short example of working with client.
Here is a short example how to get details for specific section:
<?php
include config file and api client class file
require("api-config.php");
require("class.phpipam-api.php");
# init object with settings from config file or specify your own
$API = new phpipam_api_client ($api_url, $api_app_id, $api_key, $api_username, $api_password, $result_format);
# debug - output curl headers it some problems occur
$API->set_debug (false);
# execute call
$API->execute ("GET", "sections", array(5), "", $token_file);
# ger result
$result = $API->get_result();
phpipam version 1.2.1 was released today. This is a bugfix release, addressing the following issues:
Enhancements: ---------------------------- + French translation updated to verson 1.2; + German translation updated to verson 1.2; Bugfixes: -------- + Fixed upgrade bug that selected invalid auth method for AD/LDAP users; + Fixed LDAP problems after 1.2 upgrade; + Fixed PowerDNS Slave with multiple masters delimiter error; + Fixed owerDNS PTR records not being updated automatically; + Fixed csrf cookie bug when editing folder; + Fixed csrf cookie bug when truncationg subnet; + Fixed invalid code for API crypt method; + Fixed strange headings font display in Firefox; + Fixed invalid proxy settings in config.dist.php; + Fixed search same hostnames in db link form address table; + Fixed import subnet bug caused by fw object; + Fixed Subnet Import (Preview button > no action); Security Fixes: ---------------------------- + Fixed security issues introduced in 1.2;
There is no database change, so just replace phpipam directory and copy over config.php.
br
Miha
Dear all, I am happy to announce new release of phpipam IP address management – version 1.2.
For this release backend code was completely rewritten, for database connections now pdo has replaced mysqli, so make sure you php supports pdo and pdo_mysql before upgrading. It also fixes lots of bugs, parametized SQL queries and brings lots of new features, most important are:
And much more. You can find full changelog below, please read it.
If you find phpIPAM useful for your company donations would be highly appreciated
You can demo it here: http://demo.phpipam.net/
You can download it on sourceforge site: phpipam-1.2 or on github.
Before upgrading make sure you first backup current database, you can follow upgrade guide on our site.
Some screenshots:
Special thanks to all the people submitting bug reports, translators and feature testers!
Full changelog for this release is:
== 1.20 New features: ------------ + Added multiple simultaneous authentication methods (Apache, AD, LDAP, Radius, NetIQ); + Added fping scanning support; + Added selectable scanning type (ping/pear/fping); + Added L2 Continue reading
I have received some requests for running phpipam on synology, I personally don’t use it, but if you do you will find this useful.
Apparently the problem is in missing GMP php extension, you can find it here, along with instructions:
http://forum.synology.com/enu/viewtopic.php?f=34&t=101226&p=401309#p401309
thanks to Ferdinand for providing extension.
br
Hi all,
first beta version of phpipam 1.2 is available for download on Github:
If you have time help us squash some bugs before final release, focus is on the following things:
Report any issues to our GitHub page (https://github.com/phpipam/phpipam/).
Many issues reported with scanning subnets and updating host statuses are related to SElinux being enabled. So far the solution was to completely disable SElinux, but this was more workaround than anything else. Robert was kind enough to share SElinux policy that should be used with phpipam if SElinux is enabled on your server.
Basically it permits the opening of raw IP sockets for non-root users, that are required for executing ping command.
1) Create the file http_ping.tt and add the following to it:
module http_ping 1.0; require { type httpd_t; class capability net_raw; class rawip_socket { getopt create setopt write read }; } #============= httpd_t ============== allow httpd_t self:capability net_raw; allow httpd_t self:rawip_socket { getopt create setopt write read };
2) Run the following commands (as root user):
checkmodule -M -m -o http_ping.mod http_ping.tt semodule_package -o http_ping.pp -m http_ping.mod semodule -i http_ping.pp
brm
phpipam has support for creating custom fields to be used in address, subnets, vlans, devices and users tables. This is useful when you need to add some custom data to your tables. You can set your custom fields under Administration > Custom fields.
It supports following types of data and it representations:
Besides setting field type there are some other variables that can be set for each:
Having large amount of subnets (and other tables) on unoptimised MySQL database server can significantly increase page loads. To see which parameters need to be change I usually use mysqltuner perl script, which connects to database, analyses data and proposes which parameters need to be changed that are not optimally set based on current load.
Installation is simple:
1.) Fetch mysqltuner on FreeBSD:
cd ~ fetch http://mysqltuner.pl
or wget on linux:
wget http://mysqltuner.com
2.) Make it executable:
chmod +x mysqltuner.pl
3.) And run it to analyse database, you have to provide administrative credentials.
./mysqltuner.pl
Any other similar scripts out there you would recommend?
brm
phpipam 1.1.010 update released with following fixes:
== 1.1.010 Bugfixes: ---------------------------- + Fixed login fails with LDAP when escape characters are in password; + Fixed login not working with spaces in password for AD login; + Fixed Ivalid action when adding vlans from subnet popup menu; + Fixed custom fields not appearing properly on IP request editing; + Fixed Invalid ID error for IP address details on sorting; + Fixed warnings if no VLAN search results are present; + Fixed test mail not sending; + Fixed unable to login if $phpsessname not defined; + Fixed unable to login after upgrade;
I apologise for any inconvenience some users experienced with upgrade.
brm
Dear all, I am happy to announce new version of phpipam IP address management – version 1.1.
This release fixed some bugs, provided some new features, but most importantly it was focused on:
Some screens:
If you find phpIPAM useful for your company donations would be highly appreciated
You can demo it here: http://demo.phpipam.net/
You can download it on sourceforge site: phpipam-1.1.
Special thanks to all the people submitting bug reports, translators and feature testers!
Full changelog for this release is:
Enhancements: ---------------------------- + Caching of SQL results to avoid multiple queries; + Reduced number of DB queries; + Added selected mail notifications to admins to be notified on IP/subnet change; + Added new subnetId index to ipaddresses table that significantly improves network loading; + Now using only 1 network connection towards MySQL server; + Updated pagination; + mod_rewrite no longer required, selectable URL structure under settings; + Added option not to display free ranges; + Added option to set maximum VLAN number; + Selectable custom fields to Continue reading
brm
Dear all, I am happy to announce new version of phpipam IP address management – version 1.0.
New features, like changelog, favourite subnets, upgraded UI with bootstrap3 and other were introduced, and also lots of improvements and bug fixes are included. Most important are:
If you find phpIPAM useful for your company donations would be highly appreciated
You can demo it here: http://demo.phpipam.net/
You can download it on sourceforge site: phpipam-1.0.
Special thanks to all the people submitting bug reports, translators and feature testers!
Screenshots:
Full changelog for this release is:
New features:
----------------------------
+ IP address page with IP address details and IP history (Changelog);
+ IP address changelog, subnet and section changelogs with full changelog under tools;
+ Favourite subnets for quick access;
+ Adding subnets from free space with automatic mask provided;
+ Automatic database validity check after upgrading and automatic field/table fix under administration;
+ Automatic weekly check for new phpipam Continue reading
From version 0.9 on there is a option to automatically check statuses of configured hosts for selected subnets, and I received some related questions about it, so here is a short description and guide for it.
Firstly, pcntl support for php cli is advised so phpipam can do parallel icmp checks, this greatly reduces time required for checking status. You can check if your installation is ok with following command:
php -m | grep pcntl
You should set required parameters for pinging, etc ping path etc under
functions/scan/config-scan.php
You can get your ping path by invoking “whereis ping” in terminal.
You can also set some optional parameters in script itself
functions/scripts/pingCheck.php
Also, set the time parameters for status under Administration > IPAM settings (Ping status intervals), phpipam will set host as down/up based on this values.
Now you have to select which subnets should scan for statuses for configured hosts. Go to edit subnet and check “Check hosts status”. This will tell the cron script to check the status of hosts inside this subnet.
I suggest checking Continue reading
Dear all, I am happy to announce new version of phpipam IP address management – version 0.9.
New features, like Support for ICMP network discovery, ICMP check IP status in demand, Compressed (grouped) DHCP IP ranges and other were introduced. Most important are:
Some instructions on how to setup ICMP scanning will follow.
If you find phpIPAM useful for your company donations would be highly appreciated
You can demo it here: http://demo.phpipam.net/
You can download it on sourceforge site: phpipam-0.9.
Special thanks to all the people submitting bug reports, translators and feature testers!
Screenshots:
Full changelog for this release is:
New features:
----------------------------
+ Support for ICMP network discovery;
+ Cron script to check status for selected subnets/hosts with threading suport (pcntl php extension required);
+ ICMP check IP status in demand;
+ Compressed (grouped) DHCP IP ranges;
+ API server version 0.1;
+ Option to show and group subnets by VLAN in subnets list;
+ Option to show and Continue reading
Dear all, I am happy to announce new version of phpipam IP address management – version 0.8. Quite some bugs have been squashed and some new features introduced, like per-group permissions, support for translations, visual subnet displays and other:
You can demo it here: http://demo.phpipam.net/
You can download it on sourceforge site: phpipam-0.8.
Please note that IE8 is no longer supported!
Special thanks to all the people submitting bug reports, donors, translators and feature testers!
Screenshots:
Full changelog for this release is:
New features:
----------------------------
+ New group and permission management;
+ Support for translations;
+ Subnet resizing;
+ Subnet splitting into smaller subnets;
+ Added free space display for nested subnets;
+ Added visual display of subnet usage per IP address;
+ Added truncate network option that deletes all IP addresses in subnet;
+ Added button the updates subnet with RIPE information;
Enhancements:
----------------------------
+ Continue reading
Translation support will be available on next phpipam release, code is being redone and final checks ongoing. I have decided to go with gettext, it seems to be the most suitable for phpipam.
Translating is straight-forward, by providing translations for strings, for example:
#: functions/functions-mail.php:176
msgid “your domain username”
msgstr “translated text”
There are many tools available to help with translation, like poedit and others.
If anyone is interested in providing translation, please contact me on email. I have already received some requests in the past, I will try to dig up old emails…
brm
I have received a request for help on manual installation of phpIPAM on debian linux, so I decided to write a small how-to if anyone else has problems or is not so familiar with linux distributions and environment. I have used fresh default debian 6.0 as distribution because it is widely used, I believe on ubuntu linux procedure should be very similar, except maybe for locations of some config files.
I have used the following settings for installation:
If you already have MySQL/apache set you can skip point 3.
Installation procedure:
Update your sources (apt-get update) and install Apache, php and mysql server:
apt-get install apache2 mysql-server php5 php5-gmp php-pear php5-mysql php5-ldap
After all is installed and the apache server is running, you need to decide weather you will be running it under vhost or in subdirectory or root directory. For this guide I will have it in subdirectory http://server/phpipam/, so do the following:
cd /var/www/
wget http://freefr.dl.sourceforge.net/project/phpipam/phpipam-1. Continue reading