Update tinc/tinc-up.tmpl, README.md files
This commit is contained in:
parent
b9af6452c9
commit
43f49701fb
@ -117,6 +117,7 @@ default 172.31.8.1 0.0.0.0 UG 202 0 0 eth0
|
||||
* `router_prefix`: router network prefix: defaults to `24`. If you change this you _SHOULD_ change `netmask` too.
|
||||
* `netmask`: router netmask: defaults to `255.255.255.0` (`/24`); _SHOULD_ be the bitmask that corresponds to the `router_prefix`
|
||||
* `internal_interface`: the interface to route your _OWN_ networks to. This should be the interface where your personal Lixonet subnets are reachable at, or in other words the interface at which the Lixonet EE router can send packets destined to networks you own. Defaults to `eth0`.
|
||||
* `vip`: virtual IP: a virtual IP address to assign to the Lixonet EE router directly, aside from 172.31.0.8.
|
||||
|
||||
#### Tinc options
|
||||
* `network_name` - The name of the interface that Tinc should create when it's started. Defaults to `lixonet`. Set this for multiple networks.
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
ifconfig \$INTERFACE ${tinc_peer_address} netmask ${netmask:-255.255.255.0}
|
||||
{{ if len "${vip:-}" }}ifconfig "\$INTERFACE:0" ${vip}{{ end }}{{ end }}
|
||||
|
||||
# Enable IPv4 kernel routing/forwarding for this network
|
||||
iptables -A FORWARD -o \$INTERFACE -d ${network_address}/${global_prefix:-16} -j ACCEPT
|
||||
@ -9,4 +10,4 @@ iptables -A FORWARD -o \$INTERFACE -d ${network_address}/${global_prefix:-16} -j
|
||||
# Prevent spoofing attacks
|
||||
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
|
||||
{{ end }}{{ end }}
|
||||
{{ end }}{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user