Update tinc-up.tmpl

This commit is contained in:
Manevolent 2022-12-22 21:50:52 -07:00 committed by GitHub
parent 05cc7c0c8f
commit 74d707f405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,11 @@
#!/bin/sh
sysctl -w net.ipv6.conf.\$INTERFACE.disable_ipv6=1 || echo "[WARNING] IPv6 couldn't be disabled on the \$INTERFACE interface!"
{{ if len "${internal_address6:-}" }}
ifconfig ${internal_interface} ${internal_address6}
{{ end }}
{{ if len "${vip:-}" }}ifconfig "\$INTERFACE:0" ${vip}{{ end }}
{{ if len "${ip_aliases:-}" }}{{ range "$ip_aliases" | split "," }}iptables -t nat -I PREROUTING -d {{ . }} -i \$INTERFACE -j DNAT --to-destination ${tinc_peer_address}
iptables -t nat -I PREROUTING -d {{ . }} -i eth0 -j DNAT --to-destination ${tinc_peer_address}