adding some early work for bastion support
This commit is contained in:
parent
7aabd41def
commit
0868dd4df3
|
@ -84,6 +84,23 @@ case "$1" in
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
PUBLICLOIP=$(dig_a public.loopback.${HOSTNAME}) || true
|
||||||
|
if [[ ! -z PUBLICLOIP ]]; then
|
||||||
|
cat <<-EOF >>$IFCONFIG
|
||||||
|
iface lo inet static
|
||||||
|
address ${PUBLICLOIP}/32
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
FRR_BASTION="${FRR_BASTION}ip prefix-list ANY permit 0.0.0.0/0 le 32\n"
|
||||||
|
FRR_BASTION="${FRR_BASTION}route-map BASTION permit 10\n"
|
||||||
|
FRR_BASTION="${FRR_BASTION} match ip address prefix-list ANY\n"
|
||||||
|
FRR_BASTION="${FRR_BASTION} set src ${PUBLICLOIP}\n"
|
||||||
|
FRR_BASTION="${FRR_BASTION}ip protocol bgp route-map BASTION\n"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# gathering defined interfaces
|
# gathering defined interfaces
|
||||||
|
@ -307,6 +324,7 @@ case "$1" in
|
||||||
|
|
||||||
# set frr config
|
# set frr config
|
||||||
sed -i \
|
sed -i \
|
||||||
|
-e "s/^!!! FRR_BASTION/$FRR_BASTION/" \
|
||||||
-e "s/^!!! FRR_IFS/$FRR_IFS/" \
|
-e "s/^!!! FRR_IFS/$FRR_IFS/" \
|
||||||
-e "s/^ !!! FRR_EDGE_NEIGH/$FRR_EDGE_NEIGH/" \
|
-e "s/^ !!! FRR_EDGE_NEIGH/$FRR_EDGE_NEIGH/" \
|
||||||
-e "s/^ !!! FRR_IPV4_EDGE_SUMMARIES_AGGREGATS/$FRR_IPV4_EDGE_SUMMARIES_AGGREGATS/" \
|
-e "s/^ !!! FRR_IPV4_EDGE_SUMMARIES_AGGREGATS/$FRR_IPV4_EDGE_SUMMARIES_AGGREGATS/" \
|
||||||
|
|
|
@ -225,6 +225,11 @@ route-map LOCALNETSv6 permit 5
|
||||||
!!! description "accept all the rest"
|
!!! description "accept all the rest"
|
||||||
!!! match ipv6 address prefix-list ALL
|
!!! match ipv6 address prefix-list ALL
|
||||||
!!! !
|
!!! !
|
||||||
|
|
||||||
|
|
||||||
|
!!! FRR_BASTION
|
||||||
|
|
||||||
|
|
||||||
!
|
!
|
||||||
line vty
|
line vty
|
||||||
!
|
!
|
||||||
|
|
Loading…
Reference in New Issue