OpenVPN Ansible / Ansible Syntax Check (push) Successful in 41s
OpenVPN Ansible / Ansible Lint (push) Successful in 58s
OpenVPN Ansible / Deploy VPN Networking and OpenVPN (push) Failing after 1m13s
OpenVPN Ansible / Generate SBOM (push) Skipped
OpenVPN Ansible / Scan SBOM with Trivy (push) Skipped
18 lines
1.4 KiB
Django/Jinja
18 lines
1.4 KiB
Django/Jinja
#!/bin/sh
|
|
set -eu
|
|
|
|
iptables -t nat -C POSTROUTING -s {{ nat_gateway_private_cidr }} -o {{ nat_gateway_public_interface }} -j MASQUERADE 2>/dev/null || \
|
|
iptables -t nat -A POSTROUTING -s {{ nat_gateway_private_cidr }} -o {{ nat_gateway_public_interface }} -j MASQUERADE
|
|
|
|
iptables -C FORWARD -i {{ nat_gateway_private_interface }} -o {{ nat_gateway_public_interface }} -s {{ nat_gateway_private_cidr }} -j ACCEPT 2>/dev/null || \
|
|
iptables -A FORWARD -i {{ nat_gateway_private_interface }} -o {{ nat_gateway_public_interface }} -s {{ nat_gateway_private_cidr }} -j ACCEPT
|
|
|
|
iptables -C FORWARD -i {{ nat_gateway_public_interface }} -o {{ nat_gateway_private_interface }} -d {{ nat_gateway_private_cidr }} -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT 2>/dev/null || \
|
|
iptables -A FORWARD -i {{ nat_gateway_public_interface }} -o {{ nat_gateway_private_interface }} -d {{ nat_gateway_private_cidr }} -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
|
|
|
iptables -C INPUT -p tcp -s {{ nat_gateway_node_exporter_allowed_source }} --dport {{ nat_gateway_node_exporter_port }} -j ACCEPT 2>/dev/null || \
|
|
iptables -I INPUT 1 -p tcp -s {{ nat_gateway_node_exporter_allowed_source }} --dport {{ nat_gateway_node_exporter_port }} -j ACCEPT
|
|
|
|
iptables -C INPUT -p tcp --dport {{ nat_gateway_node_exporter_port }} -j DROP 2>/dev/null || \
|
|
iptables -I INPUT 2 -p tcp --dport {{ nat_gateway_node_exporter_port }} -j DROP
|