SDN: PHP-IPAM

LipkeGu

Member
Sep 21, 2022
10
0
6
Im trying to integrate PHPIpam into my environment. When adding the requested informations im getting:

Code:
create sdn ipam object failed: Can't connect to phpipam api: Invalid response from server: 503 Service Unavailable (500)

I created an apptoken

Url: http://172.16.21.101/api/proxmox/
Section: 1
token: hfsdjhfgsdjhgfhsdkjfsjdkhjfskfs
Id: proxmox
 
Hey, just to be sure… can you actually reach the phpipam API directly from the Proxmox node? Like if you run curl http://172.16.21.101/api/proxmox/sections/ with the right headers, do you get json back or just that 503? Sometimes I messed up the url (forgot the /api/ or added the app id in the wrong place) and got the same error. Also, did you enable the api app in phpipam and remove maintenance mode? I think if that’s still on you only get 503.

Can you share if http://172.16.21.101/api/ works at all in your browser?
 
from a PVE node:

curl -k -s -H "Content-Type: application/json" -H "token: YOURTOKEN" https://172.16.21.101/api/proxmox/sections/

and

curl -k -s -H "Content-Type: application/json" -H "token: YOURTOKEN" https://172.16.21.101/api/proxmox/subnets/

should return JSON
 
Das bekomme ich via curl... Muss ich die API hinter einem HAProxy legen?
Code:
curl: (7) Failed to connect to 172.16.21.101 port 443 after 29 ms: Couldn't connect to server
 
Can you tell me a bit how you’ve set up phpipam? Is it running bare metal with apache/nginx, or inside docker with some reverse proxy in front? Just so I understand the architecture before guessing where https should be enabled.
 
My PHPIpam is running as LXC and was installed via the "Proxmox install scripts".
The IPAM is running behind Opensense (with HAProxy and ACME client installed). The HAProxy will usally handle the SSL (ACME) certification stuff.
 
That script only sets up phpIPAM with Apache on HTTP:80. No HTTPS inside the LXC. Use OPNsense HAProxy to terminate TLS on 443 and forward to 172.16.21.101:80.