Docker Community Forums

Share and learn in the Docker community.

Is it possible to disable nat in docker-compose?

security
build
docker

(Bdbear) #1

How can I implement

enable_ip_masquerade=false

Into

networks:
   front:
     driver: bridge
     ipam:
       driver: default
       config:
       -
         subnet: 172.25.0.0/24

(Joffrey F) #2

This should work:

networks:
   front:
     driver: bridge
     driver_opts:
       com.docker.network.bridge.enable_ip_masquerade: 'false'
     ipam:
       driver: default
       config:
       -
         subnet: 172.25.0.0/24

(Bdbear) #3

I tested that last night. But forgot to update the post. It does not disable automatization of ip tables on the subnet. So I think i have to do something like they describe in this post