Home / Security / Forcepoint / Introduction to Forcepoint API & SMC-Python

Introduction to Forcepoint API & SMC-Python

A quick introduction to Forcepoint API, with the SMC-Python which is a Python based library to provide the ability to interact with the Forcepoint NGFW Management Center API. Provides automation capabilities for any environment that interact with the SMC remotely.

1 / Prerequisites

Install the python package after having installed Python3, & pip

Then, Activate the API feature on the SMC :

  • Go to Configuration, Network Elements, Server, Click on your SMC, Properties
  • in SMC API, click “Enable” :
  • then, jump in Administration, Access Right, API Clients
  • Right click on the page, en click on “New API Client”

Now, to can create your first python script, you’ve reach the SMC with your SMC url + configured port & the api_key

2 / Some scripts examples

Then, I created 2 scripts to automatize some creations tasks. The first script is to imports Hosts from CSV file to the SMC.

Create the csv file network.csv, and add the following data :

Then, create the script below & execute it.

Loading...

An other example, a script to import from a CSV to the SMC, somes services.

Create the csv file services.csv, and add the following data :

Then, create the script below & execute it.

:) That’s all. You can create your own script easily by reading the official doc smc-python

I’m preparing a script to automatize the firewall creation, with the script, you’ll be able to :

  • Create a Cluster firewall
  • Declare all the interfaces & vlan
  • Set the DHCP relay
  • Set the DNS
  • Create the policy package
  • Declare the Firewall in the Policy VPN.

Should be available soon ;)

Loading...

About Alexandre Nogard

Check Also

Forcepoint : Deploy the SMC on AWS | Part I

How to deploy Forcepoint SMC (Security Management Center) on AWS ? This is a good …

Investigate if your linux server has been hacked or not

We’re a lot to face intrusion attemps in our IS. There can be many interests …

Hash Cracking with AWS EC2 P3 & Hashcat

Password cracking is a mandatory activity when you perform a pentest. Having access to a …

Leave a Reply

Your email address will not be published. Required fields are marked *