[Firewall Rule] addFirewall

addFirewall

Summary of the Process by the Function

Adds firewall rules on a virtual server.
When there are more than one added firewall rules, the application priority becomes the lowest.
In order to enable the added firewall rules, the rules need to be applied using applyFirewall function described in 10.7.

Request Parameters

Specify the following parameter(s) when executing this function.

ParameterDescriptionRequired
Identifier

VM identifier

Specifies the identifier of the virtual server
The virtual server identifier can be obtained through 4.1. listNodes function
It is the identifier in the response object, 4.1. listNodes

address

IP address

Specifies IP address you want to set as the source address in the firewall rule to be added
・ When this field value is NULL, it will be applied to all the IP addresses
・ When specifying IP address range, connect IP addresses by hyphen
(Example: 192.168.1.1-192.168.1.10)
・ When specifying IP address by CIDR, separate by slash
(Example: 192.168.1.1/24)

Command

Command

Specify a command to execute in the firewall rule to be added as ACCEPT or DROP

port

Port

Specifies port to send set in the firewall rule to be added
・ When this field value is NULL, it will be applied to all the port
・ When specifying by port range, connect port numbers by colon
(Example: 1024:1028)
・ When specifying more than one non-consequtive ports, separate them by comma
(Example: 80,443,21)

protocol

Protocol

Specifies protocol type which is set on the firewall rule to be added as TCP or UDP

network_interface_id

Network interface ID

Specifies network interface ID on which the firewall rule will be added
The network interface ID can be obtained through 7.1. listNetworkInterfaces function
It is the id in the API response object, 7.1. listNetworkInterfaces

Response Objects

If the request to add the specified firewall rules is successful then true is returned.
If the request to add the specified firewall rules failed then the resulting error message is returned.

Request Sample

https://api.gmocloud.com/Cloud-Zone-ID/?Action=addFirewall&AccessKeyId=AccessKeyId&Version=1.0&Identifier=Identifier_of_VM&address=192.168.1.100%2F32&command=ACCEPT&port=8080&protocol=TCP&network_interface_id=ID_of_IF&Signature=Signature

Response Sample

true

Note: GMO CLOUD AMERICA INC. does not make any guarantee with regard to the content of this manual and will not be held responsible for any damages resulting from customers or third parties.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk