Author Topic: Docker and network  (Read 1523 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
Docker and network
« 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.

Offline
*****
Re: Docker and network
« Reply #1 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/