Update tinc/tinc-up.tmpl, tinc/tinc.conf.tmpl, tinc/tinc-down.tmpl files
This commit is contained in:
parent
7e235ff640
commit
0b421179f6
@ -1,4 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
{{ if len "${ip_aliases:-}" }}{{ range "$ip_aliases" | split "," }}iptables -t nat -D PREROUTING -d {{ . }} -i \$INTERFACE -j DNAT --to-destination ${tinc_peer_address}
|
||||||
|
iptables -t nat -D PREROUTING -d {{ . }} -i ${internal_interface:-eth0} -j DNAT --to-destination ${tinc_peer_address}
|
||||||
|
{{ end }}{{ end }}
|
||||||
|
|
||||||
# Disable IPv4 kernel routing/forwarding for this network
|
# Disable IPv4 kernel routing/forwarding for this network
|
||||||
iptables -D FORWARD -o \$INTERFACE -d ${network_address}/${global_prefix:-16} -j ACCEPT
|
iptables -D FORWARD -o \$INTERFACE -d ${network_address}/${global_prefix:-16} -j ACCEPT
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
ifconfig \$INTERFACE ${tinc_peer_address} netmask ${netmask:-255.255.255.0}
|
ifconfig \$INTERFACE ${tinc_peer_address} netmask ${netmask:-255.255.255.0}
|
||||||
{{ if len "${vip:-}" }}ifconfig "\$INTERFACE:0" ${vip}{{ 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 ${internal_interface:-eth0} -j DNAT --to-destination ${tinc_peer_address}
|
||||||
|
{{ end }}{{ end }}
|
||||||
|
|
||||||
# Enable IPv4 kernel routing/forwarding for this network
|
# Enable IPv4 kernel routing/forwarding for this network
|
||||||
iptables -A FORWARD -o \$INTERFACE -d ${network_address}/${global_prefix:-16} -j ACCEPT
|
iptables -A FORWARD -o \$INTERFACE -d ${network_address}/${global_prefix:-16} -j ACCEPT
|
||||||
|
@ -21,6 +21,7 @@ Port = ${tinc_bind_port:-9994}
|
|||||||
DeviceType = ${tinc_device_type:-tap}
|
DeviceType = ${tinc_device_type:-tap}
|
||||||
Device = ${tinc_device:-/dev/net/tun}
|
Device = ${tinc_device:-/dev/net/tun}
|
||||||
Mode = ${tinc_mode:-switch}
|
Mode = ${tinc_mode:-switch}
|
||||||
|
Forwarding = kernel
|
||||||
AddressFamily = ${tinc_address_family:-ipv4}
|
AddressFamily = ${tinc_address_family:-ipv4}
|
||||||
|
|
||||||
# Default over-the-wire security for Lixonet.
|
# Default over-the-wire security for Lixonet.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user