Control Web Panel

WebPanel => How to => Topic started by: Mobius on January 04, 2023, 08:07:56 PM

Title: Docker and network
Post by: Mobius on January 04, 2023, 08:07:56 PM
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.
Title: Re: Docker and network
Post by: overseer on February 05, 2023, 04:33:56 PM
Edit:
Code: [Select]
/etc/csf/csfpost.shRestart CSF to apply your custom rule (at the end of the chain):
Code: [Select]
csf -rhttps://tecadmin.net/add-custom-iptables-rules-with-csf/ (https://tecadmin.net/add-custom-iptables-rules-with-csf/)