{"id":13448,"date":"2016-06-22T11:34:23","date_gmt":"2016-06-22T16:34:23","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=13448"},"modified":"2016-07-13T11:06:50","modified_gmt":"2016-07-13T16:06:50","slug":"dnat-rule","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mtr-software\/mtr-api-reference\/rcell_api_appendix\/dnat-rule\/","title":{"rendered":"Using Curl to Add a Firewall DNAT Rule"},"content":{"rendered":"<p><strong>Example<\/strong>: Using Curl to add a firewall DNAT rule<\/p>\n<pre class=\"brush:xml\">curl -k -X POST -H \"Content-Type : application\/json\" -d '{\r\n    \"description\" : \"\",\r\n    \"direction\" : \"INGRESS\",\r\n    \"enabled\" : true,\r\n    \"guid\" : \"FTP-SERVER-DNAT\",\r\n    \"name\" : \"FTP-SERVER\",\r\n    \"protocol\" : \"TCP\",\r\n    \"type\" : \"DNAT\",\r\n    \"wanIp\" : \"ANY\",\r\n    \"wanMask\" : 32,\r\n    \"wanPortEnd\" : \"21\",\r\n    \"wanPortStart\" : \"20\",\r\n}' https:\/\/192.168.2.1\/api\/nat?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 DNAT rule curl -k -X POST -H &#8220;Content-Type : application\/json&#8221; -d &#8216;{ &#8220;description&#8221; : &#8220;&#8221;, &#8220;direction&#8221; : &#8220;INGRESS&#8221;, &#8220;enabled&#8221; : true, &#8220;guid&#8221; : &#8220;FTP-SERVER-DNAT&#8221;, &#8220;name&#8221; : &#8220;FTP-SERVER&#8221;, &#8220;protocol&#8221; : &#8220;TCP&#8221;, &#8220;type&#8221; : &#8220;DNAT&#8221;, &#8220;wanIp&#8221; : &#8220;ANY&#8221;, &#8220;wanMask&#8221; : 32, &#8220;wanPortEnd&#8221; : &#8220;21&#8221;, &#8220;wanPortStart&#8221; : &#8220;20&#8221;, }&#8217; https:\/\/192.168.2.1\/api\/nat?token=2442CB0CB60B2EE9F5A35DF5ED8C33 Example: [&hellip;]<\/p>\n","protected":false},"author":1872,"featured_media":0,"parent":13423,"menu_order":3,"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-13448","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13448","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=13448"}],"version-history":[{"count":11,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13448\/revisions"}],"predecessor-version":[{"id":14068,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13448\/revisions\/14068"}],"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=13448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}