firewall-ruleset
Create multiple server firewall rules
Creates multiple server firewall rules by given {server-uuid}.
put/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule
Request
- Base URL: https://api.upcloud.com
- URL: https://api.upcloud.com/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule
- Auth: HTTP bearer
Path parameters
server-uuidstring uuid required
The unique identifier for the server.
Example:01234567-89ab-cdef-0123-456789abcdef
Server UUID
Request body
Example request
{
"firewall_rules": {
"firewall_rule": [
{
"action": "accept",
"comment": "Allow SSH from this network",
"destination_address_start": null,
"destination_address_end": null,
"destination_port_start": "22",
"destination_port_end": "22",
"direction": "in",
"family": "IPv4",
"source_address_start": "192.168.1.1",
"source_address_end": "192.168.1.255",
"source_port_start": null,
"source_port_end": null,
"icmp_type": null,
"protocol": "tcp"
},
{
"action": "accept",
"comment": "Allow DNS from this network",
"destination_address_start": null,
"destination_address_end": null,
"destination_port_start": "53",
"destination_port_end": "53",
"direction": "in",
"family": "IPv4",
"source_address_start": "1.1.1.1",
"source_address_end": "1.1.1.1",
"source_port_start": null,
"source_port_end": null,
"icmp_type": null,
"protocol": "tcp"
},
{
"action": "drop",
"comment": "dfg",
"destination_address_start": "100.100.128.2",
"destination_address_end": "100.100.128.2",
"destination_port_start": "89",
"destination_port_end": "89",
"direction": "out",
"family": "IPv4",
"source_address_start": null,
"source_address_end": null,
"source_port_start": null,
"source_port_end": null,
"icmp_type": null,
"protocol": "tcp"
},
{
"action": "accept",
"comment": "'w???''?p'2'?12??12?3?'231",
"destination_address_start": "2a04:3540:1001:1000:1411:4dff:fea5:1bab",
"destination_address_end": "2a04:3540:1001:1000:1411:4dff:fea5:1bab",
"destination_port_start": null,
"destination_port_end": null,
"direction": "out",
"family": "IPv6",
"source_address_start": null,
"source_address_end": null,
"source_port_start": null,
"source_port_end": null,
"icmp_type": "12",
"protocol": "icmp"
}
]
}
}Response
OK
Example response
{
"firewall_rules": {
"firewall_rule": [
{
"direction": "in",
"action": "accept",
"family": "IPv4",
"protocol": "tcp"
},
{
"direction": "out",
"action": "drop",
"family": "IPv4"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.