Esta é uma API de gerenciamento da configuraçõe do serviço de Firewall.
Ela permite ativar e desativar zonas.
API de busca de configurações do Firewall
Exemplo de requisição
GET /api/firewall/service HTTP/1.1
Host: api.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
response = sdk.firewall.get_service_config()
print(response.payload)
const response = await sdk.firewall.getServiceConfig();
console.log(response.payload);
Exemplo de resposta
HTTP/1.1 200 OK
Content-Type: application/json
{
"dmz_enabled": true,
"guest_enabled": true,
"vpn_s2s_enabled": false,
"vpn_s2u_enabled": false,
"lan_enabled": true,
"invalid_packets_check": true,
"port_scan_check": true,
"spoofing_check": true,
"created_at": "2017-10-05T12:20:02.932000+00:00",
"updated_at": "2017-10-05T12:20:02.932000+00:00"
}
ServiceConfig(
dmz_enabled=True,
guest_enabled=True,
vpn_s2s_enabled=False,
vpn_s2u_enabled=False,
lan_enabled=True,
invalid_packets_check=True,
port_scan_check=True,
spoofing_check=True,
created_at=DateTime(2017, 10, 5, 12, 20, 2, tzinfo=Timezone('+00:00')),
updated_at=DateTime(2017, 10, 5, 12, 20, 2, tzinfo=Timezone('+00:00'))
)
{
dmzEnabled: true,
guestEnabled: true,
vpnS2SEnabled: false,
vpnS2UEnabled: false,
lanEnabled: true,
invalidPacketsCheck: true,
portScanCheck: true,
spoofingCheck: true,
createdAt: "2017-10-05T15:20:02.000Z",
updatedAt: "2017-10-05T15:20:02.000Z"
}
API de edição de configurações do Firewall
Exemplo de requisição
PUT /api/firewall/service HTTP/1.1
Host: api.exemplo.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <Access-Token>
{
"dmz_enabled": true,
"guest_enabled": false,
"vpn_s2s_enabled": true,
"vpn_s2u_enabled": true,
"lan_enabled": true,
"invalid_packets_check": true,
"port_scan_check": true,
"spoofing_check": true,
}
from itflex_sdk.firewall.types import UpdateServiceConfigRequest
request = UpdateServiceConfigRequest(
dmz_enabled=True,
guest_enabled=False,
vpn_s2s_enabled=True,
vpn_s2u_enabled=True,
lan_enabled=True,
invalid_packets_check=True,
port_scan_check=True,
spoofing_check=True,
)
response = sdk.firewall.update_service_config(request)
print(response.payload)
const response = await sdk.firewall.updateServiceConfig({
dmzEnabled: true,
guestEnabled: false,
vpnS2SEnabled: true,
vpnS2UEnabled: true,
lanEnabled: true,
invalidPacketsCheck: true,
portScanCheck: true,
spoofingCheck: true,
});
console.log(response.payload);
Exemplo de resposta
HTTP/1.1 200 OK
Content-Type: application/json
{
"dmz_enabled": true,
"guest_enabled": false,
"vpn_s2s_enabled": true,
"vpn_s2u_enabled": true,
"lan_enabled": true,
"invalid_packets_check": true,
"port_scan_check": true,
"spoofing_check": true,
"created_at": "2017-10-05T12:20:02.932000+00:00",
"updated_at": "2017-11-05T12:20:02.932000+00:00"
}
ServiceConfig(
dmz_enabled=True,
guest_enabled=False,
vpn_s2s_enabled=True,
vpn_s2u_enabled=True,
lan_enabled=True,
invalid_packets_check=True,
port_scan_check=True,
spoofing_check=True,
created_at=DateTime(2017, 10, 5, 12, 20, 2, tzinfo=Timezone('+00:00')),
updated_at=DateTime(2017, 11, 5, 12, 20, 2, tzinfo=Timezone('+00:00'))
)
{
dmzEnabled: true,
guestEnabled: false,
vpnS2SEnabled: true,
vpnS2UEnabled: true,
lanEnabled: true,
invalidPacketsCheck: true,
portScanCheck: true,
spoofingCheck: true,
createdAt: "2017-10-05T15:20:02.000Z",
updatedAt: "2017-11-05T15:20:02.000Z"
}
Requisição
Campo | Descrição |
---|---|
dmz_enabled | boolrequired Flag para habilitar/desabilitar as regras de DMZ no sistema Valor padrão: |
guest_enabled | boolrequired Flag para habilitar/desabilitar as regras de visitantes no sistema Valor padrão: |
site_s2s_enabled | boolrequired Flag para habilitar/desabilitar as regras de VPN S2S no sistema Valor padrão: |
site_s2u_enabled | boolrequired Flag para habilitar/desabilitar as regras de VPN S2U no sistema Valor padrão: |
lan_enabled | boolrequired Flag para habilitar/desabilitar as regras de LAN no sistema Valor padrão: |
invalid_packets_check | boolrequired Flag para habilitar/desabilitar o filtro de pacotes inválidos do firewall Valor padrão: |
port_scan_check | boolrequired Flag para habilitar/desabilitar o filtro de scanners de portas Valor padrão: |
spoofing_check | boolrequired Flag para habilitar/desabilitar o filtro spoofing de endereços Valor padrão: |
Resposta
Campo | Descrição |
---|---|
dmz_enabled | bool Flag para habilitar/desabilitar as regras de DMZ no sistema |
guest_enabled | bool Flag para habilitar/desabilitar as regras de visitantes no sistema |
site_s2s_enabled | bool Flag para habilitar/desabilitar as regras de VPN S2S no sistema |
site_s2u_enabled | bool Flag para habilitar/desabilitar as regras de VPN S2U no sistema |
lan_enabled | bool Flag para habilitar/desabilitar as regras de LAN no sistema |
invalid_packets_check | bool Flag para habilitar/desabilitar o filtro de pacotes inválidos do firewall |
port_scan_check | bool Flag para habilitar/desabilitar o filtro de scanners de portas |
spoofing_check | bool Flag para habilitar/desabilitar o filtro spoofing de endereços |
created_at | string Data de criação Formato: |
updated_at | string Data da última edição Formato: |