network/mikrotik-tool/982.rsc
2026-05-08 17:47:42 -05:00

441 lines
19 KiB
Text

# 2026-05-08 17:46:02 by RouterOS 7.21.4
# software id = FUVS-HCM5
#
# model = CCR1009-7G-1C-1S+
# serial number = E3210FA5B025
/interface bridge
add name=982 port-cost-mode=short
add name=mgmt port-cost-mode=short
/interface ethernet
set [ find default-name=ether7 ] l2mtu=9000 name=ether7-380
/interface vlan
add interface=ether1 name=vlan10_ether1 vlan-id=10
add interface=ether2 name=vlan10_ether2 vlan-id=10
add interface=ether3 name=vlan10_ether3 vlan-id=10
add interface=ether4 name=vlan10_ether4 vlan-id=10
add interface=ether5 name=vlan10_ether5 vlan-id=10
add interface=ether6 name=vlan10_ether6 vlan-id=10
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha256 enc-algorithms=\
aes-256-cbc,aes-128-cbc pfs-group=modp2048
/ip pool
add name=mgmt ranges=10.10.48.1-10.10.62.254
add name=public ranges=204.110.189.1-204.110.189.29
add name=cgnat ranges=100.64.48.1-100.64.62.199
/ip dhcp-server
add address-pool=mgmt interface=mgmt lease-script="{\
\n:local url \"https://xtjlpnubrg.execute-api.us-east-1.amazonaws.com/prod\
uction/on-start-workflow-execution/6f19a48f-04f7-40c1-a4e0-8cb66df99213/cd\
c24944-c947-4e01-9c54-07a1653d2e3e\"\
\n:local url2 \"https://iptrack.vntx.net/api/dhcp\"\
\n:local max 1\
\n\
\n:local attempts 0\
\n:local success1 0\
\n:local success2 0\
\n:do {\
\n :set attempts (\$attempts+1);\
\n :if (\$leaseBound = 0) do {\
\n # Try url2 (iptrack.vntx.net) - deassignment\
\n :do {\
\n /tool fetch duration=30s mode=https url=\"\$url2\" http-method=pos\
t http-header-field=\"Content-Type: application/json\" http-data=\"{\\\"bo\
und\\\":\\\"\$leaseBound\\\",\\\"mac\\\":\\\"\$leaseActMAC\\\",\\\"ip\\\":\
\\\"\$leaseActIP\\\",\\\"server\\\":\\\"\$leaseServerName\\\"}\"\
\n :set success1 1;\
\n :log info \"DHCP deassignment successfully sent to iptrack.vntx.ne\
t for \$leaseActMAC / \$leaseActIP\";\
\n } on-error={\
\n :log error \"DHCP FAILED to send deassignment to iptrack.vntx.net \
on attempt \$attempts/\$max for \$leaseActMAC / \$leaseActIP\";\
\n }\
\n\
\n # Try url (gaiia) - deassignment\
\n :do {\
\n /tool fetch duration=30s mode=https url=\"\$url\" http-method=post\
\_http-header-field=\"Content-Type: application/json\" http-data=\"{\\\"bo\
und\\\":\\\"\$leaseBound\\\",\\\"mac\\\":\\\"\$leaseActMAC\\\",\\\"ip\\\":\
\\\"\$leaseActIP\\\",\\\"server\\\":\\\"\$leaseServerName\\\",\\\"remoteId\
\\\":\\\"\\\"}\"\
\n :set success2 1;\
\n :log info \"DHCP deassignment successfully sent to gaiia AWS API f\
or \$leaseActMAC / \$leaseActIP\";\
\n } on-error={\
\n :log error \"DHCP FAILED to send deassignment to gaiia AWS API on \
attempt \$attempts/\$max for \$leaseActMAC / \$leaseActIP\";\
\n }\
\n\
\n :if (\$success1 != 1 || \$success2 != 1) do={\
\n :delay 3s;\
\n }\
\n } else {\
\n :delay 1s;\
\n :local remoteID [/ip dhcp-server lease get [find where address=\$lea\
seActIP] agent-remote-id];\
\n\
\n # Try url2 (iptrack.vntx.net) - assignment\
\n :do {\
\n /tool fetch duration=30s mode=https url=\"\$url2\" http-method=pos\
t http-header-field=\"Content-Type: application/json\" http-data=\"{\\\"bo\
und\\\":\\\"\$leaseBound\\\",\\\"mac\\\":\\\"\$leaseActMAC\\\",\\\"ip\\\":\
\\\"\$leaseActIP\\\",\\\"server\\\":\\\"\$leaseServerName\\\",\\\"remoteId\
\\\":\\\"\$remoteID\\\"}\"\
\n :set success1 1;\
\n :log info \"DHCP assignment successfully sent to iptrack.vntx.net \
for \$leaseActMAC / \$leaseActIP / \$remoteID\";\
\n } on-error={\
\n :log error \"DHCP FAILED to send assignment to iptrack.vntx.net on\
\_attempt \$attempts/\$max for \$leaseActMAC / \$leaseActIP / \$remoteID\"\
;\
\n }\
\n\
\n # Try url (gaiia) - assignment\
\n :do {\
\n /tool fetch duration=30s mode=https url=\"\$url\" http-method=post\
\_http-header-field=\"Content-Type: application/json\" http-data=\"{\\\"bo\
und\\\":\\\"\$leaseBound\\\",\\\"mac\\\":\\\"\$leaseActMAC\\\",\\\"ip\\\":\
\\\"\$leaseActIP\\\",\\\"server\\\":\\\"\$leaseServerName\\\",\\\"remoteId\
\\\":\\\"\$remoteID\\\"}\"\
\n :set success2 1;\
\n :log info \"DHCP assignment successfully sent to gaiia AWS API for\
\_\$leaseActMAC / \$leaseActIP / \$remoteID\";\
\n } on-error={\
\n :log error \"DHCP FAILED to send assignment to gaiia AWS API on at\
tempt \$attempts/\$max for \$leaseActMAC / \$leaseActIP / \$remoteID\";\
\n }\
\n\
\n :if (\$success1 != 1 || \$success2 != 1) do={\
\n :delay 30s;\
\n }\
\n }\
\n :if (\$success1 = 1 && \$success2 = 1) do {\
\n :set attempts \$max;\
\n }\
\n} while ( \$attempts < \$max )\
\n}\
\n" lease-time=10m name=mgmt
/ip smb users
set [ find default=yes ] disabled=yes
/ppp profile
add local-address=100.64.63.253 name=982 on-down="{\
\n:local url \"https://xtjlpnubrg.execute-api.us-east-1.amazonaws.com/prod\
uction/on-start-workflow-execution/6f19a48f-04f7-40c1-a4e0-8cb66df99213/0a\
7f4443-fc8a-4fe0-807c-f535d2aa1865\"\
\n:local url2 \"https://iptrack.vntx.net/api/pppoe\"\
\n:local max 1\
\n\
\n:local localAddr \$\"local-address\"\
\n:local remoteAddr \$\"remote-address\"\
\n:local callerId \$\"caller-id\"\
\n:local calledId \$\"called-id\"\
\n:local interfaceName [/interface get \$interface name]\
\n\
\n:local attempts 0\
\n:local success1 0\
\n:local success2 0\
\n:do {\
\n :set attempts (\$attempts+1);\
\n\
\n # Try url2 (iptrack.vntx.net)\
\n :do {\
\n /tool fetch duration=30s mode=https url=\"\$url2\" http-method=post \
http-header-field=\"Content-Type: application/json\" http-data=\"{\\\"boun\
d\\\":\\\"0\\\",\\\"username\\\":\\\"\$user\\\",\\\"callingstationid\\\":\
\\\"\$callerId\\\",\\\"framedip\\\":\\\"\$remoteAddr\\\"}\"\
\n :set success1 1;\
\n :log info \"PPPoE deassignment successfully sent to iptrack.vntx.net\
\_for \$user / \$remoteAddr\";\
\n } on-error={\
\n :log error \"PPPoE FAILED to send deassignment to iptrack.vntx.net o\
n attempt \$attempts out of \$max for \$user / \$remoteAddr\";\
\n }\
\n\
\n # Try url (AWS API)\
\n :do {\
\n /tool fetch duration=30s mode=https url=\"\$url\" http-method=post h\
ttp-header-field=\"Content-Type: application/json\" http-data=\"{\\\"bound\
\\\":\\\"0\\\",\\\"username\\\":\\\"\$user\\\",\\\"callingstationid\\\":\\\
\"\$callerId\\\",\\\"framedip\\\":\\\"\$remoteAddr\\\"}\"\
\n :set success2 1;\
\n :log info \"PPPoE deassignment successfully sent to gaiia AWS API fo\
r \$user / \$remoteAddr\";\
\n } on-error={\
\n :log error \"PPPoPoE FAILED to send deassignment to gaiia AWS API on\
\_attempt \$attempts out of \$max for \$user / \$remoteAddr\";\
\n }\
\n\
\n :if (\$success1 = 1 && \$success2 = 1) do {\
\n :set attempts \$max;\
\n } else {\
\n :delay 3s;\
\n }\
\n} while ( \$attempts < \$max )\
\n}\
\n" on-up="{\
\n:local url \"https://xtjlpnubrg.execute-api.us-east-1.amazonaws.com/prod\
uction/on-start-workflow-execution/6f19a48f-04f7-40c1-a4e0-8cb66df99213/0a\
7f4443-fc8a-4fe0-807c-f535d2aa1865\"\
\n:local url2 \"https://iptrack.vntx.net/api/pppoe\"\
\n:local max 5\
\n\
\n:local localAddr \$\"local-address\"\
\n:local remoteAddr \$\"remote-address\"\
\n:local callerId \$\"caller-id\"\
\n:local calledId \$\"called-id\"\
\n:local interfaceName [/interface get \$interface name]\
\n\
\n:local attempts 0\
\n:local success1 0\
\n:local success2 0\
\n:do {\
\n :set attempts (\$attempts+1);\
\n\
\n # Try url2 (iptrack.vntx.net)\
\n :do {\
\n /tool fetch duration=30s mode=https url=\"\$url2\" http-method=post \
http-header-field=\"Content-Type: application/json\" http-data=\"{\\\"boun\
d\\\":\\\"1\\\",\\\"username\\\":\\\"\$user\\\",\\\"callingstationid\\\":\
\\\"\$callerId\\\",\\\"framedip\\\":\\\"\$remoteAddr\\\"}\"\
\n :set success1 1;\
\n :log info \"PPPoE assignment successfully sent to iptrack.vntx.net f\
or \$user / \$remoteAddr\";\
\n } on-error={\
\n :log error \"PPPoE FAILED to send assignment to iptrack.vntx.net on \
attempt \$attempts out of \$max for \$user / \$remoteAddr\";\
\n }\
\n\
\n # Try url (gaiia)\
\n :do {\
\n /tool fetch duration=30s mode=https url=\"\$url\" http-method=post h\
ttp-header-field=\"Content-Type: application/json\" http-data=\"{\\\"bound\
\\\":\\\"1\\\",\\\"username\\\":\\\"\$user\\\",\\\"callingstationid\\\":\\\
\"\$callerId\\\",\\\"framedip\\\":\\\"\$remoteAddr\\\"}\"\
\n :set success2 1;\
\n :log info \"PPPoE assignment successfully sent to gaiia AWS API for \
\$user / \$remoteAddr\";\
\n } on-error={\
\n :log error \"PPPoE FAILED to send assignment to gaiia AWS API on att\
empt \$attempts out of \$max for \$user / \$remoteAddr\";\
\n }\
\n\
\n :if (\$success1 = 1 && \$success2 = 1) do {\
\n :set attempts \$max;\
\n } else {\
\n :delay 3s;\
\n }\
\n} while ( \$attempts < \$max )\
\n}\
\n" remote-address=cgnat
/queue type
add kind=fq-codel name=fq-codel
/queue interface
set combo1 queue=fq-codel
set ether1 queue=fq-codel
set ether2 queue=fq-codel
set ether3 queue=fq-codel
set ether4 queue=fq-codel
set ether5 queue=fq-codel
set ether6 queue=fq-codel
set ether7-380 queue=fq-codel
set sfp-sfpplus1 queue=fq-codel
/routing bgp template
set default disabled=no
/routing id
add disabled=no id=10.254.254.110 name=id-1 select-dynamic-id=""
/routing ospf instance
add disabled=no in-filter-chain=ospf-in name=default-v2 out-filter-chain=\
ospf-out redistribute=connected router-id=id-1
add disabled=no name=default-v3 router-id=id-1 version=3
/routing ospf area
add disabled=no instance=default-v2 name=backbone-v2
add disabled=no instance=default-v3 name=backbone-v3
/snmp community
set [ find default=yes ] addresses=204.110.188.0/22,10.0.0.0/8 name=\
kdyyJrT0Mm
/system logging action
add name=logs remote=204.110.191.229 remote-port=1514 src-address=\
10.254.254.110 target=remote
/interface bridge port
add bridge=982 ingress-filtering=no interface=ether1 internal-path-cost=10 \
path-cost=10
add bridge=982 ingress-filtering=no interface=ether2 internal-path-cost=10 \
path-cost=10
add bridge=982 ingress-filtering=no interface=ether3 internal-path-cost=10 \
path-cost=10
add bridge=982 ingress-filtering=no interface=ether4 internal-path-cost=10 \
path-cost=10
add bridge=982 ingress-filtering=no interface=ether5 internal-path-cost=10 \
path-cost=10
add bridge=982 ingress-filtering=no interface=ether6 internal-path-cost=10 \
path-cost=10
add bridge=mgmt ingress-filtering=no interface=vlan10_ether1 \
internal-path-cost=10 path-cost=10
add bridge=mgmt ingress-filtering=no interface=vlan10_ether2 \
internal-path-cost=10 path-cost=10
add bridge=mgmt ingress-filtering=no interface=vlan10_ether3 \
internal-path-cost=10 path-cost=10
add bridge=mgmt ingress-filtering=no interface=vlan10_ether4 \
internal-path-cost=10 path-cost=10
add bridge=mgmt ingress-filtering=no interface=vlan10_ether5 \
internal-path-cost=10 path-cost=10
add bridge=mgmt ingress-filtering=no interface=vlan10_ether6 \
internal-path-cost=10 path-cost=10
add bridge=982 interface=combo1
/ip firewall connection tracking
set icmp-timeout=30s tcp-close-wait-timeout=1m tcp-established-timeout=4h \
tcp-fin-wait-timeout=2m tcp-last-ack-timeout=30s \
tcp-syn-received-timeout=1m tcp-syn-sent-timeout=2m \
tcp-time-wait-timeout=2m udp-stream-timeout=2m
/ip settings
set tcp-syncookies=yes
/interface pppoe-server server
add authentication=mschap2 default-profile=982 disabled=no interface=982 \
one-session-per-host=yes service-name=982
/ip address
add address=10.254.254.110 interface=lo network=10.254.254.110
add address=10.250.1.33/29 interface=ether7-380 network=10.250.1.32
add address=10.10.63.254/20 interface=mgmt network=10.10.48.0
add address=204.110.188.126/27 interface=982 network=204.110.188.96
add address=100.64.63.254/20 comment="New CGNAT subnet" interface=982 \
network=100.64.48.0
/ip dhcp-server lease
add address=10.10.63.2 mac-address=F4:92:BF:2F:29:7E
add address=10.10.63.3 mac-address=F4:92:BF:2F:29:93
add address=10.10.63.4 mac-address=F4:92:BF:2F:29:8F
add address=10.10.63.5 mac-address=F4:92:BF:2F:1C:0D
add address=10.10.63.6 mac-address=F4:92:BF:2F:08:38
add address=10.10.63.1 client-id=1:d0:21:f9:f0:f5:23 mac-address=\
D0:21:F9:F0:F5:23
/ip dhcp-server network
add address=10.10.48.0/20 dns-server=204.110.191.240,204.110.191.20 domain=\
vntx.net gateway=10.10.63.254 ntp-server=204.110.191.19
add address=100.64.28.0/22 dns-server=204.110.191.240,204.110.191.20 domain=\
vntx.net gateway=100.64.31.254 ntp-server=204.110.191.19
/ip dns
set servers=9.9.9.9,1.1.1.1
/ip firewall address-list
add address=100.64.35.199 comment="Scott Anderson (2203)" list=BusinessUltra
add address=100.64.35.199 comment="Scott Anderson (2203)" list=Active
add address=100.64.35.198 comment="Jose Lucas (2370)" list=Active
add address=100.64.35.197 comment="Joshua Soliz (2394)" list=\
ResidentialAdvanced
add address=100.64.35.197 comment="Joshua Soliz (2394)" list=Active
add address=100.64.35.196 comment="Corey Ball (2318)" list=Active
add address=100.64.35.194 comment="Craig Hovde (2373)" list=\
ResidentialAdvanced
add address=100.64.35.194 comment="Craig Hovde (2373)" list=Active
add address=100.64.35.195 comment="Juan Alonzo (198)" list=Active
add address=100.64.35.198 comment="Juan Alonzo (198)" list=ResidentialBasic
add address=100.64.35.196 comment="David Villanueva (109)" list=\
ResidentialBasic
add address=100.64.35.195 comment="Joshua Soliz (2394)" list=\
ResidentialAdvanced
add address=100.64.35.193 comment="Jose Lucas (2370)" list=\
ResidentialAdvanced
add address=100.64.35.193 comment="Jose Lucas (2370)" list=Active
add address=100.64.35.192 comment="Jack Worthy (1461)" list=\
ResidentialAdvanced
add address=100.64.35.192 comment="Jack Worthy (1461)" list=Active
add address=100.64.35.191 comment="Melanie Weddle (2304)" list=\
ResidentialBasic
add address=100.64.35.191 comment="Melanie Weddle (2304)" list=Active
add address=100.64.35.190 comment="Kenneth Campbell (1279)" list=\
ResidentialAdvanced
add address=100.64.35.190 comment="Kenneth Campbell (1279)" list=Active
add address=100.64.35.189 comment="Judy Kresich (606)" list=Delinquent
add address=100.64.35.189 comment="Judy Kresich (606)" list=ResidentialBasic
add address=100.64.35.189 comment="Judy Kresich (606)" list=Inactive
add address=100.64.35.188 comment="Nicole Maenn (2378)" list=\
ResidentialAdvanced
add address=100.64.35.188 comment="Nicole Maenn (2378)" list=Active
add address=100.64.35.187 comment="Zack Knuckey (2301)" list=\
ResidentialAdvanced
add address=100.64.35.187 comment="Zack Knuckey (2301)" list=Active
add address=100.64.35.186 comment="Rick Beckham (464)" list=ResidentialBasic
add address=100.64.35.186 comment="Rick Beckham (464)" list=Active
add address=100.64.35.185 comment="Kris Dougherty (421)" list=\
ResidentialAdvanced
add address=100.64.35.185 comment="Kris Dougherty (421)" list=Active
/ip firewall filter
add action=accept chain=forward comment=\
"bypass fasttrack for MPLS spine (out)" out-interface=ether7-380
add action=accept chain=forward comment=\
"bypass fasttrack for MPLS spine (in)" in-interface=ether7-380
add action=fasttrack-connection chain=forward comment=\
"fasttrack established/related" connection-state=established,related
add action=accept chain=forward comment="accept established/related" \
connection-state=established,related
/ip ipsec profile
set [ find default=yes ] dh-group=modp2048 dpd-interval=2m \
dpd-maximum-failures=5 enc-algorithm=aes-256,aes-128 hash-algorithm=\
sha256
/ip proxy
set port=48348
/ip route
add disabled=no dst-address=0.0.0.0/0 gateway=10.250.1.38
/ip service
set ftp address=204.110.188.0/22,10.0.0.0/8 disabled=yes
set telnet address=204.110.188.0/22,10.0.0.0/8 disabled=yes
set www address=204.110.188.0/22,10.0.0.0/8 disabled=yes
set www-ssl address=204.110.188.0/22,10.0.0.0/8
set ssh address=204.110.188.0/22,10.0.0.0/8 port=1022
set winbox address=204.110.188.0/22,10.0.0.0/8
set api address=204.110.188.0/22,10.0.0.0/8,100.64.0.0/10
set api-ssl certificate=ca-template
/ip ssh
set host-key-type=ed25519 password-authentication=yes strong-crypto=yes
/ipv6 nd
set [ find default=yes ] advertise-dns=yes
/mpls interface
add interface=ether7-380 mpls-mtu=1508
/mpls ldp
add disabled=no lsr-id=10.254.254.110 transport-addresses=10.254.254.110 vrf=\
main
/mpls ldp interface
add interface=ether7-380
/ppp aaa
set use-radius=yes
/radius
add address=204.110.191.248 require-message-auth=no service=ppp src-address=\
204.110.188.126 timeout=300ms
add address=204.110.191.2 disabled=yes require-message-auth=no service=ppp \
src-address=204.110.188.126 timeout=300ms
add accounting-backup=yes address=45.76.56.5 disabled=yes \
require-message-auth=no service=ppp src-address=204.110.188.126 timeout=\
300ms
/routing bfd configuration
add disabled=no interfaces=all min-rx=200ms min-tx=200ms multiplier=5
/routing filter rule
add chain=ospf-in disabled=no rule="accept;"
add chain=ospf-out disabled=no rule="accept;"
/routing ospf interface-template
add area=backbone-v2 auth-id=1 cost=10 disabled=no interfaces=ether7-380 \
networks=10.250.1.32/29 priority=1 type=ptp use-bfd=no
add area=backbone-v2 disabled=no passive
add area=backbone-v3 disabled=no passive
/snmp
set contact=graham@vntx.net enabled=yes location="33.148902, -96.495811"
/system clock
set time-zone-name=America/Chicago
/system identity
set name=982
/system logging
add action=remote topics=info
/system ntp client
set enabled=yes
/system ntp client servers
add address=ntp.vntx.net
add address=0.us.pool.ntp.org
/system package update
set channel=long-term
/system routerboard settings
# Firmware upgraded successfully, please reboot for changes to take effect!
set auto-upgrade=yes
/system scheduler
add name=reboot on-event="/system reboot" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=2024-09-16 start-time=03:35:00