通信学报

• • 上一篇    下一篇

利用netfilter NFQUEUE实现网关认证的HTTP重定向

张焕杰,夏玉良   

  1. 中国科学技术大学 网络信息中心,安徽 合肥 230026
  • 出版日期:2014-10-25 发布日期:2014-12-16

Portal authentication HTTP redirection using netfilter NFQUEUE

  • Online:2014-10-25 Published:2014-12-16

摘要: 利用netfilter的NFQUEUE机制,将未认证用户的TCP 80端口流量发送至用户态进程redir_http,redir_http使用原始套接字发送应答数据分组,在用户态实现HTTP重定向功能。这种实现方法既保证了重定向的高性能,又能避免Linux内核中的繁琐程序开发,降低程序开发复杂度,提高系统运行的稳定性。

Abstract: When using portal for user authentication, unauthorized user's HTTP access should be redirected to portal login page to help user do authentication.Using netfilter NFQUEUE target send unauthorized user TCP port 80 packets to user-space program redir_http. Redir_http will send IP reply packets to user do HTTP redirection with the help of raw socket. Using NFQUEUE can ensures high performance redirection, avoid troublesome development in the Linux kernel,simplify application development and improve system stability.

No Suggested Reading articles found!