<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Adding simple GW with several network interfaces using Web Services API in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32862#M2034</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, API experts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to automatize adding simple GWs to my MGMT using API.&lt;/P&gt;&lt;P&gt;With mgmt cli it works perfectly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mgmt add simple-gateway name "GW-R80.10-API" color "black" ipv4-address "192.168.48.199" version "R80.10" one-time-password "sic123" firewall true application-control true url-filtering true ips true anti-bot true anti-virus true interfaces.1.name "eth0" interfaces.1.ipv4-address "192.168.48.199" interfaces.1.ipv4-network-mask "255.255.255.0" interfaces.1.anti-spoofing true interfaces.1.topology "external" interfaces.2.name "eth1" interfaces.2.ipv4-address "192.168.10.199" interfaces.2.ipv4-network-mask "255.255.255.0" interfaces.2.anti-spoofing true interfaces.2.topology "internal" interfaces.2.topology-settings.ip-address-behind-this-interface "network defined by the interface ip and net mask"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But mgmt cli is not the thing I need, so Im trying to use Python script with Web Services API:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; add_gw_data = {&lt;BR /&gt;... "name": "GW-R80.10-API", &lt;BR /&gt;... "color": "black", &lt;BR /&gt;... "ipv4-address": "192.168.48.199", &lt;BR /&gt;... "version": "R80.10", &lt;BR /&gt;... "one-time-password": "sic123", &lt;BR /&gt;... "firewall": "true", &lt;BR /&gt;... "application-control": "true", &lt;BR /&gt;... "url-filtering": "true", &lt;BR /&gt;... "ips": "true", &lt;BR /&gt;... "anti-bot": "true", &lt;BR /&gt;... "anti-virus": "true", &lt;BR /&gt;... "interfaces.1.name": "eth0", &lt;BR /&gt;... "interfaces.1.ipv4-address": "192.168.48.199", &lt;BR /&gt;... "interfaces.1.ipv4-network-mask": "255.255.255.0", &lt;BR /&gt;... "interfaces.1.anti-spoofing": "true", &lt;BR /&gt;... "interfaces.1.topology": "external", &lt;BR /&gt;... "interfaces.2.name": "eth1", &lt;BR /&gt;... "interfaces.2.ipv4-address": "192.168.10.199", &lt;BR /&gt;... "interfaces.2.ipv4-network-mask": "255.255.255.0", &lt;BR /&gt;... "interfaces.2.anti-spoofing": "true", &lt;BR /&gt;... "interfaces.2.topology": "internal", &lt;BR /&gt;... "interfaces.2.topology-settings.ip-address-behind-this-interface": "network defined by the interface ip and net mask"&lt;BR /&gt;... }&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; add_gw = api_call(mgmt_ip_addr, "add-simple-gateway", add_gw_data, sid)&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; print(json.dumps(add_gw))&lt;BR /&gt;{"message": "Unrecognized parameter [interfaces.2.name]", "code": "generic_err_invalid_parameter_name"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I properly define all network interfaces?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interfaces is List parameter, what is the proper syntax to define all the interfaces in this structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Mar 2018 11:38:54 GMT</pubDate>
    <dc:creator>Sergey_Slepkov</dc:creator>
    <dc:date>2018-03-01T11:38:54Z</dc:date>
    <item>
      <title>Adding simple GW with several network interfaces using Web Services API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32862#M2034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, API experts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to automatize adding simple GWs to my MGMT using API.&lt;/P&gt;&lt;P&gt;With mgmt cli it works perfectly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mgmt add simple-gateway name "GW-R80.10-API" color "black" ipv4-address "192.168.48.199" version "R80.10" one-time-password "sic123" firewall true application-control true url-filtering true ips true anti-bot true anti-virus true interfaces.1.name "eth0" interfaces.1.ipv4-address "192.168.48.199" interfaces.1.ipv4-network-mask "255.255.255.0" interfaces.1.anti-spoofing true interfaces.1.topology "external" interfaces.2.name "eth1" interfaces.2.ipv4-address "192.168.10.199" interfaces.2.ipv4-network-mask "255.255.255.0" interfaces.2.anti-spoofing true interfaces.2.topology "internal" interfaces.2.topology-settings.ip-address-behind-this-interface "network defined by the interface ip and net mask"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But mgmt cli is not the thing I need, so Im trying to use Python script with Web Services API:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; add_gw_data = {&lt;BR /&gt;... "name": "GW-R80.10-API", &lt;BR /&gt;... "color": "black", &lt;BR /&gt;... "ipv4-address": "192.168.48.199", &lt;BR /&gt;... "version": "R80.10", &lt;BR /&gt;... "one-time-password": "sic123", &lt;BR /&gt;... "firewall": "true", &lt;BR /&gt;... "application-control": "true", &lt;BR /&gt;... "url-filtering": "true", &lt;BR /&gt;... "ips": "true", &lt;BR /&gt;... "anti-bot": "true", &lt;BR /&gt;... "anti-virus": "true", &lt;BR /&gt;... "interfaces.1.name": "eth0", &lt;BR /&gt;... "interfaces.1.ipv4-address": "192.168.48.199", &lt;BR /&gt;... "interfaces.1.ipv4-network-mask": "255.255.255.0", &lt;BR /&gt;... "interfaces.1.anti-spoofing": "true", &lt;BR /&gt;... "interfaces.1.topology": "external", &lt;BR /&gt;... "interfaces.2.name": "eth1", &lt;BR /&gt;... "interfaces.2.ipv4-address": "192.168.10.199", &lt;BR /&gt;... "interfaces.2.ipv4-network-mask": "255.255.255.0", &lt;BR /&gt;... "interfaces.2.anti-spoofing": "true", &lt;BR /&gt;... "interfaces.2.topology": "internal", &lt;BR /&gt;... "interfaces.2.topology-settings.ip-address-behind-this-interface": "network defined by the interface ip and net mask"&lt;BR /&gt;... }&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; add_gw = api_call(mgmt_ip_addr, "add-simple-gateway", add_gw_data, sid)&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; print(json.dumps(add_gw))&lt;BR /&gt;{"message": "Unrecognized parameter [interfaces.2.name]", "code": "generic_err_invalid_parameter_name"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I properly define all network interfaces?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interfaces is List parameter, what is the proper syntax to define all the interfaces in this structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2018 11:38:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32862#M2034</guid>
      <dc:creator>Sergey_Slepkov</dc:creator>
      <dc:date>2018-03-01T11:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Adding simple GW with several network interfaces using Web Services API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32863#M2035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answer is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"interfaces": [{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"name": "eth0",&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"ipv4-address": "192.168.48.199",&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"ipv4-network-mask": "255.255.255.0",&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"anti-spoofing": "true",&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"topology": "external"&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;},&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;{&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"name": "eth1",&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"ipv4-address": "192.168.10.199",&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"ipv4-network-mask": "255.255.255.0",&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"anti-spoofing": "true",&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"topology": "internal",&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"topology-settings": {&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;"ip-address-behind-this-interface": "network defined by the interface ip and net mask"&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;}&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;}&lt;BR /&gt; ]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 15:43:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32863#M2035</guid>
      <dc:creator>Sergey_Slepkov</dc:creator>
      <dc:date>2018-03-05T15:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding simple GW with several network interfaces using Web Services API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32864#M2036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Added a simple Python script, that&lt;/P&gt;&lt;P&gt;- creates internal network,&lt;/P&gt;&lt;P&gt;- creates single GW object with sic,&lt;/P&gt;&lt;P&gt;- adds MGMT rule to default Access policy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;- publish and install Access policy to GW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need a Threat Prevention policy installed, it should be installed after Access Policy, so you need to make some IF structure, that monitors successful installation of Access Policy before attempting a TP policy installation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will upgrade script someday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 07:01:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32864#M2036</guid>
      <dc:creator>Sergey_Slepkov</dc:creator>
      <dc:date>2018-03-06T07:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding simple GW with several network interfaces using Web Services API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32865#M2037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sergey,&lt;/P&gt;&lt;P&gt;You should always go to the API docs and refs, you have some examples there how to do things.&lt;/P&gt;&lt;P&gt;There are examples for mgmt_cli tool and for web services as well, just select the required menu item on top.&lt;/P&gt;&lt;P&gt;For your case, go to &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/add-simple-gateway~v1.1"&gt;this link&lt;/A&gt; and browse the second example.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Robert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 09:16:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32865#M2037</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2018-03-06T09:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding simple GW with several network interfaces using Web Services API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32866#M2038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Work!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 09:19:04 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32866#M2038</guid>
      <dc:creator>Robert_Decker</dc:creator>
      <dc:date>2018-03-06T09:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding simple GW with several network interfaces using Web Services API</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32867#M2039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 08:05:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Adding-simple-GW-with-several-network-interfaces-using-Web/m-p/32867#M2039</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2018-03-07T08:05:18Z</dc:date>
    </item>
  </channel>
</rss>

