Manage docker containers firewall with UFW!
APACHE-2.0 License
Bot releases are visible (Hide)
Published by github-actions[bot] almost 2 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
Published by github-actions[bot] almost 3 years ago
UFW_DENY_OUT=TRUE
label to deny all outbound traffic, then use UFW_ALLOW_TO
label to allow traffic to specific IP address/CIDR range + optional port and comment value. Syntax is similar to UFW_ALLOW_FROM
label.Published by shinebayar-g almost 3 years ago
sudo
. This is to be compatible with systems that root
user is not available.Published by github-actions[bot] about 3 years ago
UFW_ALLOW_FROM
labelPublished by shinebayar-g about 3 years ago
UFW_ALLOW_FROM
label support. This label takes comma separated IP addresses as a list. Example: UFW_ALLOW_FROM=192.168.0.2;192.168.1.0/24
UFW_ALLOW_TO
(comma separated IP addresses as a list, UFW_DENY_OUTGOING
(takes true/false) labels supported.Thanks to @mlollo
Published by shinebayar-g almost 4 years ago
Added support for allowing IP based firewall rules. Now you can use UFW_FROM
label. Use semicolon separated IP addresses. For example:
➜ docker run -d -p 8080:80 -l UFW_MANAGED=TRUE -l "UFW_FROM=192.168.0.2;192.168.1.0/24" nginx:alpine
13a6ef724d92f404f150f5796dabfd305f4e16a9de846a67e5e99ba53ed2e4e7
➜ sudo ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
172.17.0.2 80/tcp ALLOW FWD 192.168.0.2 <= allowing only 192.168.0.2 to access nginx server
172.17.0.2 80/tcp ALLOW FWD 192.168.1.0/24 <= allowing only 192.168.1.0/24 to access nginx server
Thanks to @mlollo