開源 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_64PostgreSQL 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/


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章