- Products
- Learn
- Local User Groups
- Partners
- More
What's New in R82.10?
Watch HereWhen the Agents Attack
A Live Look at Agentic Exposure Validation
AI Security Masters E8:
Claude Mythos: New Era in Cyber Security
CheckMates Go:
CheckMates Fest
Hi, API experts!
I'm trying to automatize adding simple GWs to my MGMT using API.
With mgmt cli it works perfectly:
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"
But mgmt cli is not the thing I need, so Im trying to use Python script with Web Services API:
>>> add_gw_data = {
... "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"
... }
>>> add_gw = api_call(mgmt_ip_addr, "add-simple-gateway", add_gw_data, sid)
>>> print(json.dumps(add_gw))
{"message": "Unrecognized parameter [interfaces.2.name]", "code": "generic_err_invalid_parameter_name"}
How can I properly define all network interfaces?
Interfaces is List parameter, what is the proper syntax to define all the interfaces in this structure?
Thanks.
Added a simple Python script, that
- creates internal network,
- creates single GW object with sic,
- adds MGMT rule to default Access policy,
- publish and install Access policy to GW.
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.
I will upgrade script someday.
Cheers,
The answer is:
"interfaces": [{
"name": "eth0",
"ipv4-address": "192.168.48.199",
"ipv4-network-mask": "255.255.255.0",
"anti-spoofing": "true",
"topology": "external"
},
{
"name": "eth1",
"ipv4-address": "192.168.10.199",
"ipv4-network-mask": "255.255.255.0",
"anti-spoofing": "true",
"topology": "internal",
"topology-settings": {
"ip-address-behind-this-interface": "network defined by the interface ip and net mask"
}
}
]
Hi Sergey,
You should always go to the API docs and refs, you have some examples there how to do things.
There are examples for mgmt_cli tool and for web services as well, just select the required menu item on top.
For your case, go to this link and browse the second example.
Hope this helps.
Robert.
Added a simple Python script, that
- creates internal network,
- creates single GW object with sic,
- adds MGMT rule to default Access policy,
- publish and install Access policy to GW.
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.
I will upgrade script someday.
Cheers,
Good Work!
nice
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
Thu 02 Jul 2026 @ 06:00 PM (CST)
Revolucionando la Seguridad con IA Generativa: Prevención Inteligente en Tiempo RealThu 09 Jul 2026 @ 10:00 AM (CEST)
Schutz souveräner Workloads: Check Point & die AWS European Sovereign CloudThu 09 Jul 2026 @ 11:00 AM (CEST)
The Cloud Architects Series: Check Point Edge Protection SD-WAN & SASETue 14 Jul 2026 @ 10:00 AM (PDT)
AI Security Masters E11: READY OR NOT: Securing the AI Enterprise 3/5 - AI Workforce SecurityThu 30 Jul 2026 @ 10:00 AM (PDT)
AI Security Masters E12: READY OR NOT: Securing the AI Enterprise 4/5 - AI GatewayThu 20 Aug 2026 @ 10:00 AM (PDT)
AI Security Masters E13: READY OR NOT: Securing the AI Ent 5/5 - AI Research & Threat LandscapeTue 14 Jul 2026 @ 10:00 AM (PDT)
AI Security Masters E11: READY OR NOT: Securing the AI Enterprise 3/5 - AI Workforce SecurityThu 30 Jul 2026 @ 10:00 AM (PDT)
AI Security Masters E12: READY OR NOT: Securing the AI Enterprise 4/5 - AI GatewayThu 20 Aug 2026 @ 10:00 AM (PDT)
AI Security Masters E13: READY OR NOT: Securing the AI Ent 5/5 - AI Research & Threat LandscapeThu 02 Jul 2026 @ 06:00 PM (CST)
Revolucionando la Seguridad con IA Generativa: Prevención Inteligente en Tiempo RealAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY