From 7c742d4a4e95fec07d139c7da904de726bc02e51 Mon Sep 17 00:00:00 2001
From: sump pump <admin@example.com>
Date: Fri, 12 Jun 2020 23:12:41 +0000
Subject: [PATCH] Update tinc-up.tmpl

---
 tinc/tinc-up.tmpl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tinc/tinc-up.tmpl b/tinc/tinc-up.tmpl
index 061ba89..3aaebc2 100644
--- a/tinc/tinc-up.tmpl
+++ b/tinc/tinc-up.tmpl
@@ -7,4 +7,6 @@ iptables -A FORWARD -o \$INTERFACE -d ${network_address}/${global_prefix:-16} -j
 {{ end }}{{ end }}
 
 # Prevent spoofing attacks
-iptables -A FORWARD -i \$INTERFACE -s ! ${network_address}/${global_prefix:-16} -j DROP
\ No newline at end of file
+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 }}
\ No newline at end of file