Coder Social home page Coder Social logo

dunneja / py-fw-log Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 523 KB

Python IPTables/Firewalld Log Viewer

Home Page: https://github.com/dunneja/py-fw-log

License: MIT License

Python 100.00%
iptables linux logs logviewer python ubuntu fedora firewalld logs-analysis

py-fw-log's Introduction

Py Firewall Log Viewer

  • Python IPTables/Firewalld Console Log Viewer

Tables of Conents

General Information

  • A Python program to parse iptables or firewalld log files and present the information in a console table.
  • The Program provides a summary of IP address total hits.
  • The Program provides a summary of Ports total hits.
  • The Program provides DNS resolution of IP Addresses (Optional).

Usage

python3 py-fw-log.py -l <LogFile> -s <LinesToShow> -p <ignore_dpt> -d [DNS Lookup]

or

  • Follow the Linux command Alias setup documented in the setup section to use the following command.
pyfwlog -l <LogFile> -s <LinesToShow> -p <ignore_dpt> -d [DNS Lookup]

Screenshots

Example screenshot

Setup

  • Setup the project from source files;

    • Download and install Python >=3.10.5 from https://www.python.org/downloads/

    • Ensure Python is added to environment SYS Path.

    • Clone this repo to local file system. (i.e home directory)

      git clone https://github.com/dunneja/py-fw-log
      
    • Install deps from the provided requirements.txt file as per below;

      pip3 install -r requirements.txt
      
    • Linux Command Alias

      • Add the following to ~/.bashrc
      if [ -f ~/.bash_aliases ]; then
          . ~/.bash_aliases
      fi
      
      • Add the following to ~/.bash_aliases
      alias pyfwlog='python3 /home/username/py-fw-log/py_fw_log.py'
      
      • run source update
      source ~/.bashrc'
      
      • run pyfwlog -h for usage / options.

Notes

  • Supports IPV4/IPV6 IPTables or Firewalld log files.
  • Tested on ubuntu + iptables.
  • Tested on fedora + firewalld.

py-fw-log's People

Contributors

dunneja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.