Check Port Availability

Checks whether a port range conflicts with any network service port currently configured on the device. Useful when configuring VPN or other network services to avoid port conflicts.

Available on versions V6, V7 and V8.

POST /check_port_availability.fcgi

Parameters

  • initial_port (int): Start of the port range to check.
  • final_port (int): End of the port range to check.

Response

  • status (string): Result of the check. Returns "OK" if no conflict is found, or the name of the conflicting service:
Value Conflicting service
"OK" No conflict
"WEB" Web server port
"RTSP" RTSP streaming port
"SIP" SIP signaling port
"SIP Outbound" SIP outbound port range
"ONVIF" ONVIF port (including port 8080)

Request example

$.ajax({
    url: "/check_port_availability.fcgi?session=" + session,
    type: 'POST',
    contentType: 'application/json',
    data: JSON.stringify({
        initial_port: 5000,
        final_port: 5100
    })
});

Response example

{
    "status": "OK"
}