Skip to content

deivisonmarteleto/fastnetmon_sync_ranger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sync Ranger DDoS

This scrip syncs with the [PHPipam][https://phpipam.net/api/api_documentation/] app, collecting subnet information to help [Fastnetmon Community Edition][https://github.com/pavel-odintsov/fastnetmon] scirpt perform smarter operations.

What do we do?


For everything to work, PHPIpam must be structured as follows:

  1. In Administration > custom-fields, under Custom Subnets fields. You must create the fields:

    • forced_mitigation type boolean: The field provides information on whether the subnet is under forced mitigation.
    • community_ddos type integer: The field provides information about the community that the subnet should be announced to.
    • networks_whitelist type boolean: The field provides information about the subnet that should be configured in the network_whitelist file.
  2. In Administration > custom-fields, under Custom VRF fields. You must create the fields:

    • NEXT_HOP type varchar: The field provides information on which next hop the subnet announcement should be made. You can create next_hop fields to accommodate your architecture. It is mandatory to have a VRF created with an ip address in the registered next_hop. e.g.: 10.0.0.1
  3. In Administration , under API:

  • Create API: You must create and configure access to the API.
  1. In Administration > Section , under Section management:
  • Sections must be configured with the ASN (e.g. 65006)
  1. In Administration > Subnets , under Available subnets in section xxx:
  • Subnets must be entered with the mask /24 in the section created.
  1. configure src/settings.toml and src/.secrets.toml

The script is designed for a transit operator or ISP. It does not sync private blocks (10.0.0.0/8) or CGNAT blocks (100.64.0.0/10). The sync is configured to register valid blocks and asn.


dependency:

Mongo v4.4 Redis v7.0.7 PHPIpam v1.5.1

how to install?

  • git clone project
  • cd sync_ranger
  • python3 -m venv .venv
  • pip3 install -r requirements.txt
  • python3 src.main.py

enjoy!

About

Sync with PHPIPAM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages