I have setup two docker containers for a Magento instance and a redis instance. For now, I only want to allow certain IP addresses to access the website, so I enabled ufw and added some entries. The problem is that the Magento instance cannot connect to the redis instance with ufw enabled. If I disable it, everything works. Here are my ufw entries:
-- ------ ----
7722/tcp ALLOW Anywhere
443/tcp ALLOW <censored>
Anywhere ALLOW 172.17.0.0/16
Anywhere ALLOW <censored>
Anywhere ALLOW 172.20.0.0/16
Anywhere ALLOW 127.0.0.1
6379 ALLOW 172.20.0.0/16
3306 ALLOW 172.20.0.0/16
6379 ALLOW 127.0.0.1
6379 ALLOW 172.17.0.0/16
6379 ALLOW <censored>
6379 ALLOW 172.20.0.5
6379 ALLOW 172.20.0.7
Anywhere ALLOW 172.20.0.5
Anywhere ALLOW 172.20.0.7
Anywhere ALLOW <censored>
Anywhere ALLOW 127.0.0.0/8
Anywhere ALLOW 172.16.0.0/16
6379/tcp ALLOW Anywhere
7722/tcp (v6) ALLOW Anywhere (v6)
6379/tcp (v6) ALLOW Anywhere (v6)
Anywhere ALLOW OUT 172.17.0.0/16 on docker0
Aug 1 20:35:52 <censored> kernel: [14792.173011] [UFW BLOCK] IN=br-d212b7b554b0 OUT=br-d212b7b554b0 PHYSIN=veth9ca196b PHYSOUT=vethbce3637 MAC=<censored>:14:00:05:08:00 SRC=172.20.0.5 DST=172.20.0.7 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=35267 DF PROTO=TCP SPT=45680 DPT=6379 WINDOW=64240 RES=0x00 SYN URGP=0
Any ideas?
