GithubHelp home page GithubHelp logo

kuresaru / auto-router2 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18 KB

Find out non-ACKed TCP syn request packet in realtime network traffic and add the destination IP address into a ipset.

License: GNU General Public License v3.0

Makefile 3.80% C 96.20%

auto-router2's Introduction

AutoRouter2

Find out non-ACKed TCP syn request packet in realtime network traffic and add the destination IP address into a ipset.

principle

If TCP SYN sent to an ip, but TCP ACK not received in syn_expire seconds, the ip will add to ipset_name ipset.

Added ip will remove after ack_expire seconds.

build and install

apt-get install libipset-dev libhiredis-dev libpcap-dev -y    # install libs
make    # compile application
cp build/auto-router2 /root/auto-router2/    # copy executable to /root/auto-router/
cp auto-router2.service /etc/systemd/system/    # copy systemd service config file

setup redis server

Uncomment notify-keyspace-events in redis server config file and set the value to "Ex".

Replace bind 127.0.0.1 ::1 to 0.0.0.0 :: if required.

configuration

auto-router.service

Change ExecStart, WorkingDirectory, and other if need.

Program arguments:

  • -h redis_server_host
  • -p redis_server_port
  • -i sniffer_outbound_interface_name
  • -s syn_expire_seconds
  • -a ack_expire_seconds
  • -l ipset_name

reload and start service

systemctl daemon-reload
systemctl enable --now auto-router2.service
ps -ef | grep auto-router2

auto-router2's People

Contributors

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