Skip to content

Edge Network Firewall

All operations require authentication.

9 operationsv1/ip/{ip}
Agent setup

List firewalled IPsProduction

GET
/1.0/ip/{ip}/firewall

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
required
ipBlock

IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)

Query parameters

enabled
boolean

Filter the value of enabled property (=)

state
FirewallStateEnum

Filter the value of state property (=)

ValuesdisableFirewallPendingenableFirewallPendingok

Response

200ipv4[]successful operation

Example uses ip = 192.0.2.0/24

$ curl https://api.eu.ovhcloud.com/1.0/ip/{ip}/firewall \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "192.0.2.0"]

List rulesProduction

GET
/1.0/ip/{ip}/firewall/{ipOnFirewall}/rule

List rules. Returns the sequence numbers of the address's firewall rules, filterable by state: creationPending, ok or removalPending.

Path parameters

ip
required
ipBlock

IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)

ipOnFirewall
required
ipv4

IPv4 address (e.g., 192.0.2.0)

Query parameters

state
FirewallRuleStateEnum

Filter the value of state property (=)

ValuescreationPendingokremovalPending

Response

200integer[]successful operation

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"
ResponseExample
[ 0]

Get a firewalled IPProduction

GET
/1.0/ip/{ip}/firewall/{ipOnFirewall}

Get a firewalled IP. Returns whether the firewall is enabled on this address, and its state: ok, enableFirewallPending or disableFirewallPending.

Path parameters

ip
required
ipBlock

IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)

ipOnFirewall
required
ipv4

IPv4 address (e.g., 192.0.2.0)

Response

200FirewallIpsuccessful operation
enabled
boolean
—
ipOnFirewall
read-only
ipv4

IPv4 address (e.g., 192.0.2.0)

state
read-only
FirewallStateEnum

Current state of your ip on firewall

ValuesdisableFirewallPendingenableFirewallPendingok

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"
ResponseExample
{ "enabled": true, "ipOnFirewall": "192.0.2.0", "state": "disableFirewallPending"}

Get a ruleProduction

GET
/1.0/ip/{ip}/firewall/{ipOnFirewall}/rule/{sequence}

Get a rule. Returns the rule's action, protocol, source, destination, ports, TCP options, fragments option, packet length and state.

Path parameters

ip
required
ipBlock

IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)

ipOnFirewall
required
ipv4

IPv4 address (e.g., 192.0.2.0)

sequence
required
integer
—

Response

200FirewallNetworkRulesuccessful operation
action
read-only
FirewallActionEnum

Action on this rule

Valuesdenypermit
creationDate
read-only
stringdate-time
—
destination
read-only
string

Destination ip for your rule

destinationPort
read-only
string

Destination port range for your rule. Only with TCP/UDP protocol

fragments
read-only
boolean

Fragments option

l3PacketLength
read-only
string

IP packet's total length

protocol
read-only
FirewallProtocolEnum

Network protocol

Valuesahespgreicmpipv4tcpudp
rule
read-only
string
—
sequence
read-only
integer
—
source
read-only
string

Source ip for your rule

sourcePort
read-only
string

Source port range for your rule. Only with TCP/UDP protocol

state
read-only
FirewallRuleStateEnum

Current state of your rule

ValuescreationPendingokremovalPending
tcpOption
read-only
string

TCP 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"
ResponseExample
{ "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

POST
/1.0/ip/{ip}/firewall

Create a firewalled IP. Adds one address of the block to the firewall. Turn it on with Update a firewalled IP.

Path parameters

ip
required
ipBlock

IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)

Request body (required)

ipOnFirewall
required
ipv4

IPv4 address (e.g., 192.0.2.0)

Response

200FirewallIpsuccessful operation
enabled
boolean
—
ipOnFirewall
read-only
ipv4

IPv4 address (e.g., 192.0.2.0)

state
read-only
FirewallStateEnum

Current state of your ip on firewall

ValuesdisableFirewallPendingenableFirewallPendingok

Example uses ip = 192.0.2.0/24

$ curl https://api.eu.ovhcloud.com/1.0/ip/{ip}/firewall \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "enabled": true, "ipOnFirewall": "192.0.2.0", "state": "disableFirewallPending"}

Create a ruleProduction

POST
/1.0/ip/{ip}/firewall/{ipOnFirewall}/rule

Create a rule. Adds a permit or deny rule at sequence 0 to 19, matching protocol, source, ports or TCP options.

Path parameters

ip
required
ipBlock

IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)

ipOnFirewall
required
ipv4

IPv4 address (e.g., 192.0.2.0)

Request body (required)

action
required
FirewallActionEnum

Action on this rule

Valuesdenypermit
destinationPort
integer

Destination port for your rule. Only with TCP/UDP protocol

destinationPortRange
Range_long

Destination port range for your rule. Only with TCP/UDP protocol. Cannot be set alongside destinationPort.

l3PacketLength
Range_long

IP packet's total length

protocol
required
FirewallProtocolEnum

Network protocol

Valuesahespgreicmpipv4tcpudp
sequence
required
FirewallSequenceRangeEnum

Sequence number of your rule

Values012345678910111213141516171819
source
ipv4Block

Source ip for your rule. Any if not set

sourcePort
integer

Source port for your rule. Only with TCP/UDP protocol

sourcePortRange
Range_long

Source port range for your rule. Only with TCP/UDP protocol. Cannot be set alongside sourcePort.

tcpOption
FirewallOptionTCP

Option on your rule. Can only be used with TCP protocol

Response

200FirewallNetworkRulesuccessful operation
action
read-only
FirewallActionEnum

Action on this rule

Valuesdenypermit
creationDate
read-only
stringdate-time
—
destination
read-only
string

Destination ip for your rule

destinationPort
read-only
string

Destination port range for your rule. Only with TCP/UDP protocol

fragments
read-only
boolean

Fragments option

l3PacketLength
read-only
string

IP packet's total length

protocol
read-only
FirewallProtocolEnum

Network protocol

Valuesahespgreicmpipv4tcpudp
rule
read-only
string
—
sequence
read-only
integer
—
source
read-only
string

Source ip for your rule

sourcePort
read-only
string

Source port range for your rule. Only with TCP/UDP protocol

state
read-only
FirewallRuleStateEnum

Current state of your rule

ValuescreationPendingokremovalPending
tcpOption
read-only
string

TCP 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"
ResponseExample
{ "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
/1.0/ip/{ip}/firewall/{ipOnFirewall}

Delete a firewalled IP. Removes the address of the block from the firewall, together with all the rules set on it.

Path parameters

ip
required
ipBlock

IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)

ipOnFirewall
required
ipv4

IPv4 address (e.g., 192.0.2.0)

Response

200stringsuccessful operation

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"
ResponseExample
"string"

Delete a ruleProduction

DELETE
/1.0/ip/{ip}/firewall/{ipOnFirewall}/rule/{sequence}

Delete a rule. Removes the rule at this sequence from the address's firewall, and returns the deleted rule.

Path parameters

ip
required
ipBlock

IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)

ipOnFirewall
required
ipv4

IPv4 address (e.g., 192.0.2.0)

sequence
required
integer
—

Response

200FirewallNetworkRulesuccessful operation
action
read-only
FirewallActionEnum

Action on this rule

Valuesdenypermit
creationDate
read-only
stringdate-time
—
destination
read-only
string

Destination ip for your rule

destinationPort
read-only
string

Destination port range for your rule. Only with TCP/UDP protocol

fragments
read-only
boolean

Fragments option

l3PacketLength
read-only
string

IP packet's total length

protocol
read-only
FirewallProtocolEnum

Network protocol

Valuesahespgreicmpipv4tcpudp
rule
read-only
string
—
sequence
read-only
integer
—
source
read-only
string

Source ip for your rule

sourcePort
read-only
string

Source port range for your rule. Only with TCP/UDP protocol

state
read-only
FirewallRuleStateEnum

Current state of your rule

ValuescreationPendingokremovalPending
tcpOption
read-only
string

TCP 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"
ResponseExample
{ "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

PUT
/1.0/ip/{ip}/firewall/{ipOnFirewall}

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
required
ipBlock

IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)

ipOnFirewall
required
ipv4

IPv4 address (e.g., 192.0.2.0)

Request body (required)

enabled
boolean
—
ipOnFirewall
read-only
ipv4

IPv4 address (e.g., 192.0.2.0)

state
read-only
FirewallStateEnum

Current state of your ip on firewall

ValuesdisableFirewallPendingenableFirewallPendingok

Response

200—successful operation

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"