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