ServerMania logo

Change Firewall Rule Position

Ensure that the following permissions are enabled before setting firewall rules for your virtual server:

  • Create own firewall rules
  • Destroy own firewall rules
  • Read own firewall rules
  • Update own firewall rules

To change the position of the firewall rule, use the following request:

GET  /virtual_machines/:virtual_machine_id/firewall_rules/:firewall_rule_id/move.xml
GET /virtual_machines/:virtual_machine_id/firewall_rules/:firewall_rule_id/move.json

XML Request Example

curl -X GET -u user:userpass http://test/virtual_machines/23/firewall_rules/1/move.xml?position=down -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example:

curl -X GET -u user:userpass http://test/virtual_machines/23/firewall_rules/1/move.json?position=up -H 'Accept: application/json' -H 'Content-type: application/json'

Where:

virtual_machine_id - ID of a virtual server the firewall rule belongs to

firewall_rule_id - ID of the firewall rule

position - specify the position change: up or down