Commit a0319b5169b8d54aa23171a17a1cd3495d39888e
1 parent
37f8ac41
Exists in
master
and in
89 other branches
reverseproxy_ssh_setup: fix logic for detecting a container
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
utils/reverseproxy_ssh_setup
@@ -35,7 +35,7 @@ iptables -F -t nat | @@ -35,7 +35,7 @@ iptables -F -t nat | ||
35 | # Setup port redirect | 35 | # Setup port redirect |
36 | iptables -t nat -A PREROUTING -d $reverseproxy_ip/32 -p tcp -m tcp --dport 22 -j DNAT --to-destination $integration_ip:22 | 36 | iptables -t nat -A PREROUTING -d $reverseproxy_ip/32 -p tcp -m tcp --dport 22 -j DNAT --to-destination $integration_ip:22 |
37 | iptables -t nat -A POSTROUTING -d $integration_ip/32 -p tcp -m tcp --dport 22 -j SNAT --to-source $reverseproxy_ip | 37 | iptables -t nat -A POSTROUTING -d $integration_ip/32 -p tcp -m tcp --dport 22 -j SNAT --to-source $reverseproxy_ip |
38 | -if ! grep -q '/$' /proc/1/cgroup; then | 38 | +if grep -q '/$' /proc/1/cgroup; then |
39 | # only on non-containers | 39 | # only on non-containers |
40 | sysctl -w net.ipv4.ip_forward=1 | 40 | sysctl -w net.ipv4.ip_forward=1 |
41 | fi | 41 | fi |