Firewall Module GraphQL APIs

updateFirewallConfiguration

This wiki is to capture the Firewall module provided GraphQL APIs.

Please find below list of APIs supported by Firewall module.

firewall module APIs are useful to create, delete and fetch the values of existing configured ringgroup. 

Enable Firewall

Enable firewall configuration to into Freepbx/PBXact system.

API: enableFirewall

API Parameters -none

 

Query Parameters 

status message

 

API Request 

GQL API:  /admin/api/api/gql   mutation {   enableFirewall(input: { }){   message   status   } }

 

API Response 

Disable Firewall

Disable firewall configuration to into Freepbx/PBXact system.

API: disableFirewall

API Parameters -none

Query Parameters 

 

API Request 

 

API Response 

Add BlacklistIP

Add ( configure ) firewall configuration to into Freepbx/PBXact system.

API: addBlackListIP

API Parameters -

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

IP

Mandatory

String

 

IP address that needs to be blocked

 

Query Parameters 

 

API Request 

 

API Response 

Delete BlacklistIP

Delete( Blacklist) firewall configuration to into Freepbx/PBXact system.

API: deleteBlackListIP

 

API Parameters -

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

IP

Mandatory

String

 

IP address that needs to be blocked

 

Query Parameters 

 

API Request 

 

API Response 

Add an IP to White List

Add Whitelist IP configuration to into Freepbx/PBXact system.

API: addWhiteListIP

 

API Parameters -

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

sourceIp

Mandatory

String

 

IP address to whitelist

zone

Mandatory

String

 

Describe the service zone to be trusted or not

hidden

Mandatory

Boolean

 

Setting to true will hide this value from GUI

 

Query Parameters 

 

API Request 

 

API Response 

Update Firewall Configuration

Update firewall configuration to into Freepbx/PBXact system.

API: updateFirewallConfiguration

 

API Parameters -

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

status

 

Boolean

true

To enable/disable a firewall

responsiveFirewall

 

Boolean

true

To enable/disable a responsive firewall

chansip

 

Boolean

true

Set the chainSIP configuration

pjsip

 

Boolean

true

Set the pjSIP Configuration

safeMode

 

String

"disabled"

To enable/disable safe mode

currentJiffies

 

String

"1000"

Set the current Jiffer value, default is 1000

serviceZone

 

String

["external", "other", "internal"]

Set OOBE an external setup options

enableTrustedHost

 

Boolean

true

Set the trusted host. true/false

enableResponsive

 

Boolean

true

Set OOBE answered enabled/disabled. true/false

externalSetup

 

Boolean

true

Set the service Zone, default is true

 

Query Parameters 

 

API Request 

 

API Response 

Fetch BlacklistIP

Fetch ( Blacklist) firewall configuration to into Freepbx/PBXact system.

API: fetchAllBlacklistIPs

 

API Parameters -none

Query Parameters 

 

API Request 

 

API Response 

Fetch All White Listed IPs

Fetch ( WhiteList) IPs firewall configuration to into Freepbx/PBXact system.

API: fetchAllWhitelistIPs

 

API Query Parameters 

Query Parameters 

 

API Request 

 

API Response 

Fetch Firewall Configurations

Fetch  firewall configuration from Freepbx/PBXact system.

API: fetchFirewallConfiguration

 

API Query Parameters 

Query Parameters 

 

API Request 

 

API Response 

 

Fetch Firewall Interfaces

Fetch  firewall interfaces from Freepbx/PBXact system.

API: fetchInterface 

 

API Query Parameters 

Query Parameters 

 

API Request 

API Response 

 

Update Firewall Interface

Update firewall Interface into Freepbx/PBXact system.

API: updateFirewallInterface

 

API Parameters -

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

ints

Mandatory

string

 

Interface name which has to be updated

zone

Mandatory

string

 

Describe the service zone to be trusted or not.

Allowed values for zone - external, internal, other, reject, trusted

description

Optional

string

 

Description

 

Query Parameters 

 

API Request 

API Response 

 

Fetch Firewall Advance Settings

Fetch  firewall settings from Freepbx/PBXact system.

API: fetchFirewallAdvanceSettings 

 

API Query Parameters 

Query Parameters 

 

API Request 

API Response 

 

Update Firewall Advance Settings

Update firewall Advance Settings into Freepbx/PBXact system.

API: updateFirewallAdvanceSettings

 

 

API Parameters -

Name

Required

Type

Description

Name

Required

Type

Description

safemode

Optional

string

Set Safe Mode enable/disable

lefilter

Optional

string

Set Responsive LetsEncrypt Rules enable/disable

customrules

Optional

string

Set Custom Firewall Rules enable/disable

rejectpackets

Optional

string

Set Reject Packets enable/disable

id_service

Optional

string

Set Intrusion Detection Service enable/disable

id_sync_fw

Optional

string

Set Intrusion Detection Sync Firewall enable/legacy

import_hosts

Optional

string

Set Add etc/hosts as Trusted enable/disable

Query Parameters 

API Request 

API Response 

Return to Documentation Home I Return to Sangoma Support