Update tinc-up.tmpl

This commit is contained in:
sump pump 2020-06-21 21:34:24 +00:00
parent 3509db40e3
commit af43edc50e

View File

@ -1,5 +1,7 @@
#!/bin/sh
ifconfig \$INTERFACE ${tinc_peer_address} netmask ${netmask:-255.255.255.0}
sysctl -w net.ipv6.conf.\$INTERFACE.disable_ipv6=1
{{ 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 ${internal_interface:-eth0} -j DNAT --to-destination ${tinc_peer_address}