We use cookies on our website to ensure we provide you with the best experience on our website. By using our website, you agree to the use of cookies for analytics and personalized content.This website uses cookies. More Information
It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda Web Application Firewall

Trusted Hosts

  • Last updated on

A trusted host group can be created with a set of trusted hosts, which can be associated with the Service to enforce action for the trusted hosts. For more information on trusted hosts, refer to How to Configure Trusted Hosts.

To Create a Trusted Host Group

URL:  /v1/ trusted_host_groups
Method: POST
Description: Creates a trusted host group with the given name.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
nameAlphanumericYesA name for the trusted host group that needs to be created.
Example:

Request:

curl http://192.168.0.1:8000/restapi/v1/trusted_host_groups -u 'eyJldCI6IjE0NDc5MjU4MDkiLCJwYXNzd29yZCI6Ijg4YzgzMGNlNGY4YzUxMWNkZDBlMWZmOTc5\nYTg0NDA0IiwidXNlciI6ImFkbWluIn0=\n:' -X POST -H Content-Type:application/json -d '{"name":"Group1"}'

Response:

{"id":"Group1","token":"eyJldCI6IjE0NDc5MjU5MjkiLCJwYXNzd29yZCI6ImNlZjczY2FkYzljOTcyNjJmNjExMDA4YzA2\nZDMxMTk3IiwidXNlciI6ImFkbWluIn0=\n"}

To Delete a Trusted Host Group

URL:  /v1/ trusted_host_groups/{trusted_host_group_name}
Method: DELETE
Description: Deletes the given service group
Example:

Request:

curl http://192.168.0.1:8000/restapi/v1/trusted_host_groups/Group1 -u 'eyJldCI6IjE0NDc5MjU4MDkiLCJwYXNzd29yZCI6Ijg4YzgzMGNlNGY4YzUxMWNkZDBlMWZmOTc5\nYTg0NDA0IiwidXNlciI6ImFkbWluIn0=\n:' -X DELETE

Response:

{"msg":"Successfully deleted","token":"eyJldCI6IjE0NDc5MjU5MTMiLCJwYXNzd29yZCI6IjU1OGMxOTdkNjk3N2U2YWE1YTg4ZDlmODIx\nMWEzM2ExIiwidXNlciI6ImFkbWluIn0=\n"}

To Add a Trusted Host Group

URL:  /v1/ trusted_host_groups/{trusted_host_group_name}/trusted_hosts
Method: POST
Description: Creates a trusted host with the given name.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
nameAlphanumericYesName for the trusted host.
address_versionEnumerationYesInternet protocol version for the trusted host.
ip_addressAlphanumericYesIP address of the trusted host.
maskAlphanumericYesAssociated subnet mask.
commentsAlphanumericOptionalDescription about the trusted host.
Example:

Request:

curl http://192.168.0.1:8000/restapi/v1/trusted_host_groups/Group1/trusted_hosts -u 'eyJldCI6IjE0NDc5MjU4MDkiLCJwYXNzd29yZCI6Ijg4YzgzMGNlNGY4YzUxMWNkZDBlMWZmOTc5\nYTg0NDA0IiwidXNlciI6ImFkbWluIn0=\n:' -X POST -H Content-Type:application/json -d '{"name":"Host1", "ip_address":"99.99.124.56", "address_version":"ipv4", "mask":"255.255.255.255", "comments":"raj"}'

Response:

{"id":"Host1","token":"eyJldCI6IjE0NDc5MjYwMzciLCJwYXNzd29yZCI6ImJmMzVlNzA0NTVlYTFlZDEyNjI3ZTNjNzcx\nYjQyMjczIiwidXNlciI6ImFkbWluIn0=\n"} 

To Update a Trusted Host

URL:  /v1/ trusted_host_groups/{trusted_host_group_name}/trusted_hosts/(trusted_host_name)
Method: PUT
Description: Updates the values of given parameters.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
ip_addressAlphanumericOptionalIP address of the trusted host.
maskAlphanumericOptionalAssociated subnet mask.
commentsAlphanumericOptionalDescription about the trusted host.
Example:

Request:

curl http://192.168.0.1:8000/restapi/v1/trusted_host_groups/Group1/trusted_hosts/Host1 -u 'eyJldCI6IjE0NDc5MjU4MDkiLCJwYXNzd29yZCI6Ijg4YzgzMGNlNGY4YzUxMWNkZDBlMWZmOTc5\nYTg0NDA0IiwidXNlciI6ImFkbWluIn0=\n:' -X PUT -H Content-Type:application/json -d '{"name":"host_raj", "ip_address":"99.99.107.69", "mask":"255.255.0.0"}'

 

Response:

{"id":"Host1","token":"eyJldCI6IjE0NDc5MjkyNjEiLCJwYXNzd29yZCI6ImMzMjQ1Yzk4NGFhOGI2NWVhODI3MmI3MGNj\nOTE4NTc3IiwidXNlciI6ImFkbWluIn0=\n"}

To Delete a Trusted Host

URL:  /v1/ trusted_host_groups/{trusted_host_group_name}/trusted_hosts/(trusted_host_name)
Method: DELETE
Description: Deletes the given trusted host.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
ip_addressAlphanumericOptionalIP address of the trusted host.
maskAlphanumericOptionalAssociated subnet mask.
commentsAlphanumericOptionalDescription about the trusted host.
Example:

Request:

curl http://192.168.0.1:8000/restapi/v1/trusted_host_groups/group1/trusted_hosts/Host1 -u 'eyJldCI6IjE0NDc5MjU4MDkiLCJwYXNzd29yZCI6Ijg4YzgzMGNlNGY4YzUxMWNkZDBlMWZmOTc5\nYTg0NDA0IiwidXNlciI6ImFkbWluIn0=\n:' -X DELETE

 

Response:

{"msg":"Successfully deleted","token":"eyJldCI6IjE0NDc5MjYxNDkiLCJwYXNzd29yZCI6IjZlMTJlMDYxYTI0MjFhYzBiYTA0YmUxMzY5\nMDNjYzEyIiwidXNlciI6ImFkbWluIn0=\n"}

Last updated on