Update tinc-up.tmpl

This commit is contained in:
sump pump 2020-06-21 21:34:58 +00:00
parent af43edc50e
commit 33ed8a9833

@ -1,5 +1,4 @@
#!/bin/sh #!/bin/sh
ifconfig \$INTERFACE ${tinc_peer_address} netmask ${netmask:-255.255.255.0}
sysctl -w net.ipv6.conf.\$INTERFACE.disable_ipv6=1 sysctl -w net.ipv6.conf.\$INTERFACE.disable_ipv6=1
{{ if len "${vip:-}" }}ifconfig "\$INTERFACE:0" ${vip}{{ end }} {{ if len "${vip:-}" }}ifconfig "\$INTERFACE:0" ${vip}{{ end }}
@ -16,3 +15,5 @@ iptables -A FORWARD -o \$INTERFACE -d ${network_address}/${global_prefix:-16} -j
iptables -A FORWARD -i \$INTERFACE ! -s ${network_address}/${global_prefix:-16} -j DROP iptables -A FORWARD -i \$INTERFACE ! -s ${network_address}/${global_prefix:-16} -j DROP
{{ if len "${bgp_routes:-}" }}{{ range "$bgp_routes" | split "," }}iptables -A FORWARD -i \$INTERFACE -s {{.}} -j DROP {{ if len "${bgp_routes:-}" }}{{ range "$bgp_routes" | split "," }}iptables -A FORWARD -i \$INTERFACE -s {{.}} -j DROP
{{ end }}{{ end }} {{ end }}{{ end }}
ifconfig \$INTERFACE ${tinc_peer_address} netmask ${netmask:-255.255.255.0}