Open Sc0th opened 2 years ago
I noticed that outgoing ports were not being set correctly, seeing the error:
iptables v1.8.7 (legacy): host/network `' not found Try `iptables -h' or 'iptables --help' for more information.
After some digging it became apparent the variable docker_network_cidr is not being set correctly here (/root/iptable.sh)
docker_network_cidr
#convert netmask into cidr format docker_network_cidr=$(ipcalc "${docker_ip}" "${docker_mask}" | grep -P -o -m 1 "(?<=Network:)\s+[^\s]+")
In my config these line resolves to
ipcalc 10.244.248.207 255.255.255.255 | grep -P -o -m 1 '(?<=Network:)\s+[^\s]+'
which produces no output, I am not really clear how this is supposed to function, maybe the output of ipcalc has changed?
Adding the var in manully to iptables.sh like this:
#convert netmask into cidr format #docker_network_cidr=$(ipcalc "${docker_ip}" "${docker_mask}" | grep -P -o -m 1 "(?<=Network:)\s+[^\s]+") docker_network_cidr=10.244.0.0/16
resolves the issue
I noticed that outgoing ports were not being set correctly, seeing the error:
After some digging it became apparent the variable
docker_network_cidr
is not being set correctly here (/root/iptable.sh)In my config these line resolves to
which produces no output, I am not really clear how this is supposed to function, maybe the output of ipcalc has changed?
Adding the var in manully to iptables.sh like this:
resolves the issue