Help needed with firewall and nethserver-docker

I need some help please guys.

I installed nethserver docker and portainer which I think is great instead of having docker in standalone package. Nethserver = Management all in one roof :wink:

Problem I have I have made docker a swarm cluster by docker swarm init as I want this system as a cluster for scalability.

Problem is when I have swarm installed I receive errors in my shorewell look at the following

when I remove docker and flush the iptables the problem goes away I think I have to create the network ingress on nethserver but one im not sure if that’s the case and two I don’t know how to do that.

Can someone point me into the right direction please

This is a picture of the network swarm creates

I think the bridge network needs to be attachable too to attach the external sources to like wordpress stack to the bridge too once the stack has been created on the swarm

Ok thanks for the reply.

Im gonna dive into it this weekend and ty to discover a remedy

I don’t know how Docker swarm works; having said that, the nethserver-docker rpm is just an experiment to run some docker applications within a NethServer host. It disables the docker iptables mangling because NethServer firewall configuration is handled by Shorewall.

Maybe I’m wrong but this makes NethServer not compatible with some assumptions of docker swarm.

I have docker and portainer installed outside of nethserver on the same machine and the swarm and shorewall work no errors.

But i think that is because nethserver portainer deploys as a container.

but when in swarm you need to deploy portainer as a service which i have done.

Maybe you can make two deployment repos in you upstream one for normal deployment and one for swarm as portainer needs to be deployed differently in both scenarios

1 Like

Could you suggest some documentation about docker swarm and portainer to understand those differences?

Well i got it from portainers website

this is the normal code for portainer deployment

docker volume create portainer_data docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

And this is the code needed to deploy portainer into a docker swarm

 docker volume create portainer_data
 docker service create \
--name portainer \
--publish 9000:9000 \
--replicas=1 \
--constraint 'node.role == manager' \
--mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \
--mount type=volume,src=portainer_data,dst=/data \
portainer/portainer \
-H unix:///var/run/docker.sock

here are a few pictures of it installed a swarm

Not got my head around the network bit yet tho but from what i understand you can attached containers to the bridge not got that far yet