From d349a2581c0d75ba754050bff7fd629efb454c67 Mon Sep 17 00:00:00 2001 From: Dr Nic Williams Date: Tue, 21 Mar 2017 17:59:11 +1000 Subject: [PATCH] missing -d flag from https://github.com/cloudfoundry-community/port-forwarding-boshrelease/blob/master/jobs/port_forwarding/templates/bin/forward_ports.sh.erb#L28 --- jobs/port_forwarding/templates/bin/forward_ports.sh.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/port_forwarding/templates/bin/forward_ports.sh.erb b/jobs/port_forwarding/templates/bin/forward_ports.sh.erb index dfe889c..56612d0 100644 --- a/jobs/port_forwarding/templates/bin/forward_ports.sh.erb +++ b/jobs/port_forwarding/templates/bin/forward_ports.sh.erb @@ -30,7 +30,7 @@ sysctl net.ipv4.conf.all.route_localnet=0 <% internal_ip = rule['internal_ip'] || "127.0.0.1" %> <% internal_port = rule['internal_port'] || raise("Expected non-empty 'internal_port' on '#{rule.inspect}' rule") %> - sudo iptables -t nat -A portforwarding-release -p tcp --dport <%= external_port %> -j DNAT --to <%= internal_ip %>:<%= internal_port %> + sudo iptables -t nat -A portforwarding-release -p tcp -d <%= spec.networks.send(spec.networks.methods(false).first).ip %> --dport <%= external_port %> -j DNAT --to <%= internal_ip %>:<%= internal_port %> <% if internal_ip == "127.0.0.1" %> sysctl net.ipv4.conf.all.route_localnet=1