GithubHelp home page GithubHelp logo

fifilyu / module-http-whitelist Goto Github PK

View Code? Open in Web Editor NEW
78.0 78.0 41.0 29 KB

域名白名单内核模块,基于 Linux Netfilter 过滤 HTTP 协议中的 Host 字段

License: MIT License

C 96.38% C++ 2.29% Makefile 1.33%
http linuxmodule whitelist

module-http-whitelist's Issues

如何返回html页面?

您好,您的白名单系统非常棒。
想请问一下,不在白名单的域名现在直接发reset了。
如何不reset而是显示html内容呢?
想做个提示。。。
万分感谢!

4.9内核无法make

make -C /lib/modules/4.9.0-rc8-amd64/build/ M=/root/module-http-whitelist modules
make: *** /lib/modules/4.9.0-rc8-amd64/build/: No such file or directory. Stop.
make: *** [all] Error 2

kernel: BUG: unable to handle kernel NULL pointer dereference at (null)

Archlinux 最新内核加载 http_whitelist.ko失败。

内核版本:

$ uname -a
Linux archlinux 4.3.3-2-ARCH #1 SMP PREEMPT Wed Dec 23 20:09:18 CET 2015 x86_64 GNU/Linux

journalctl 日志:

1月 04 19:08:19 archlinux kernel: BUG: unable to handle kernel NULL pointer dereference at           (null)
1月 04 19:08:19 archlinux kernel: IP: [<          (null)>]           (null)
1月 04 19:08:19 archlinux kernel: PGD 3cc54067 PUD 3cc05067 PMD 0 
1月 04 19:08:19 archlinux kernel: Oops: 0010 [#1] PREEMPT SMP 
1月 04 19:08:19 archlinux kernel: Modules linked in: http_whitelist(O+) bochs_drm ttm drm_kms_helper drm pcspkr syscopyarea sysfillrect joydev mousedev hid_generic snd_intel8x0 snd_ac97_codec ppdev ac97_bus snd_pcm snd_timer
1月 04 19:08:19 archlinux kernel: CPU: 0 PID: 2035 Comm: insmod Tainted: G           O    4.3.3-2-ARCH #1
1月 04 19:08:19 archlinux kernel: Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
1月 04 19:08:19 archlinux kernel: task: ffff88003db60000 ti: ffff88003d184000 task.ti: ffff88003d184000
1月 04 19:08:19 archlinux kernel: RIP: 0010:[<0000000000000000>]  [<          (null)>]           (null)
1月 04 19:08:19 archlinux kernel: RSP: 0018:ffff88003d187bf8  EFLAGS: 00010282
1月 04 19:08:19 archlinux kernel: RAX: ffffffffa018d340 RBX: ffff88003cfb2800 RCX: ffff88003cfb2870
1月 04 19:08:19 archlinux kernel: RDX: 000000000000001b RSI: ffff88003db48cc0 RDI: ffff88003cfb2800
1月 04 19:08:19 archlinux kernel: RBP: ffff88003d187c28 R08: ffff88003e001c00 R09: ffffffffa0322242
1月 04 19:08:19 archlinux kernel: R10: ffffea0000f69800 R11: ffff88003b2f31b8 R12: 000000000000001b
1月 04 19:08:19 archlinux kernel: R13: ffff88003d188000 R14: ffff88003db48cc0 R15: 00007ffffffff000
1月 04 19:08:19 archlinux kernel: FS:  00007facd300d700(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
1月 04 19:08:19 archlinux kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
1月 04 19:08:19 archlinux kernel: CR2: 0000000000000000 CR3: 000000003dbae000 CR4: 00000000000006f0
1月 04 19:08:19 archlinux kernel: Stack:
1月 04 19:08:19 archlinux kernel:  ffffffffa0322278 ffff88003cfb2800 ffffffffa03230b6 ffffffffa0324398
1月 04 19:08:19 archlinux kernel:  ffffffffa0324390 0000000000000001 ffff88003d187c58 ffffffffa0322698
1月 04 19:08:19 archlinux kernel:  ffffffffa0324398 ffff88003db48cc0 0000000000000000 ffffffffa03220b0
1月 04 19:08:19 archlinux kernel: Call Trace:
1月 04 19:08:19 archlinux kernel:  [<ffffffffa0322278>] ? file_read+0x68/0xa0 [http_whitelist]
1月 04 19:08:19 archlinux kernel:  [<ffffffffa0322698>] read_cfg+0x38/0x90 [http_whitelist]
1月 04 19:08:19 archlinux kernel:  [<ffffffffa03220b0>] ? nf_hook_func+0xb0/0xb0 [http_whitelist]
1月 04 19:08:19 archlinux kernel:  [<ffffffffa0322633>] init_host_str+0x23/0x50 [http_whitelist]
1月 04 19:08:19 archlinux kernel:  [<ffffffffa03220df>] init_module+0x2f/0xa0 [http_whitelist]
1月 04 19:08:19 archlinux kernel:  [<ffffffff81002123>] do_one_initcall+0xb3/0x200
1月 04 19:08:19 archlinux kernel:  [<ffffffff8119e491>] ? __vunmap+0x91/0xe0
1月 04 19:08:19 archlinux kernel:  [<ffffffff811bba97>] ? kfree+0x147/0x150
1月 04 19:08:19 archlinux kernel:  [<ffffffff8115d510>] do_init_module+0x5f/0x1ef
1月 04 19:08:19 archlinux kernel:  [<ffffffff810f9897>] load_module+0x2197/0x27e0
1月 04 19:08:19 archlinux kernel:  [<ffffffff810f66e0>] ? symbol_put_addr+0x50/0x50
1月 04 19:08:19 archlinux kernel:  [<ffffffff811df340>] ? kernel_read+0x50/0x80
1月 04 19:08:19 archlinux kernel:  [<ffffffff810fa129>] SyS_finit_module+0xb9/0xf0
1月 04 19:08:19 archlinux kernel:  [<ffffffff81583d2e>] entry_SYSCALL_64_fastpath+0x12/0x71
1月 04 19:08:19 archlinux kernel: Code:  Bad RIP value.
1月 04 19:08:19 archlinux kernel: RIP  [<          (null)>]           (null)
1月 04 19:08:19 archlinux kernel:  RSP <ffff88003d187bf8>
1月 04 19:08:19 archlinux kernel: CR2: 0000000000000000
1月 04 19:08:19 archlinux kernel: ---[ end trace e21db487535b2d87 ]---

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.