Portmap: append, rather than prepend, entry rules

This means that portmapped connections can be more easily controlled /
firewalled.
This commit is contained in:
Casey Callendrello
2019-02-26 11:43:35 +01:00
committed by Dan Williams
parent afd7391938
commit 9fab520c37
5 changed files with 27 additions and 9 deletions

View File

@@ -165,6 +165,12 @@ var _ = Describe("portmap integration tests", func() {
fmt.Fprintf(GinkgoWriter, "hostIP: %s:%d, contIP: %s:%d\n",
hostIP, hostPort, contIP, containerPort)
// dump iptables-save output for debugging
cmd = exec.Command("iptables-save")
cmd.Stderr = GinkgoWriter
cmd.Stdout = GinkgoWriter
Expect(cmd.Run()).To(Succeed())
// Sanity check: verify that the container is reachable directly
contOK := testEchoServer(contIP.String(), containerPort, "")