eole-gitea/tmpl/51-gitea-nat_rules

10 lines
359 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
#
# Rules for SSH git clone
#
%if %%getVar('mode_conteneur_actif','non') == 'oui'
/sbin/iptables -A eth0-cont -d %%adresse_ip_forge/32 -p tcp -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
/sbin/iptables -t nat -A PREROUTING -i eth0 -s 0/0 -p tcp --syn --dport %%git_ssh_port -j DNAT --to-destination %%container_ip_forge:22
%end if