Giter Club home page Giter Club logo

go-packet-blocker's Introduction

Gopher-PacketWarrior

This Go program allows blocking incoming packets on a router by adding iptables rules. It can be useful in situations where backend traffic is too high and needs to be limited at the network level.

The program connects to the router, logs in using username and password provided by the user, and adds iptables rules to drop packets for specified ports like 80 and 443. This will prevent the router from accepting any new incoming HTTP/HTTPS requests.

The rules are saved permanently and the program logs out after configuring the firewall.

Some use cases where this program would be helpful:

  • When a backend system is overloaded due to high traffic and on the verge of crashing. Blocking incoming requests at the router layer can provide relief to the backend.

  • When you need to temporarily put a system in maintenance mode but want to avoid downtime. The firewall rules can block new requests so that existing requests can complete without interruption.

  • For trial systems that need to be limited to a certain QPS level. The firewall limits can throttle traffic to prevent overload.

So in summary, this Go program allows you to dynamically block incoming packets when you need to control traffic to downstream systems. By adding iptables rules from Go code, the router can be restricted programmatically.

Let me know if you would like me to explain or expand on any part of this description.

Description

We are not supposed to answer all http requests all the time Sometimes we need to block the input of our request from the router for a while This project will help you

Logo

Run Project

Tip : This source can only be run on Windows, it does not run on Linux kernels

You need golang version above 1.8 to run

 go run app.go

go-packet-blocker's People

Contributors

mohammadhasanii 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.