You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,40 @@ Now you are ready to go with a little CI/CD Environment:
35
35
```
36
36
#### Security
37
37
... not really, its all http .. don't worry about it! It's only local communication
38
+
<spanstyle="color:red">WARNING</span>
39
+
All the Services are reachable because docker creates and deletes dynamically FORWARD Rules with ACCEPT on startup / shutdown containers with exported ports.
40
+
To deny acccess froum outer world the DOCKER-USER Chain (since docker 17.06) ist the medium of choice.
41
+
A little Script to deny all access from outer world to your local build environment could be
42
+
```
43
+
#!/bin/bash
44
+
if [ $# -lt 1 ] ; then
45
+
echo "Need your external interface as one parameter"
46
+
echo "Common names are eth0, enp...,"
47
+
echo "List of your names"
48
+
ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d'
49
+
exit
50
+
fi
51
+
52
+
PORTS_TO_BLOCK="80,5555,2222"
53
+
EXTERNAL_INTERFACE=$1
54
+
55
+
iptables -F DOCKER-USER
56
+
iptables -F EXTERNAL-ACCESS-DENY
57
+
iptables -X EXTERNAL-ACCESS-DENY
58
+
59
+
iptables -N EXTERNAL-ACCESS-DENY
60
+
iptables -A EXTERNAL-ACCESS-DENY -j LOG --log-prefix "DCKR-EXT-ACCESS-DENY:" --log-level 6
0 commit comments