Skip to content

Commit

Permalink
add localhost uturn
Browse files Browse the repository at this point in the history
  • Loading branch information
akerl committed Dec 3, 2024
1 parent abbcf75 commit 349851a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
table => 'nat',
}

firewall { '100 handle uturn traffic for containers':
firewall { '100 handle uturn traffic for containers and localhost':
chain => 'OUTPUT',
jump => 'DOCKER_EXPOSE',
dst_type => 'LOCAL',
Expand Down Expand Up @@ -89,6 +89,10 @@
iniface => "! ${bridge_name}",
}

sysctl::setting { "net.ipv4.conf.${bridge_name}.route_localnet":
value => '1',
}

exec { 'create docker network':
command => "/usr/bin/docker network create --subnet ${bridge_subnet} -o com.docker.network.bridge.name=${bridge_name} ${bridge_name}",
unless => "/usr/bin/docker network inspect ${bridge_name}",
Expand Down

0 comments on commit 349851a

Please sign in to comment.