Update build.sh, README.md, bird/bird.conf.tmpl, tinc/subnet-down.tmpl, tinc/subnet-up.tmpl, tinc/tinc-up.tmpl, tinc/tinc.conf.tmpl, docker-compose.yml files
Deleted gortr/roas.json, tinc/lixonet/hosts/daltx_nurd_lixo, tinc/lixonet/hosts/denco_mane_lixo, tinc/lixonet/hosts/inwwv_nurd_lixo, tinc/lixonet/hosts/lkwco_mane_lixo, tinc/lixonet/hosts/manva_nurd_lixo, tinc/lixonet/subnet-down.tmpl, tinc/lixonet/subnet-up.tmpl, tinc/lixonet/tinc-up.tmpl, tinc/lixonet/tinc.conf.tmpl, bird/rpki/hosts/denco_mane_lixo, bird/rpki/known_hosts, bird/neighbors/daltx_nurd_lixo, bird/neighbors/denco_mane_lixo, bird/neighbors/glaz_nurd_lixo, bird/neighbors/lkwco_mane_lixo, bird/neighbors/phxaz_nurd_lixo files
2020-05-21 21:22:04 +00:00
|
|
|
#!/bin/sh
|
2023-04-13 00:08:43 -06:00
|
|
|
mkdir /tmp/tinc
|
|
|
|
|
2022-12-22 10:04:15 -07:00
|
|
|
sysctl -w net.ipv6.conf.\$INTERFACE.disable_ipv6=1 || echo "[WARNING] IPv6 couldn't be disabled on the \$INTERFACE interface!"
|
2020-06-21 21:34:24 +00:00
|
|
|
|
2022-12-22 21:50:52 -07:00
|
|
|
{{ if len "${internal_address6:-}" }}
|
2022-12-27 20:25:53 -07:00
|
|
|
ifconfig ${internal_interface} ${internal_address6}/${internal_mask6:-128}
|
2022-12-22 21:50:52 -07:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
2020-06-21 04:22:23 +00:00
|
|
|
{{ if len "${vip:-}" }}ifconfig "\$INTERFACE:0" ${vip}{{ end }}
|
2020-06-21 05:01:27 +00:00
|
|
|
{{ if len "${ip_aliases:-}" }}{{ range "$ip_aliases" | split "," }}iptables -t nat -I PREROUTING -d {{ . }} -i \$INTERFACE -j DNAT --to-destination ${tinc_peer_address}
|
2020-06-26 13:17:33 -06:00
|
|
|
iptables -t nat -I PREROUTING -d {{ . }} -i eth0 -j DNAT --to-destination ${tinc_peer_address}
|
2020-06-21 05:01:27 +00:00
|
|
|
{{ end }}{{ end }}
|
2020-06-08 15:28:22 +00:00
|
|
|
|
2023-04-23 20:20:57 -06:00
|
|
|
# Plugins may communicate over eth0, the 'internal' docker network.
|
|
|
|
# Because of this, we should allow masquerading NAT through eth0
|
|
|
|
iptables -t nat -A POSTROUTING -i eth0 -o \$INTERFACE -j MASQUERADE
|
2020-06-12 22:58:53 +00:00
|
|
|
|
|
|
|
# Prevent spoofing attacks
|
2020-06-12 23:16:41 +00:00
|
|
|
iptables -A FORWARD -i \$INTERFACE ! -s ${network_address}/${global_prefix:-16} -j DROP
|
2020-06-12 23:12:41 +00:00
|
|
|
{{ if len "${bgp_routes:-}" }}{{ range "$bgp_routes" | split "," }}iptables -A FORWARD -i \$INTERFACE -s {{.}} -j DROP
|
2020-06-21 04:11:46 +00:00
|
|
|
{{ end }}{{ end }}
|
2020-06-21 21:34:58 +00:00
|
|
|
|
2023-04-23 20:20:57 -06:00
|
|
|
# Enable IPv4 kernel routing/forwarding for this network
|
|
|
|
iptables -A FORWARD -o \$INTERFACE -d ${network_address}/${global_prefix:-16} -j ACCEPT
|
|
|
|
{{ if len "${bgp_routes:-}" }}{{ range "$bgp_routes" | split "," }}iptables -A FORWARD -o eth0 -d {{.}} -j ACCEPT
|
|
|
|
{{ end }}{{ end }}
|
|
|
|
|
2020-06-26 13:17:33 -06:00
|
|
|
ifconfig \$INTERFACE ${tinc_peer_address} netmask ${netmask:-255.255.255.0}
|