- Products
- Learn
- Local User Groups
- Partners
- More
Firewall Uptime, Reimagined
How AIOps Simplifies Operations and Prevents Outages
Introduction to Lakera:
Securing the AI Frontier!
Check Point Named Leader
2025 Gartner® Magic Quadrant™ for Hybrid Mesh Firewall
HTTPS Inspection
Help us to understand your needs better
CheckMates Go:
SharePoint CVEs 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 firewall123
Thanks,
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 |
---|---|
31 | |
17 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |
Thu 09 Oct 2025 @ 10:00 AM (CEST)
CheckMates Live BeLux: Discover How to Stop Data Leaks in GenAI Tools: Live Demo You Can’t Miss!Thu 09 Oct 2025 @ 10:00 AM (CEST)
CheckMates Live BeLux: Discover How to Stop Data Leaks in GenAI Tools: Live Demo You Can’t Miss!Wed 22 Oct 2025 @ 11:00 AM (EDT)
Firewall Uptime, Reimagined: How AIOps Simplifies Operations and Prevents OutagesAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY