Latest Posts

Installation Steps for Free WAF Firewall - Shadow Daemon


There are no much different to install Shadow Daemon (ShadowD) on either Ubuntu18.04 or CentOS7.

Install Docker and Docker-Compose

Please refer my post: Simplest Steps to Install Docker and Docker Compose into Ubuntu (16.04,18.04) and CentOS 7

Ubuntu just need to issue three commands:
apt-get update
apt-get install docker
apt-get install docker-compose

For CentOS, there is one commands more:
yum install docker
curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

After that, you can start and enable docker service, also verify docker and docker-compose version:

systemctl enable docker
systemctl start docker
docker --version
docker-compose --verison




Install Git

For Ubuntu, git has been installed by default.

For CentOS just one command:
yum install git


[[email protected] ~]# yum install git
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.8.3.1-21.el7_7 will be installed
--> Processing Dependency: perl-Git = 1.8.3.1-21.el7_7 for package: git-1.8.3.1-21.el7_7.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-21.el7_7.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.3.1-21.el7_7.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.3.1-21.el7_7.x86_64
--> Running transaction check
---> Package perl-Error.noarch 1:0.17020-2.el7 will be installed
---> Package perl-Git.noarch 0:1.8.3.1-21.el7_7 will be installed
---> Package perl-TermReadKey.x86_64 0:2.30-20.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================================================
 Package                                                               Arch                                                        Version                                                                 Repository                                                    Size
==============================================================================================================================================================================================================================================================================
Installing:
 git                                                                   x86_64                                                      1.8.3.1-21.el7_7                                                        updates                                                      4.4 M
Installing for dependencies:
 perl-Error                                                            noarch                                                      1:0.17020-2.el7                                                         base                                                          32 k
 perl-Git                                                              noarch                                                      1.8.3.1-21.el7_7                                                        updates                                                       55 k
 perl-TermReadKey                                                      x86_64                                                      2.30-20.el7                                                             base                                                          31 k

Transaction Summary
==============================================================================================================================================================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 4.5 M
Installed size: 22 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): perl-TermReadKey-2.30-20.el7.x86_64.rpm                                                                                                                                                                                                         |  31 kB  00:00:00     
(2/4): perl-Error-0.17020-2.el7.noarch.rpm                                                                                                                                                                                                             |  32 kB  00:00:00     
(3/4): perl-Git-1.8.3.1-21.el7_7.noarch.rpm                                                                                                                                                                                                            |  55 kB  00:00:00     
(4/4): git-1.8.3.1-21.el7_7.x86_64.rpm                                                                                                                                                                                                                 | 4.4 MB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                         9.5 MB/s | 4.5 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:perl-Error-0.17020-2.el7.noarch                                                                                                                                                                                                                          1/4 
  Installing : perl-TermReadKey-2.30-20.el7.x86_64                                                                                                                                                                                                                        2/4 
  Installing : perl-Git-1.8.3.1-21.el7_7.noarch                                                                                                                                                                                                                           3/4 
  Installing : git-1.8.3.1-21.el7_7.x86_64                                                                                                                                                                                                                                4/4 
  Verifying  : git-1.8.3.1-21.el7_7.x86_64                                                                                                                                                                                                                                1/4 
  Verifying  : 1:perl-Error-0.17020-2.el7.noarch                                                                                                                                                                                                                          2/4 
  Verifying  : perl-Git-1.8.3.1-21.el7_7.noarch                                                                                                                                                                                                                           3/4 
  Verifying  : perl-TermReadKey-2.30-20.el7.x86_64                                                                                                                                                                                                                        4/4 

Installed:
  git.x86_64 0:1.8.3.1-21.el7_7                                                                                                                                                                                                                                               

Dependency Installed:
  perl-Error.noarch 1:0.17020-2.el7                                                       perl-Git.noarch 0:1.8.3.1-21.el7_7                                                       perl-TermReadKey.x86_64 0:2.30-20.el7                                                      

Complete!

Install Shadow Daemon


Three commands to install and start Shadow Daemon
git clone https://github.com/zecure/packaging
cd packaging/docker/compose
sudo ./shadowdctl up -d




sudo ./shadowdctl exec web ./app/console swd:register --admin --name=netsec





[[email protected] ~]# ls
anaconda-ks.cfg  original-ks.cfg  packaging
[[email protected] ~]# cd packaging/
[[email protected] packaging]# ls
centos  debian  docker  gentoo  ubuntu
[[email protected] packaging]# cd docker/
[[email protected] docker]# ls
compose  shadowd  shadowd_database  shadowd_ui
[[email protected] docker]# cd compose
[[email protected] compose]# cat docker-compose.yml 
version: '3.1'
services:
  db:
    image: zecure/shadowd_database
    restart: always
    volumes:
      - "${SHADOWD_DB_LOCATION}:/var/lib/postgresql/data"
    env_file:
      - "${SHADOWD_ENV_DB_LOCATION}"

  web:
    image: zecure/shadowd_ui
    restart: always
    ports:
      - 8080:80
    links:
      - db
    depends_on:
      - db
    environment:
      - "SHADOWD_DB_HOST=db"
    env_file:
      - "${SHADOWD_ENV_DB_LOCATION}"

  shadowd:
    image: zecure/shadowd
    restart: always
    ports:
      - 9115:9115
    links:
      - db
    depends_on:
      - db
    environment:
      - "SHADOWD_DB_HOST=db"
    env_file:
      - "${SHADOWD_ENV_DB_LOCATION}"

[[email protected] compose]# 
















No comments