Code Monkey home page Code Monkey logo

linux-netfilter_program's Introduction

Linux Netfilter Program (7-17-2015)

A Simple program use netfilter hook to filter designated incoming/outgoing packets.

Installation

First, you should compile the kernel module separately in {Program Path}/src/KernelModule, execute "make" in shell.

Then, you can test it by executing "insmod myhook.ko" in shell to load this kernel module and executing "rmmod myhook" to unload it.

You can see the kernel module running infomation in /var/log/message.

The program will auto load and unload this kernel module.

Second, you should install 3 dependent packages in {Program Path}/dependents.

You may need add "#include <stdint.h>" to libnetfilter_queue/libnetfilter_queue.h and add "#include <netinet/in.h>" to netfilter.h.

Then, you should change kernel module path in your system in src/Application/main.c line 303, or you can comment line 302,303,304,378,379 and load the kernel module yourself.

Now, you can run this program by executing**./Linux_Netfilter_Program**, and you can use -i to add ip address and use -h to add hostname(it will be resolved to ip address).

All the filtering rule will be saved in ./filterlist file, you can change it by modifying this file.

You can see the program running infomation in ./log file.

If you have any question, you can contact me by email.

My email

[1][email protected]

[2][email protected]

linux-netfilter_program's People

Contributors

xiyan19 avatar

Stargazers

Du<k Du<k G0053 avatar ZeD avatar  avatar Rob Patershuk avatar  avatar  avatar aboutboy avatar Rabia Liu 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.