-
Notifications
You must be signed in to change notification settings - Fork 17
Data Structure
Glenn edited this page Mar 6, 2022
·
41 revisions
This is the structure that should be used when developing modules. Not all of these values will be valid for all firewall types, in that instance those values that are not valid should be left blank.
{
"system": {
"domain": "",
"hostname": ""
},
"interfaces": {
"name": {
"enabled": True/False,
"description": "",
"ipv4_config": [
{
"ip_address": "",
"mask": "", # full IPv4 dot decimal mask notation
"type": "primary/secondary",
}
],
"ipv6_config": [
{
"ip_address": "",
"mask": "", # IPv6 CIDR notation
}
],
"mtu": "",
"physical_interfaces": [],
"type": "interface/subinterface/switch/vlan/loopback/vpn/sslvpn/gre/vxlan",
"vlan_id": "",
"vlan_name": ""
}
},
"zones": {
"name": {
"allow_intrazone": "",
"description": "",
"enabled": True/False,
"members": []
}
},
"routes": [
{
"blackhole": True/False,
"description": "",
"distance": "",
"enabled": True/False,
"gateway": "",
"interface": "",
"mask": "",
"network": "",
"source": [], # only needed if policy route
"type": "static/policy",
}
],
"routes6": [
{
"blackhole": True/False,
"description": "",
"distance": "",
"enabled": True/False,
"gateway": "",
"interface": "",
"mask": "",
"network": "",
"source": [], # only needed if policy route
"type": "static/policy"
}
],
"network_objects": {
"name": {
"address_first": "",
"address_last": "",
"description": "",
"fqdn": "",
"host": "",
"interface": ""
"mask": "",
"network": "",
"type": "host/network/range/fqdn/any",
}
},
"network6_objects": {
"name": {
"address_first": "",
"address_last": "",
"description": "",
"fqdn": "",
"host": "",
"interface": ""
"mask": "",
"network": "",
"type": "host/network/range/fqdn/any",
}
},
"network_groups": {
"name": {
"description": "",
"members": [],
"type": "group"
}
},
"network6_groups": {
"name": {
"description": "",
"members": [],
"type": "group"
}
},
"service_objects": {
"name": {
"description": "",
"dst_ports": ["80", "443", "8080-8081"],
"icmp_code": "",
"icmp_type": "",
"protocols": ["6", "17"], # ANY: 0, ICMP: 1, TCP: 6, UDP: 17
"src_ports": ["1-65535"],
"timeout": "",
"type": "service/range/v2"
}
},
"service_groups": {
"name": {
"description": "",
"members": [],
"type": "group"
}
},
"mapping_objects": {
"name": {
"addresses": [
{
"name": "",
"type": ""
}
],
"interfaces": [
{
"name": "",
"type": ""
}
],
"services": [
{
"name": "",
"type": ""
}
],
}
},
"policies": [
{
"action": "",
"description": "",
"dst_addresses": [
{
"name": "",
"type": ""
}
],
"dst_interfaces": [
{
"name": "",
"type": ""
}
],
"dst_services": [
{
"name": "",
"type": ""
}
],
"enabled": True/False,
"logging": True/False,
"name": "",
"nat": "",
"policy_set": "",
"protocol": "",
"schedule": "",
"src_addresses": [
{
"name": "",
"type": ""
}
],
"src_interfaces": [
{
"name": "",
"type": ""
}
],
"src_services": [
{
"name": "",
"type": ""
}
],
"type": "policy",
"users_excluded": [],
"users_included": []
}
],
"nat": [
{
"description": "",
"dst_addresses_original": [
{
"name": "",
"type": ""
}
],
"dst_addresses_translated": [
{
"name": "",
"type": ""
}
],
"dst_interfaces": [
{
"name": "",
"type": ""
}
],
"dst_services_original": [
{
"name": "",
"type": ""
}
],
"dst_services_translated": [
{
"name": "",
"type": ""
}
],
"enabled": True/False,
"name": "",
"src_addresses_original": [
{
"name": "",
"type": ""
}
],
"src_addresses_translated": [
{
"name": "",
"type": ""
}
],
"src_interfaces": [
{
"name": "",
"type": ""
}
],
"src_services_original": [
{
"name": "",
"type": ""
}
],
"src_services_translated": [
{
"name": "",
"type": ""
}
],
"type": ""
}
]
}