Skip to content

Commit 6cd54e0

Browse files
authored
Merge pull request #1 from Atomicorp/aum-update
Update with aum packaging
2 parents 30138bd + 77553aa commit 6cd54e0

File tree

3 files changed

+58
-3
lines changed

3 files changed

+58
-3
lines changed

Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ RUN yum -y install wget && yum clean all
66

77
RUN cd /root; NON_INT=1 wget -q -O - https://updates.atomicorp.com/installers/atomic |sh
88

9+
COPY config/tortix-common.repo /etc/yum.repos.d/tortix-common.repo
910

10-
RUN yum -y install nginx nginx-module-modsecurity http-tools
11+
RUN yum -y install nginx nginx-module-modsecurity http-tools roadsend-php-libs aum
12+
13+
# Special condition for aum
14+
RUN ln -sf /var/asl/bin/aum.dynamic /var/asl/bin/aum
1115

1216
# Configure Nginx and apply fix for very long server names
1317
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
@@ -21,6 +25,7 @@ COPY config/00_mod_security.conf /etc/nginx/conf.d/
2125
COPY config/modsecurity.d /etc/httpd/modsecurity.d
2226

2327

28+
2429
# Install Forego
2530
ADD https://github.com/jwilder/forego/releases/download/v0.16.1/forego /usr/local/bin/forego
2631
RUN chmod u+x /usr/local/bin/forego

README.md

+44-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
1-
This container implements the Free Atomicorp NGINX Web Application Firewall (ModSecurity v3) ruleset. The full commercial ruleset can be added from:
1+
About
22

3-
https://www.atomicorp.com
3+
This container implements the Atomicorp NGINX Web Application Firewall (ModSecurity v3). It is designed to act as a reverse proxy, and supports automatic container detection and configuration. Rule policies are shared with the container over a volume
4+
5+
6+
Installation
7+
8+
1) Register for WAF rule updates at https://atomicorp.com/pricing/
9+
10+
11+
2) Create volume directories for /etc/nginx/conf.d and /etc/httpd/modsecurity.d
12+
13+
mkdir -p ~/waf/conf.d
14+
mkdir -p ~/waf/modsecurity.d
15+
16+
3) Download nginx ruleset at: https://updates.atomicorp.com/channels/rules/nginx-latest/, and extract the archive:
17+
18+
tar xvf nginx-waf-201802271105.tar.gz
19+
20+
4) Copy the master nginx config:
21+
22+
cp rules/conf/00_mod_security.conf ~/waf/conf.d
23+
cp rules/conf/tortix_waf.conf ~/waf/modsecurity.d/
24+
cp rules/* ~/waf/modsecurity.d/
25+
26+
27+
28+
Usage
29+
30+
Basic
31+
32+
DEFAULT_HOST declares the nginx default host
33+
34+
docker run -d -p 80:80 -e DEFAULT_HOST=www.example.com -v /var/run/docker.sock:/tmp/docker.sock:ro -v ~/waf/conf.d:/etc/nginx/conf.d -v ~/waf/modsecurity.d:/etc/httpd/modsecurity.d atomicorp/nginx-waf-docker
35+
36+
With SSL certificates
37+
38+
docker run -d -p 80:80 -p 443:443 -v /path/to/certs:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro -v ~/waf/conf.d:/etc/nginx/conf.d -v ~/waf/modsecurity.d:/etc/httpd/modsecurity.d atomicorp/nginx-waf-proxy
39+
40+
41+
Name-Based virtual host support
42+
43+
available with the environmental variable -e VIRTUAL_HOST=www.example.com. Note that name based virtual host certificates (if used)use naming convention <VIRTUAL_HOST>.key and <VIRTUAL_HOST>.crt Example: www.example.com.key and www.example.com.crt
44+
45+
docker run -e VIRTUAL_HOST=www.example.com -d -p 80:80 -p 443:443 -v /path/to/certs:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro -v ~/waf/conf.d:/etc/nginx/conf.d -v ~/waf/modsecurity.d:/etc/httpd/modsecurity.d atomicorp/nginx-waf-proxy
446

547

648
Thanks:

config/tortix-common.repo

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[tortix-common]
2+
name=Atomicorp - Centos 7 - Atomic Secured Linux
3+
mirrorlist=http://updates.atomicorp.com/channels/mirrorlist/tortix-common/centos-$releasever-$basearch
4+
priority=1
5+
enabled=1
6+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt
7+
gpgcheck=1
8+

0 commit comments

Comments
 (0)