Giter VIP home page Giter VIP logo

django-chkp's Introduction

django-chkp

Demo web interface created to demostrate the integration for Check Point R80 API and a web interface the idea is shown to the customers how Checkpoint API Works.

This Web interface was created using Django a python framework for Web development

https://www.djangoproject.com/

And a basic Json Class to communicate between the web server and the Smart Center Server

What can I do

This Web interface can create:

1.- Layers and rules

2.- Create host objects with Nat Hide, Static Nat

3.- Create Networks objects with Nat Hide, Static Nat.

The app is divide in several files following the django development model

Vies.py - The backend and the way how the web server analyze the get and post requests, we call the Check Point API from this side.

Tasks.py - The R80 API is represented in this file.

How to Start

This app is designet to run using docker, the first step to deploy it is using Docker.

1.- Install Docker following the instructions for your Linux Distro 2.- Download this repository using GIT.

for development version git clone https://github.com/cadgo/django-chkp.git

or use the relased tested (recomended) https://github.com/cadgo/django-chkp/archive/1.zip https://github.com/cadgo/django-chkp/archive/1.tar.gz

3.- Use the Dockerfile inside the created folder

sudo docker build -t chkpdjango .

Don't forget the dot at the end of the command

This will generate a Docker image

sudo docker image ls -a

screenshot

We can run the container in this way sudo docker run -it --network=host chkpdjango /bin/bash

to Run the server we need to execute

#python3 manage.py runserver 0.0.0.0:8000

First steps using the web interface.

1.- Create an API user in our Smart Center Server 2.- Enable the API for all IPs

We need to add the smart center server inside our database using this URL http://IPADDRESS:8000/admin/

By default the dockerfile create an user admin/zubur1

1.- Create a user for our web interface

screenshot

2 .- Add a User filling the form

3.- Add a Mgmt Server

screenshot

We need to add the form

MgmtR80Name: A name for our MGMT Server in our web interface

ServerIP: IP address

Description: a brief description

MgmtR80VersionsSupported: leave as default, there are future plans

MGMTR80IsAlive: leave as default

MgmtFingerPrintAPI: leave as default

MgmtPort: Port used by the API

LastPublishSession: Leave as default this a version control for the database between the SMS and the DB

4.- Create a Mgmt server Objectss

Screenshot

Add a Mgmt Server Objects

MGMTServerObjectsID: Select the Mgmt Server added

And just save by default, this is going to create a path to save the DB in a txt files inside our docker

5 .- Create a Mgmt Server User, this is the previous user created inside the Smart Center Server

Screenshot

UsersID: Select the previous added Mgmt Server

R80User: the username for example api_user

R80password: The username password

Stop the web server inside our docker just pressing cntr+c inside here

Screeshot

And run it again!

We are ready to use our web interface, we can follow the next link http://IPADDRESS:8000/r80api/extends

The new Server appears in the extends pages if the servers redirect to the login page, just login with the user created in step number 1.

The ansible section maybe comes later

screenshot

After choose the Smart Center Server you can create a rulebase

LayerAppend: It's create a new Layer.

Rule Name: Rule Name

Dst Origin: hosts and networks inside the Console

Dst Dir: hosts and networks inside the Console

Ports: TCP and UDP Ports

Action: Accept

Log: :)

screenshot

it will create a new Layer like

screenshot

django-chkp's People

Contributors

cadgo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.