/ProxyDetector-Firewall

Enter an IP list and generate an output of the proxies detected with the rules for different firewalls to be applied directly.

Primary LanguagePythonMIT LicenseMIT

ProxyDetector Firewall logo

ProxyDetector Firewall

Protect your infrastructure from incoming or outgoing Proxy connections. An extra layer of security to your network..
Explore docs »

Report bug · Request feature


Actions Status Python 3 GitHub license

Table of contents

Description

ProxyDetector-Firewall is a script written in Python, enter an IP list and generate an output of the proxy detected with the rules for different firewalls to be applied directly.

Useful when it blocks the connection to improper sites and users bypass these rules using proxy.

The database used to recognize proxy can be obtained from :

Output formats supported:
  • Mikrotik
  • Cisco ACL
  • Cisco bit bucket
  • Linux iptables
  • Juniper Junos
  • CIDR

Soon more will be added

Prerequisites

  • Python3 and up
  • pip3
  • IP2Proxy - Proxy Detection Database

Installation

Clone the repository and enter its respective folder

pip3 install -r requirements.txt

Move your database IP2PROXY-P[xxxx].BIN to foder /data/ as IP2PROXY.BIN

├── proxydetectorfirewall
│   ├── data
│   │   └── IP2PROXY.BIN

Usage

usage: cli.py [-h] -i INPUT -f
              {iptables,mikrotik,cisco-acl,cidr,cisco-bitbucket,juniper-junos}
              [-o OUTPUT]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        File containing an ip list (default: None)
  -f {iptables,mikrotik,cisco-acl,cidr,cisco-bitbucket,juniper-junos}, --firewall {iptables,mikrotik,cisco-acl,cidr,cisco-bitbucket,juniper-junos}
                        Firewall, output format for the rules. (default: None)
  -o OUTPUT, --output OUTPUT
                        Output file with the rules to block the ip detected
                        as a proxy. (default: Output.txt)
python3 cli.py -i ExampleProxyList.txt -f cisco-acl -o output.txt
python3 cli.py -i ExampleProxyList.txt -f mikrotik -o mikrotik.txt
Check out a demo

Run tests

Tests on Github Action

The pytest module is necessary

pip -q install pytest

pytest
pytest tests/output_files_test.py

Build with

  • IP2Proxy - IP2Proxy Python Library
  • Python3 - Python is an interpreted, high-level, general-purpose programming language.

Wiki

More information on how to use this project on the Wiki

License

This project is licensed under the MIT License - see the LICENSE file for details.