Skip to content

GauravASY/IPSec_Tunnel_Agent_v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPsec Tunnel AI Agent POC

This project is a proof-of-concept for an AI-powered agent that analyzes the health of IPsec tunnels from a FortiGate firewall. It provides a user-friendly web interface built with Gradio to display the analysis, summarize the tunnel status, and suggest actions.

Features

  • Tunnel Health Analysis: Fetches IPsec tunnel data from a FortiGate firewall.
  • AI-Powered Summary: Uses a large language model to generate a human-readable summary of the tunnel status.
  • Action Proposals: Suggests actions to be taken based on the analysis.
  • Web-Based UI: Provides a simple and interactive web interface for analysis and actions.

Setup and Usage

  1. Prerequisites:

    • Python 3.x
    • Access to a FortiGate firewall with the REST API enabled.
    • Access to a Large Language Model (LLM) with an API endpoint.
  2. Installation:

    • Clone the repository:

      git clone https://github.com/GauravASY/IPSec_Tunnel_Agent_v2.git
      cd IPSec_Tunnel_Agent_v2
    • Create a virtual environment:

      python -m venv .venv
    • Activate the virtual environment:

      • On Windows:
      .venv\Scripts\activate
      • On macOS and Linux:
      source .venv/bin/activate
    • Install the required Python packages:

      pip install -r requirements.txt
  3. Environment Variables:

    • Create a .env file in the root of the project and add the following environment variables:
      FW_HOST=<your-firewall-host>
      FW_TOKEN=<your-firewall-api-token>
      LMAAS_URL=<your-llm-api-url>
      LMAAS_KEY=<your-llm-api-key>
      MODEL=<your-llm-model-name>
      
  4. Running the Application:

    • Execute the main.py script:
      python main.py
    • Open your web browser and navigate to the URL provided by Gradio (usually http://127.0.0.1:7860).

How It Works

  1. The application fetches IPsec tunnel data from the FortiGate firewall's API.
  2. The data is then sent to a large language model to generate a summary of the tunnel health.
  3. The application also uses the LLM to propose actions based on the status of the tunnels.
  4. The summary and proposed actions are displayed in a Gradio web interface.
  5. The user can approve or deny the proposed actions from the UI.

About

An AI-powered agent POC that analyzes FortiGate IPsec tunnel health, generates human-readable summaries, and proposes remediation actions via an interactive Gradio interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages