<?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 Re: Working with NAT rules in Ansible</title>
    <link>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176347#M716</link>
    <description>&lt;P&gt;If I use name: "name" in my Ansible playbook I get an error stating name isnt valid option for a NAT rule.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;"msg": "Unsupported parameters for (cp_mgmt_add_nat_rule) module: name. Supported parameters include: ignore_errors, translated_destination, translated_source, original_destination, ignore_warnings, package, wait_for_task_timeout, install_on, version, comments, enabled, original_source, translated_service, original_service, details_level, wait_for_task, position, method."}&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Position isn't really position it seems, just a value which must be unique. So if I have&lt;/P&gt;&lt;P&gt;1 - first NAT rule&lt;/P&gt;&lt;P&gt;2 - second NAT rule&lt;/P&gt;&lt;P&gt;3 - third NAT rule&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can only use position 4 (which will put it below 3), if I use any of the other positions I get an error. That is my experience at least.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh 81.10 BTW, forgot to add that.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 17:57:31 GMT</pubDate>
    <dc:creator>boneyard</dc:creator>
    <dc:date>2023-03-27T17:57:31Z</dc:date>
    <item>
      <title>Working with NAT rules</title>
      <link>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176334#M712</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Anyone found a way around the issues I encounter with trying to create the NAT policy?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;### Name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm unable to set the name of a NAT rule. This is possible manually in Smart Console.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;### Position&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm unable to get rules above the Automatic Generated Rules. This is possible in Smart Console.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't use position 1 or 2 because those are for default rules. Can't use 0 as error states must be great equal 1. So when I create the rule on position 3 it is below the others. I really miss an insert above / below position X kinda option. Or a move rule option. That goes for access policies also.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Possibly with check_point.mgmt.cp_mgmt_set_nat_rule and new position option, but zero documentation on if at all and if so how. The fact i have to do it according to the document by "Edit existing object using object name or uid." and the example not showing either doesn't give me a warm feeling ...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;### Multiple modules&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't use state present / absent as with a regular access policy and many other Ansible modules. So have to use cp_mgmt_add_nat_rule AND cp_mgmt_delete_nat_rule, why this difference?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 15:55:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176334#M712</guid>
      <dc:creator>boneyard</dc:creator>
      <dc:date>2023-03-27T15:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Working with NAT rules</title>
      <link>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176336#M713</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;Not sure I understand your poitns 1 and 2. Name can be configured, as well as position.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 16:34:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176336#M713</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2023-03-27T16:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Working with NAT rules</title>
      <link>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176345#M715</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Starting from R81 API version 1.7 and later we started supporting to use name in the NAT rule which enables you to create a idempotent module for our ansible collection to add, change and delete NAT rules.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This module has been developed by R&amp;amp;D and is going to be added to Galaxy repository in the next version we release of the collection.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection/blob/master/plugins/modules/cp_mgmt_nat_rule.py" target="_blank"&gt;https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection/blob/master/plugins/modules/cp_mgmt_nat_rule.py&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The new module allows you to use relative position such as&amp;nbsp;&lt;SPAN&gt;"top" and "bottom" to overcome&amp;nbsp;the challenges of creating a rule above&amp;nbsp;or&amp;nbsp;below the automatic generated NAT rules in a situation when there is no manual NAT rule already in place in that location.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;If you want to find an example on how to use it you can find that here: &lt;BR /&gt;(this example uses the relative position "top" to be able to create the first rule in a new NAT rule base above the automatic NAT rule)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/checkpointsw-devsec/enterprise-automation-poc/blob/main/ansible/roles/chkp-nat-policy/tasks/objects/configure-policy-nat-rules.yml" target="_blank"&gt;https://github.com/checkpointsw-devsec/enterprise-automation-poc/blob/main/ansible/roles/chkp-nat-policy/tasks/objects/configure-policy-nat-rules.yml&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Please note as described in the module the management server needs to have a JHF that addresses&amp;nbsp;&lt;SPAN&gt;PMTR-88097&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.checkpoint.com/search#q=PMTR-88097" target="_blank"&gt;https://support.checkpoint.com/search#q=PMTR-88097&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 17:49:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176345#M715</guid>
      <dc:creator>Jim_Oqvist</dc:creator>
      <dc:date>2023-03-27T17:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Working with NAT rules</title>
      <link>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176347#M716</link>
      <description>&lt;P&gt;If I use name: "name" in my Ansible playbook I get an error stating name isnt valid option for a NAT rule.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;"msg": "Unsupported parameters for (cp_mgmt_add_nat_rule) module: name. Supported parameters include: ignore_errors, translated_destination, translated_source, original_destination, ignore_warnings, package, wait_for_task_timeout, install_on, version, comments, enabled, original_source, translated_service, original_service, details_level, wait_for_task, position, method."}&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Position isn't really position it seems, just a value which must be unique. So if I have&lt;/P&gt;&lt;P&gt;1 - first NAT rule&lt;/P&gt;&lt;P&gt;2 - second NAT rule&lt;/P&gt;&lt;P&gt;3 - third NAT rule&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can only use position 4 (which will put it below 3), if I use any of the other positions I get an error. That is my experience at least.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh 81.10 BTW, forgot to add that.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 17:57:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176347#M716</guid>
      <dc:creator>boneyard</dc:creator>
      <dc:date>2023-03-27T17:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Working with NAT rules</title>
      <link>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176348#M717</link>
      <description>&lt;P&gt;Ok, disregard what I said then, I thought you were strictly referring to smart console.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 18:01:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Ansible/Working-with-NAT-rules/m-p/176348#M717</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2023-03-27T18:01:16Z</dc:date>
    </item>
  </channel>
</rss>

