A Declarative Cloud Firewall Reverse Proxy Solution with Companion Mobile App

Overview

nirikshan Banner

release GitHub License PRs Welcome

Nirikshan

A declarative Cloud firewall reverse proxy solution with inbuilt DDoS protection and alerting mechanism to protect your servers and keeping an eye on those malicious requests

🤔 What is Nirikshan?

Nirikshan is an cloud firewall reverse proxy with an inbuilt ddos prevention and alerting solution. Does that sound complex? Let's break it down.

  • Cloud: A system/server that is sitting on the cloud
  • Firewall: A system that denies/allows a packet based on some instruction and conditional logic
  • Reverse Proxy: A system that sits in-front of your actual server and forward the request to your actual server safely
  • DDoS Protection: A system that detects DDoS and contains the attack
  • Alerting: A system that someone notifies you when it has detected that something has gone wrong

Nirikshan is a combination of all these! Yes, you read that right.

Imagine you wanted to block people using iPhone to access your server, or people using Chrome or accessing from IPs of specific location. You can do that all with Nirikshan!

To top it off, there is an inbuilt ddos and rate-limiting mechanism, so if anything suspcious occurs, the Nirikshan Telegram bot will immedietly alert you with all the details after which you can use the companion Nirikshan Rekon App to monitor and take action.

What are the major advantages of using Nirikshan?

  • Declarative security policies using YAML
  • Has an companion App that you can use to monitor the requests
  • Has an Telegram Bot that will immedieatly alert you if something goes wrong

What are some upcoming features?

  • Promethues and Grafana support for better analysis
  • Packet analysis to ensure no secrets are being leaked
  • Slack and Discord support

💻 Usage

Nirikshan Architecture

Why is Nirikshan required?

With Nirikshan you can do the following:

  • Block any OS(s)from accessing your server
  • Block any specific browsers from accessing your server
  • Block any device type from accessing your server
  • Block all requests for specific time in a day (eg: 11PM-12PM)
  • Blacklist IP addresses from accesing your server
  • Block specific routes dynamically to contain violations
  • Rate limit and ddos protect your server
  • Monitor all the requests to your server
  • Analyse and dynamically apply security policies on the fly
  • Get notified for any sort of policy violation events

With this level of granularity you have full access to the networking from outside world to your server which are sending requests.

Installation

  • Go to Telegram and interact with the Nirikshan Bot here
  • Send the command /getid to get your chat ID
  • Now clone the repository using the following command
git clone https://github.com/Shastram/nirikshan

Writting Security Policies

  • Open the file config.yaml and write the security policies you wish to write, to add multiple site, just copy the siteData node and populate it with your own values
nirikshanVersion: 1.0.0
siteConfigs:
  - siteData:
      siteName: "google" # The name of the route
      forwardingUrl: "https://google.com" # Where the request should be forward
      blockedOs:
        - "iOS" # Add multiple operating systems you wish to block
      blockedBrowser:
        - "Chrome" # Add multiple browsers you wish to block
      blockedDevice:
        - "iPhone"
      blockedOSVersion:
        - "15.1" # Add multiple browsers you wish to block
      blockedLocations:
        - "/create" # You can also block specific path routes
      blockedIPs:
        - "192.168.1.2" # Blacklisted IP addresses
        - "192.168.4.1"

Setting up via Docker Compose

Nirikshan uses the following databases:

  • redis, for ddos detection mechanism
  • mongodb, for dbms purposes

You can efforlessly run Nirikshan with one command.

Simple run the following command:

docker-compose up

Ensure to replace the TELEGRAM_BOT_TOKEN and TELEGRAM_USER obtained before cloning the repository in the docker-compose.yaml file.

environment:
  - JWT_SECRET=nirikshan
  - DB_SERVER=mongodb://mongo:27017
  - DB_USER=root
  - DB_PASSWORD=toor
  - REDIS_SERVER=redis:6379
  - TELEGRAM_BOT_TOKEN=123 # add your telegram bot token here
  - TELEGRAM_USER=123 # add your telegram user id here from the bot

Setup Manually

  • Make sure you setup MongoDB and Redis and have thier URLs.
  • Populate your environment variables with the following
    JWT_SECRET=nirikshan
    DB_SERVER=mongodb://mongo:27017
    DB_USER=root
    DB_PASSWORD=toor
    REDIS_SERVER=redis:6379
    TELEGRAM_BOT_TOKEN=123 # add your telegram bot token here
    TELEGRAM_USER=123 # add your telegram user id here from the bot
  • Run the server using the following command from the root of the project
    go run api/main.go

NOTE: Make sure to use the Nirikshan Rekon App to monitor all the logs on the fly!

🛠 Architecture and Structure

Nirikshan Structure

Show your support

Give a if you liked this project!

Spread the word to your fellows to safeguard your API's!

🤝 Contributions

  • Feel Free to Open a PR/Issue for any feature or bug(s).
  • Make sure you follow the community guidelines!
  • Feel free to open an issue to ask a question/discuss anything about nirikshan.
  • Have a feature request? Open an Issue!

License

Copyright 2021 Hemanth Krishna

Licensed under MIT License : https://opensource.org/licenses/MIT

Made with and multiple cups of coffee

You might also like...
Database security suite. Database proxy with field-level encryption, search through encrypted data, SQL injections prevention, intrusion detection, honeypots. Supports client-side and proxy-side ( High-Performance Shortlink ( Short URL ) app creator in Golang. For privacy reasons, you may prefer to host your own short URL app and this is the one to use.
High-Performance Shortlink ( Short URL ) app creator in Golang. For privacy reasons, you may prefer to host your own short URL app and this is the one to use.

About The Project Shortlink App in Golang Multiple Node based Architecture to create and scale at ease Highly performant key-value storage system Cent

Gofrette is a reverse shell payload developed in Golang that bypasses Windows defender and many others anti-virus.
Gofrette is a reverse shell payload developed in Golang that bypasses Windows defender and many others anti-virus.

Gofrette Gofrette is a reverse shell payload developed in Golang that bypasses Windows defender and many others anti-virus.

An awesome reverse engine for xray poc. | 一个自动化根据 xray poc 生成对应 server 的工具
An awesome reverse engine for xray poc. | 一个自动化根据 xray poc 生成对应 server 的工具

在线体验 漏洞报告 Yarx 是什么 Yarx 来自于 x-r-a-y 的反向拼写,它能够根据 xray 的 yaml poc 规则全自动的生成一个满足规则要求的 Server,使用 xray 扫描该 Server 将会扫描出对应的漏洞。它的核心工作原理如下: 它的主要特性有: 支持 status、

HTTP/HTTPS MITM proxy and recorder.
HTTP/HTTPS MITM proxy and recorder.

Hyperfox Hyperfox is a security auditing tool that proxies and records HTTP and HTTPS traffic between two points. Installation You can install the lat

A GREAT GUI Offline Tool for manipulating/seeking resolver list of repique and dnscrypt proxy.
A GREAT GUI Offline Tool for manipulating/seeking resolver list of repique and dnscrypt proxy.

Intro A GUI Offline Tool for decrypting and manipulating *.md files used by repique and dnscrypt proxy It's targeted for creating your own DoT, DoH an

PHP functions implementation to Golang. This package is for the Go beginners who have developed PHP code before. You can use PHP like functions in your app, module etc. when you add this module to your project.

PHP Functions for Golang - phpfuncs PHP functions implementation to Golang. This package is for the Go beginners who have developed PHP code before. Y

This is a simple version of user profile using Echo app.
This is a simple version of user profile using Echo app.

Overview It's an API of simple profile to CRUD profile user based on Echo framework. How to run it Run the application using the command in the termin

Releases(v1.0.0)
  • v1.0.0(Nov 19, 2021)

    Nirikshan v1.0.0 Public Release

    • v1.0.0 release at https://github.com/Shastram/nirikshan/commit/ed4fe58c1ddc4617a0a9156e5565fbca86505b29 by @DarthBenro008

    Security Policy Configuration

    nirikshanVersion: 1.0.0
    siteConfigs:
      - siteData:
          siteName: "google"
          forwardingUrl: "https://google.com"
          blockedOs:
            - "iPhone"
          blockedBrowser:
            - "Chrome"
          blockedDevice:
            - "iPhone"
          blockedOSVersion:
            - "15.1"
          blockedLocations:
            - ""
          blockedIPs:
            - "0.0.0.0"
            - "8.8.8.8"
    

    Features

    • Block any OS(s)from accessing your server
    • Block any specific browsers from accessing your server
    • Block any device type from accessing your server
    • Block all requests for specific time in a day (eg: 11PM-12PM)
    • Blacklist IP addresses from accessing your server
    • Block specific routes dynamically to contain violations
    • Rate limit and ddos protect your server
    • Monitor all the requests to your server
    • Analyse and dynamically apply security policies on the fly
    • Get notified for any sort of policy violation events

    Higher level overview

    arch Source code(tar.gz)
    Source code(zip)
Owner
null
zero-trust remote firewall instrumentation

ShieldWall embraces the zero-trust principle and instruments your server firewall to block inbound connections from every IP on any port, by default.

Simone Margaritelli 186 Jan 1, 2023
Open Source Web Application Firewall

DEPRECATED This repository started as a good idea but I didn't have enough time or desire to work on it. So, it's left here for historical / education

Ahmet Salih 187 Nov 24, 2022
Package for controlling the Windows firewall (aka Windows Filtering Platform, WFP)

wf What This is a package for controlling the Windows Filtering Platform (WFP), also known as the Windows firewall. See its docs: https://godoc.org/in

inet.af 48 Dec 6, 2022
A web-based testing platform for WAF (Web Application Firewall)'s correctness

WAFLab ?? WAFLab is a web-based platform for testing WAFs. Live Demo https://waflab.org/ Architecture WAFLab contains 2 parts: Name Description Langua

Microsoft 25 Oct 25, 2022
crowdsec 5.9k Jan 5, 2023
Coraza WAF is a golang modsecurity compatible web application firewall library

Coraza Web Application Firewall, this project is a Golang port of ModSecurity with the goal to become the first enterprise-grade Open Source Web Application Firewall, flexible and powerful enough to serve as the baseline for many projects.

Juan Pablo Tosso 849 Jan 9, 2023
Declarative penetration testing orchestration framework

Decker - Penetration Testing Orchestration Framework Purpose Decker is a penetration testing orchestration framework. It leverages HashiCorp Configura

Steven Aldinger 274 Nov 10, 2022
A collection of cool tools used by Mobile hackers. Happy hacking , Happy bug-hunting

A collection of cool tools used by Mobile hackers. Happy hacking , Happy bug-hunting Family project Table of Contents Weapons Contribute Thanks to con

HAHWUL 445 Jan 3, 2023
A mobile security hash generator using golang

Mobile Security Hash Generator Project scope This little script is my first experiment using Go. I wrote it for my friend @marcotrumpet because he nee

null 0 Oct 10, 2022