Skip to content

About

Simple web tool for visualizing iptables -L -n -v output.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

iptables-rule-viewer

A simple web-based viewer for visualizing iptables -L -n -v output.

Paste your iptables rules into the app, and it will display chains, rule cards, ports, jump targets, and source IPs in a more readable layout.

Features

  • Paste iptables -L -n -v output directly into the page
  • View chains such as INPUT, OUTPUT, FORWARD, and custom chains
  • Highlight destination ports such as 22, 80, 443, and 8080
  • Follow jump targets such as JUMP -> MY_CHECK
  • Display source IPs in a separate panel
  • Open rule details in a popup
  • Sort rules by packet count

Screenshot

iptables-rule-viewer screenshot

Getting Started

Requirements

  • Node.js
  • npm

Install

npm install

Run

npm start

Then open:

http://localhost:3000

Usage

  1. Run the application
  2. Paste the output of iptables -L -n -v
  3. Click Parse
  4. Review chains, rules, ports, and source IPs
  5. Click a rule card to view details
  6. Click a jump rule to move to the target chain

Example Input

Chain INPUT (policy DROP 15 packets, 900 bytes)
 pkts bytes target     prot opt in     out     source               destination
 2500  180k ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
 8500  620k ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
  450 28000 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22
  120  7200 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80
   80  4800 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:443
   55  3300 MY_CHECK   tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:8080

Chain MY_CHECK (1 references)
 pkts bytes target     prot opt in     out     source               destination
   10   600 LOG_AND_DROP  all  --  *      *       192.168.1.50         0.0.0.0/0
   45  2700 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0

Chain LOG_AND_DROP (1 references)
 pkts bytes target     prot opt in     out     source               destination
   10   600 LOG        all  --  *      *       0.0.0.0/0            0.0.0.0/0            LOG flags 0 level 4 prefix "IPTABLES DROP: "
   10   600 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0

Project Structure

iptables-rule-viewer/
├─ package.json
├─ package-lock.json
├─ server.js
└─ public/
   ├─ index.html
   ├─ style.css
   └─ app.js

Notes

  • This tool is designed for pasted text input
  • It does not modify firewall rules
  • It currently focuses on iptables -L -n -v style output
  • Parsing is intentionally simple and aimed at readability

Future Improvements

  • Support for iptables-save
  • Better rule relationship visualization
  • Filtering by target, port, or source IP
  • Summary cards for DROP / ACCEPT / LOG counts
  • Export and share parsed views

License

MIT

About

Simple web tool for visualizing iptables -L -n -v output.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages