- Products
- Learn
- Local User Groups
- Partners
- More
Access Control and Threat Prevention Best Practices
5 November @ 5pm CET / 11am ET
Firewall Uptime, Reimagined
How AIOps Simplifies Operations and Prevents Outages
Ask Check Point Threat Intelligence Anything!
October 28th, 9am ET / 3pm CET
HTTPS Inspection
Help us to understand your needs better
CheckMates Go:
Spark Management Portal and More!
Can someone please provide an example of creating a static NAT policy rule with DBEdit?
I am looking to create many rules like these ones with a script
orig src orig dest orig svc NATed src NATed dest NATed svc Install on
------------- --------------- -------- -------------- ------------ --------- -----------
SOME-NET host-natted-ip any original host-real-ip original firewall123
host-real-ip SOME-NET any host-natted-ip original original firewall123Thanks,
Eli
You realize that's a challenge I can't back down from, right? 😬
In the following example, I have an existing manual rule in the NAT rulebase in the policy package MyPolicy.
I am adding a manual NAT rule to this to do source NAT for MyObject to MyObject-Public.
addelement fw_policies ##MyPolicy rule_adtr address_translation_rule
modify fw_policies ##MyPolicy rule_adtr:1:comments "This is really Rule number 2"
addelement fw_policies ##MyPolicy rule_adtr:1:src_adtr network_objects:MyObject
addelement fw_policies ##MyPolicy rule_adtr:1:dst_adtr globals:Any
addelement fw_policies ##MyPolicy rule_adtr:1:services_adtr globals:Any
modify fw_policies ##MyPolicy rule_adtr:1:src_adtr_translated translate_static
modify fw_policies ##MyPolicy rule_adtr:1:src_adtr_translated:'' network_objects:MyObject-public
modify fw_policies ##MyPolicy rule_adtr:1:dst_adtr_translated translate_static
modify fw_policies ##MyPolicy rule_adtr:1:dst_adtr_translated:'' globals:Any
modify fw_policies ##MyPolicy rule_adtr:1:services_adtr_translated service_translate
modify fw_policies ##MyPolicy rule_adtr:1:services_adtr_translated:'' globals:Any
update_all
(Note: It is helpful to refer to $FWDIR/conf/classes.C when you're figuring out how to do things in dbedit).
Note modifying the NAT rulebase with dbedit has the same basic limitations as the regular rulebase.
Namely, it's easy to add rules to the bottom of the rulebase, but not necessarily "somewhere in the middle" as it involves deleting all the rules below and re-adding them.
In short, it's really worth upgrading your management to R80.x as this is much easier, has better documentation, and more importantly, is supported.
Why dbedit? It is legacy and bad for scripting. Uye MGMT API instead
https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-nat-rule~v1.6%20
I am running r77.30. I think dbedit is my only option, isn't it?
Unfortunately, yes. Just a reminder, R77.30 is out of support from September 2019.
Also, I thinnk dbedit does not have an option to add NAT rules. You still can enable automatic NAT on an object with it, though:
https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solut...
https://sc1.checkpoint.com/documents/R77/CP_R77_Multi-DomainSecurityManagement_WebAdminGuide/105997....
True. I think the best would be to lift management to one of R80.x, so API would be available. I do not see a way to add manual NAT rules with dbedit (Despite what @PhoneBoy is implying :-))
Prove it please 🙂
You realize that's a challenge I can't back down from, right? 😬
In the following example, I have an existing manual rule in the NAT rulebase in the policy package MyPolicy.
I am adding a manual NAT rule to this to do source NAT for MyObject to MyObject-Public.
addelement fw_policies ##MyPolicy rule_adtr address_translation_rule
modify fw_policies ##MyPolicy rule_adtr:1:comments "This is really Rule number 2"
addelement fw_policies ##MyPolicy rule_adtr:1:src_adtr network_objects:MyObject
addelement fw_policies ##MyPolicy rule_adtr:1:dst_adtr globals:Any
addelement fw_policies ##MyPolicy rule_adtr:1:services_adtr globals:Any
modify fw_policies ##MyPolicy rule_adtr:1:src_adtr_translated translate_static
modify fw_policies ##MyPolicy rule_adtr:1:src_adtr_translated:'' network_objects:MyObject-public
modify fw_policies ##MyPolicy rule_adtr:1:dst_adtr_translated translate_static
modify fw_policies ##MyPolicy rule_adtr:1:dst_adtr_translated:'' globals:Any
modify fw_policies ##MyPolicy rule_adtr:1:services_adtr_translated service_translate
modify fw_policies ##MyPolicy rule_adtr:1:services_adtr_translated:'' globals:Any
update_all
(Note: It is helpful to refer to $FWDIR/conf/classes.C when you're figuring out how to do things in dbedit).
Note modifying the NAT rulebase with dbedit has the same basic limitations as the regular rulebase.
Namely, it's easy to add rules to the bottom of the rulebase, but not necessarily "somewhere in the middle" as it involves deleting all the rules below and re-adding them.
In short, it's really worth upgrading your management to R80.x as this is much easier, has better documentation, and more importantly, is supported.
@PhoneBoy strikes again, well done!
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 24 | |
| 13 | |
| 7 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
Tue 28 Oct 2025 @ 11:00 AM (EDT)
Under the Hood: CloudGuard Network Security for Google Cloud Network Security Integration - OverviewTue 28 Oct 2025 @ 12:30 PM (EDT)
Check Point & AWS Virtual Immersion Day: Web App ProtectionTue 28 Oct 2025 @ 11:00 AM (EDT)
Under the Hood: CloudGuard Network Security for Google Cloud Network Security Integration - OverviewTue 28 Oct 2025 @ 12:30 PM (EDT)
Check Point & AWS Virtual Immersion Day: Web App ProtectionThu 30 Oct 2025 @ 03:00 PM (CET)
Cloud Security Under Siege: Critical Insights from the 2025 Security Landscape - EMEAThu 30 Oct 2025 @ 11:00 AM (EDT)
Tips and Tricks 2025 #15: Become a Threat Exposure Management Power User!About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY