Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Mar 21, 2017
1 parent 86512e0 commit d349a25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jobs/port_forwarding/templates/bin/forward_ports.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d349a25

Please sign in to comment.