开源 WAF防火墙“Janusec Application Gateway” 搭建

0x01 介绍Janusec Application Gateway

Janusec Application Gateway,一种应用程序安全解决方案,提供WAF(Web应用程序防火墙),统一Web管理门户,私钥保护,Web路由和可扩展负载平衡。使用Janusec,您可以构建安全且可伸缩的应用程序。

主要特点

  • WAF(Web应用程序防火墙),阻止SQL注入,跨站点脚本,敏感数据泄漏,CC***等。

  • 集团政策(与多个支票点合作)

  • CAPTCHA支持

  • 统一Web管理

  • HTTPS支持,无需代理。

  • 使用私钥加密存储进行证书保护

  • 可扩展的体系结构,负载平衡和多节点支持

0x02 环境介绍及安装准备

     1  系统要求:

节点 操作系统 数据库
主节点 CentOS/RHEL 7, 或 Debian 9, x86_64 PostgreSQL 9.3 / 9.4 / 9.5 / 9.6 / 10

     2、安装准备

     2.1  系统  :Centos 7 x86 最小安装;

     2.2 更新 #yum update;

     2.3 安装PostgreSQL数据库;

     2.3.1添加PostgreSQL数据库源,yum安装

     yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm

     #yum install postgresql10-server

     #/usr/pgsql-10/bin/postgresql-10-setup initdb

     #systemctl restart postgresql-10.service
     #su – postgres
     -bash-4.2$ psql    #进入控制台,创建用户、库;

     postgres=# create user janusec with password ‘[email protected]’;
     postgres=# create database janusec owner janusec;
     postgres=# grant all privileges on database janusec to janusec;
     postgres=# \q
     exit

 2.3.2 修改PostgreSQL认证方式

     #vi /var/lib/pgsql/10/data/pg_hba.conf

     修改 pg_hba.conf 中这一行:

     host all all 127.0.0.1/32 md5

     #systemctl restart postgresql-10.service     #重启 PostgreSQL 服务

     # systemctl enable postgresql-10.service     #添加启动服务

0x03 Janusec安装

     3.1 下载安装包

     # cd~
     # wget https://www.janusec.com/download/janusec-latest.tar.gz
     # tar zxf ./janusec-latest.tar.gz

     3.2 安装(注意需要ROOT权限)

     安装后的路径为:/usr/local/janusec/

     #cd janusec-0.9.3
     #./install.sh

     选择1. Master Node

     3.3 修改数据库连接配置

     #vi /usr/local/janusec/config.json

     #systemctl start janusec.service                   #启动WAF 服务

     # systemctl enable janusec.service               #添加启动服务

0x04 Janusec  测试

     打开Web浏览器,例如Chrome访问

     http:// your_master_ip_address:9080 /

使用默认用户名admin和密码登录J@nusec123

注意:测试时可以关闭Centos 防火墙

参考官方文档:https://www.janusec.com/documentation

项目github地址:https://github.com/Janusec/janusec

转贴请注明转自: https://www.security-360.cn/


猜你喜欢

转载自blog.51cto.com/188204/2314069