15 lines
607 B
Bash
Executable File
15 lines
607 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#interface=("sfp28-9-ISP1-MTS" "sfp28-10-ISP2-TTK" "sfp28-11-ISP3-MEG")
|
|
#vlans=("960" "152" "876")
|
|
|
|
interface=("sfp28-1-BRAS1" "sfp28-2-BRAS2" "sfp28-3-BRAS3" "sfp28-4-BRAS4")
|
|
vlans=("2" "3" "4" "5")
|
|
|
|
for (( i=0; i<"${#interface[@]}"; i++ )); do
|
|
for c in $(cat ./unloading/google_v4.txt); do
|
|
ip=$(echo $c | grep -Eo "([0-9]{1,3}\.){3}[0-9]{1,3}\/[0-9]{1,2}" | tr -d '\r\n')
|
|
[ ! -z "$ip" ] && echo "/interface/ethernet/switch/rule/add switch=switch1 ports=${interface[i]} vlan-id=${vlans[i]} src-address=$ip dst-address=91.235.144.222/32 new-dst-ports=sfp28-8-DPI new-vlan-id=6"
|
|
done
|
|
done
|