Edge Network Firewall
All operations require authentication.
List firewalled IPsProduction
List firewalled IPs. Returns the addresses of the block added to the firewall, filterable by state or by whether the firewall is enabled.
Path parameters
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
Query parameters
Filter the value of enabled property (=)
Filter the value of state property (=)
disableFirewallPendingenableFirewallPendingokResponse
Example uses ip = 192.0.2.0/24
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ ip/ {ip}/ firewall \
-H "authorization: Bearer $OVH_TOKEN"[ "192.0.2.0"]
List rulesProduction
List rules. Returns the sequence numbers of the address's firewall rules, filterable by state: creationPending, ok or removalPending.
Path parameters
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
IPv4 address (e.g., 192.0.2.0)
Query parameters
Filter the value of state property (=)
creationPendingokremovalPendingResponse
Example uses ip = 192.0.2.0/24, ipOnFirewall = 192.0.2.0
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ ip/ {ip}/ firewall/ {ipOnFirewall}/ rule \
-H "authorization: Bearer $OVH_TOKEN"[ 0]
Get a firewalled IPProduction
Get a firewalled IP. Returns whether the firewall is enabled on this address, and its state: ok, enableFirewallPending or disableFirewallPending.
Path parameters
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
IPv4 address (e.g., 192.0.2.0)
Response
IPv4 address (e.g., 192.0.2.0)
Current state of your ip on firewall
disableFirewallPendingenableFirewallPendingokExample uses ip = 192.0.2.0/24, ipOnFirewall = 192.0.2.0
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ ip/ {ip}/ firewall/ {ipOnFirewall} \
-H "authorization: Bearer $OVH_TOKEN"{ "enabled": true, "ipOnFirewall": "192.0.2.0", "state": "disableFirewallPending"}
Get a ruleProduction
Get a rule. Returns the rule's action, protocol, source, destination, ports, TCP options, fragments option, packet length and state.
Path parameters
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
IPv4 address (e.g., 192.0.2.0)
Response
Action on this rule
denypermitDestination ip for your rule
Destination port range for your rule. Only with TCP/UDP protocol
Fragments option
IP packet's total length
Network protocol
ahespgreicmpipv4tcpudpSource ip for your rule
Source port range for your rule. Only with TCP/UDP protocol
Current state of your rule
creationPendingokremovalPendingTCP option on your rule
Example uses ip = 192.0.2.0/24, ipOnFirewall = 192.0.2.0, sequence = 0
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ ip/ {ip}/ firewall/ {ipOnFirewall}/ rule/ {sequence} \
-H "authorization: Bearer $OVH_TOKEN"{ "action": "deny", "creationDate": "2024-01-01T12:00:00Z", "destination": "string", "destinationPort": "string", "fragments": true, "l3PacketLength": "string", "protocol": "ah", "rule": "string", "sequence": 0, "source": "string", "sourcePort": "string", "state": "creationPending", "tcpOption": "string"}
Create a firewalled IPProduction
Create a firewalled IP. Adds one address of the block to the firewall. Turn it on with Update a firewalled IP.
Path parameters
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
Request body (required)
IPv4 address (e.g., 192.0.2.0)
Response
IPv4 address (e.g., 192.0.2.0)
Current state of your ip on firewall
disableFirewallPendingenableFirewallPendingokExample uses ip = 192.0.2.0/24
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ ip/ {ip}/ firewall \
-H "authorization: Bearer $OVH_TOKEN"{ "enabled": true, "ipOnFirewall": "192.0.2.0", "state": "disableFirewallPending"}
Create a ruleProduction
Create a rule. Adds a permit or deny rule at sequence 0 to 19, matching protocol, source, ports or TCP options.
Path parameters
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
IPv4 address (e.g., 192.0.2.0)
Request body (required)
Action on this rule
denypermitDestination port for your rule. Only with TCP/UDP protocol
Destination port range for your rule. Only with TCP/UDP protocol. Cannot be set alongside destinationPort.
IP packet's total length
Network protocol
ahespgreicmpipv4tcpudpSequence number of your rule
012345678910111213141516171819Source ip for your rule. Any if not set
Source port for your rule. Only with TCP/UDP protocol
Source port range for your rule. Only with TCP/UDP protocol. Cannot be set alongside sourcePort.
Option on your rule. Can only be used with TCP protocol
Response
Action on this rule
denypermitDestination ip for your rule
Destination port range for your rule. Only with TCP/UDP protocol
Fragments option
IP packet's total length
Network protocol
ahespgreicmpipv4tcpudpSource ip for your rule
Source port range for your rule. Only with TCP/UDP protocol
Current state of your rule
creationPendingokremovalPendingTCP option on your rule
Example uses ip = 192.0.2.0/24, ipOnFirewall = 192.0.2.0
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ ip/ {ip}/ firewall/ {ipOnFirewall}/ rule \
-H "authorization: Bearer $OVH_TOKEN"{ "action": "deny", "creationDate": "2024-01-01T12:00:00Z", "destination": "string", "destinationPort": "string", "fragments": true, "l3PacketLength": "string", "protocol": "ah", "rule": "string", "sequence": 0, "source": "string", "sourcePort": "string", "state": "creationPending", "tcpOption": "string"}
Delete a firewalled IPProduction
Delete a firewalled IP. Removes the address of the block from the firewall, together with all the rules set on it.
Path parameters
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
IPv4 address (e.g., 192.0.2.0)
Response
Example uses ip = 192.0.2.0/24, ipOnFirewall = 192.0.2.0
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ ip/ {ip}/ firewall/ {ipOnFirewall} \
-H "authorization: Bearer $OVH_TOKEN""string"
Delete a ruleProduction
Delete a rule. Removes the rule at this sequence from the address's firewall, and returns the deleted rule.
Path parameters
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
IPv4 address (e.g., 192.0.2.0)
Response
Action on this rule
denypermitDestination ip for your rule
Destination port range for your rule. Only with TCP/UDP protocol
Fragments option
IP packet's total length
Network protocol
ahespgreicmpipv4tcpudpSource ip for your rule
Source port range for your rule. Only with TCP/UDP protocol
Current state of your rule
creationPendingokremovalPendingTCP option on your rule
Example uses ip = 192.0.2.0/24, ipOnFirewall = 192.0.2.0, sequence = 0
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ ip/ {ip}/ firewall/ {ipOnFirewall}/ rule/ {sequence} \
-H "authorization: Bearer $OVH_TOKEN"{ "action": "deny", "creationDate": "2024-01-01T12:00:00Z", "destination": "string", "destinationPort": "string", "fragments": true, "l3PacketLength": "string", "protocol": "ah", "rule": "string", "sequence": 0, "source": "string", "sourcePort": "string", "state": "creationPending", "tcpOption": "string"}
Update a firewalled IPProduction
Update a firewalled IP. Turns the firewall on or off for this address. Its state is enableFirewallPending or disableFirewallPending until the change is applied.
Path parameters
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
IPv4 address (e.g., 192.0.2.0)
Request body (required)
IPv4 address (e.g., 192.0.2.0)
Current state of your ip on firewall
disableFirewallPendingenableFirewallPendingokResponse
Example uses ip = 192.0.2.0/24, ipOnFirewall = 192.0.2.0
$ curl https:/ / api.eu.ovhcloud.com/ 1.0/ ip/ {ip}/ firewall/ {ipOnFirewall} \
-H "authorization: Bearer $OVH_TOKEN"