Docker and network

Started by Mobius, January 04, 2023, 08:07:56 PM

Previous topic - Next topic

Mobius

I've installed docker, successfuly built image and started container.
But a can't get access to the port wich was mapped.

When I turn off the firewall everything is OK, but with firewall I receive such message:
"Connection closed by foreign host."

When I restart firewall I must restart docker daemon, because get:
" Error
failed to create network xxxxxxxxxxxxxx: Error response from daemon: Failed to Setup IP tables: Unable to enable SKIP DNAT rule:  (iptables failed: iptables --wait -t nat -I DOCKER -i br-85dc68dc8d80 -j RETURN: iptables: No chain/target/match by that name."

I understand that I need to configure firewall, but can't understand what exactly.
I have standart firewall settings for CWP.

overseer

Edit:
/etc/csf/csfpost.sh
Restart CSF to apply your custom rule (at the end of the chain):
csf -r
https://tecadmin.net/add-custom-iptables-rules-with-csf/