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