ServerMania logo

Get List of Firewall Rules

To get the list of firewall rules assigned to a VS, use the following request:

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

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://test/virtual_machines/1/firewall_rules.xml

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://test/virtual_machines/1/firewall_rules.json 

XML Output Example

<address> </address>
<comment>This is a comment</comment>


position – the rule priority

address* – the IP address for which this rule is active. If none is specified, all IPs will be subject to this rule.

created_at – the date when the record in DB was created

command – the action which will be performed with the IP specified by the address parameter

updated_at – the date when the record was updated in DB

port – the port for which this rule is active. If the field is empty, the rule will apply to all ports

protocol – the IP protocol (TCP or UDP)for which this rule is active

id – the ID of this record

network_interface_id – the ID of a network interface for which this rule is active

(lightbulb) comment - the comment added to the firewall rule

Page History

v. 6.1 

  • added the comment parameter