{"id":13453,"date":"2016-06-22T11:36:49","date_gmt":"2016-06-22T16:36:49","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=13453"},"modified":"2016-07-13T11:07:41","modified_gmt":"2016-07-13T16:07:41","slug":"add-a-firewall-filter-rule","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mtr-software\/mtr-api-reference\/rcell_api_appendix\/add-a-firewall-filter-rule\/","title":{"rendered":"Using Curl to Add a Firewall Filter Rule"},"content":{"rendered":"<p><strong>Example<\/strong>: Using Curl to add a firewall filter rule<\/p>\n<pre class=\"brush:xml\">curl -k -X POST -H \"Content-Type: application\/json\" -d '{\r\n    \"action\" : \"ACCEPT\",\r\n    \"description\" : \"\",\r\n    \"direction\" : \"INGRESS\",\r\n    \"dstIp\" : \"192.168.2.103\",\r\n    \"dstMask\" : 32,\r\n    \"dstNetwork\" : \"\",\r\n    \"dstPortEnd\" : 21,\r\n    \"dstPortStart\" : 20,\r\n    \"enabled\": true,\r\n    \"name\": \"FTP-SERVER\",\r\n    \"protocol\" : \"TCP\",\r\n    \"srcIp\" : \"ANY\",\r\n    \"srcMask\" : 32,\r\n    \"srcMac\" : \"\",\r\n    \"srcNetwork\" : \"\",\r\n    \"srcPortEnd\" : \"ANY\",\r\n    \"srcPortStart\" : \"ANY\"\r\n}' https:\/\/192.168.2.1\/api\/filters?token=2442CB0CB60B2EE9F5A35DF5ED8C33<\/pre>\n<p><strong>Example<\/strong>: Curl result:<\/p>\n<pre class=\"brush:xml\">{\r\n    \"code\" : 200,\r\n    \"status\" : \"success\"\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Example: Using Curl to add a firewall filter rule curl -k -X POST -H &#8220;Content-Type: application\/json&#8221; -d &#8216;{ &#8220;action&#8221; : &#8220;ACCEPT&#8221;, &#8220;description&#8221; : &#8220;&#8221;, &#8220;direction&#8221; : &#8220;INGRESS&#8221;, &#8220;dstIp&#8221; : &#8220;192.168.2.103&#8221;, &#8220;dstMask&#8221; : 32, &#8220;dstNetwork&#8221; : &#8220;&#8221;, &#8220;dstPortEnd&#8221; : 21, &#8220;dstPortStart&#8221; : 20, &#8220;enabled&#8221;: true, &#8220;name&#8221;: &#8220;FTP-SERVER&#8221;, &#8220;protocol&#8221; : &#8220;TCP&#8221;, &#8220;srcIp&#8221; : &#8220;ANY&#8221;, &#8220;srcMask&#8221; : 32, [&hellip;]<\/p>\n","protected":false},"author":1872,"featured_media":0,"parent":13423,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-13453","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/1872"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=13453"}],"version-history":[{"count":10,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13453\/revisions"}],"predecessor-version":[{"id":32908,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13453\/revisions\/32908"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13423"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=13453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}