Commit 6fe07f3597e5317f8f85cca4008e96dab3035365
1 parent
da04baca
Exists in
master
and in
89 other branches
Added missing lines to allow port redirects
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
utils/reverseproxy_ssh_setup
@@ -31,3 +31,8 @@ systemctl restart sshd | @@ -31,3 +31,8 @@ systemctl restart sshd | ||
31 | iptables -t nat -A PREROUTING -d $reverseproxy_ip/32 -p tcp -m tcp --dport 22 -j DNAT --to-destination $integration_ip:22 | 31 | iptables -t nat -A PREROUTING -d $reverseproxy_ip/32 -p tcp -m tcp --dport 22 -j DNAT --to-destination $integration_ip:22 |
32 | iptables -t nat -A POSTROUTING -d $integration_ip/32 -p tcp -m tcp --dport 22 -j SNAT --to-source $reverseproxy_ip | 32 | iptables -t nat -A POSTROUTING -d $integration_ip/32 -p tcp -m tcp --dport 22 -j SNAT --to-source $reverseproxy_ip |
33 | sysctl -w net.ipv4.ip_forward=1 | 33 | sysctl -w net.ipv4.ip_forward=1 |
34 | + | ||
35 | +# Allow port redirects | ||
36 | +iptables -t filter -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT | ||
37 | +iptables -t filter -A FORWARD -p tcp -d $integration_ip --dport 22 -j ACCEPT | ||
38 | +iptables -t filter -A FORWARD -s $integration_ip -p tcp --sport 22 -j ACCEPT |