From 6fe07f3597e5317f8f85cca4008e96dab3035365 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Mon, 25 May 2015 17:58:47 -0300 Subject: [PATCH] Added missing lines to allow port redirects --- utils/reverseproxy_ssh_setup | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/utils/reverseproxy_ssh_setup b/utils/reverseproxy_ssh_setup index e635de8..0788509 100755 --- a/utils/reverseproxy_ssh_setup +++ b/utils/reverseproxy_ssh_setup @@ -31,3 +31,8 @@ systemctl restart sshd iptables -t nat -A PREROUTING -d $reverseproxy_ip/32 -p tcp -m tcp --dport 22 -j DNAT --to-destination $integration_ip:22 iptables -t nat -A POSTROUTING -d $integration_ip/32 -p tcp -m tcp --dport 22 -j SNAT --to-source $reverseproxy_ip sysctl -w net.ipv4.ip_forward=1 + +# Allow port redirects +iptables -t filter -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT +iptables -t filter -A FORWARD -p tcp -d $integration_ip --dport 22 -j ACCEPT +iptables -t filter -A FORWARD -s $integration_ip -p tcp --sport 22 -j ACCEPT -- libgit2 0.21.2