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
parent 9ebe139e77
commit f8fcb3525f
5 changed files with 27 additions and 9 deletions

View File

@ -163,6 +163,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, "")