File: /home/posscale/backup/MT_Backups/CWE/BACKUP-MikroTik-2024may09-205645.rsc
# may/09/2024 20:56:45 by RouterOS 6.44.5
# software id = IZI6-5AB5
#
# model = RB952Ui-5ac2nD
# serial number = BEE40BEC5D68
/interface bridge
add admin-mac=C4:AD:34:89:CD:B4 auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
country=australia disabled=no distance=indoors frequency=auto \
installation=indoor mode=ap-bridge ssid=CWE wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
20/40/80mhz-XXXX country=australia disabled=no distance=indoors \
frequency=auto installation=indoor mode=ap-bridge ssid=CWE \
wireless-protocol=802.11
/interface vlan
add interface=ether1 name="NBN Vlan 100" vlan-id=100
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk eap-methods="" \
group-ciphers=tkip mode=dynamic-keys supplicant-identity=MikroTik \
unicast-ciphers=tkip wpa-pre-shared-key=0433468416 wpa2-pre-shared-key=\
0433468416
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name="1.1 pool" ranges=192.168.1.20-192.168.1.200
/ip dhcp-server
add address-pool="1.1 pool" disabled=no interface=bridge name="Local DHCP"
/user group
set read policy="local,telnet,ssh,read,test,web,sniff,sensitive,api,romon,tika\
pp,!ftp,!reboot,!write,!policy,!winbox,!password,!dude"
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface="NBN Vlan 100" list=WAN
/ip address
add address=203.63.255.94/30 interface="NBN Vlan 100" network=203.63.255.92
add address=192.168.1.1/24 interface=bridge network=192.168.1.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=\
ether1
/ip dhcp-server lease
add address=192.168.1.11 client-id=1:c:38:3e:3:56:dd mac-address=\
0C:38:3E:03:56:DD server="Local DHCP"
add address=192.168.1.12 client-id=1:c:38:3e:3:59:9c mac-address=\
0C:38:3E:03:59:9C server="Local DHCP"
add address=192.168.1.13 client-id=1:80:5e:c0:aa:a1:2 mac-address=\
80:5E:C0:AA:A1:02 server="Local DHCP"
add address=192.168.1.5 client-id=1:0:17:c8:9f:12:3b mac-address=\
00:17:C8:9F:12:3B server="Local DHCP"
/ip dhcp-server network
add address=192.168.1.0/24 gateway=192.168.1.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1
/ip dns static
add address=192.168.88.1 name=router.lan
/ip firewall filter
add action=drop chain=input dst-port=53 in-interface-list=WAN protocol=tcp
add action=drop chain=input dst-port=53 in-interface-list=WAN protocol=udp
add action=accept chain=input dst-port=8291 in-interface-list=WAN protocol=\
tcp
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
out-interface-list=WAN
add action=dst-nat chain=dstnat disabled=yes dst-port=5065 in-interface-list=\
WAN protocol=udp to-addresses=192.168.1.11
add action=dst-nat chain=dstnat disabled=yes dst-port=5066 in-interface-list=\
WAN protocol=udp to-addresses=192.168.1.12
add action=dst-nat chain=dstnat disabled=yes dst-port=5067 in-interface-list=\
WAN protocol=udp to-addresses=192.168.1.13
add action=dst-nat chain=dstnat disabled=yes dst-port=5067 in-interface-list=\
WAN protocol=tcp to-addresses=192.168.1.13
add action=dst-nat chain=dstnat dst-port=14040-14059 in-interface-list=WAN \
protocol=udp to-addresses=192.168.1.13
add action=dst-nat chain=dstnat disabled=yes dst-port=5066 in-interface-list=\
WAN protocol=tcp to-addresses=192.168.1.12
add action=dst-nat chain=dstnat disabled=yes dst-port=5065 in-interface-list=\
WAN protocol=tcp to-addresses=192.168.1.11
add action=dst-nat chain=dstnat dst-port=14000-14019 in-interface-list=WAN \
port="" protocol=udp to-addresses=192.168.1.11
add action=dst-nat chain=dstnat dst-port=14020-14039 in-interface-list=WAN \
port="" protocol=udp to-addresses=192.168.1.12
/ip firewall service-port
set sip disabled=yes
/ip route
add distance=1 gateway=203.63.255.93
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Australia/Adelaide
/system scheduler
add interval=1w name=autobackup on-event=":local saveUserDB false\r\
\n:local saveSysBackup true\r\
\n:local encryptSysBackup false\r\
\n:local saveRawExport true\r\
\n\r\
\n:local FTPServer \"backup.posscales.com.au\"\r\
\n:local FTPPort 21\r\
\n:local FTPUser \"MT_Backups@backup.posscales.com.au\"\r\
\n:local FTPPass \"!Dgt.974082\"\r\
\n:local FTPdest \"/CWE\"\r\
\n\r\
\n:local ts [/system clock get time]\r\
\n:set ts ([:pick \$ts 0 2].[:pick \$ts 3 5].[:pick \$ts 6 8])\r\
\n:local ds [/system clock get date]\r\
\n:set ds ([:pick \$ds 7 11].[:pick \$ds 0 3].[:pick \$ds 4 6])\r\
\n\r\
\n:local fname (\"BACKUP-\".[/system identity get name].\"-\".\$ds.\"-\".\
\$ts)\r\
\n:local sfname (\"/\".\$fname)\r\
\n:if (\$saveUserDB) do={\r\
\n /tool user-manager database save name=(\$sfname.\".umb\")\r\
\n :log info message=\"User Manager DB Backup Finished\"\r\
\n}\r\
\n:if (\$saveSysBackup) do={\r\
\n :if (\$encryptSysBackup = true) do={ /system backup save name=(\$sfnam\
e.\".backup\") }\r\
\n :if (\$encryptSysBackup = false) do={ /system backup save dont-encrypt\
=yes name=(\$sfname.\".backup\") }\r\
\n :log info message=\"System Backup Finished\"\r\
\n}\r\
\nif (\$saveRawExport) do={\r\
\n /export file=(\$sfname.\".rsc\")\r\
\n :log info message=\"Raw configuration script export Finished\"\r\
\n}\r\
\n:local backupFileName \"\"\r\
\n:local backupDestPath \"\"\r\
\n:foreach backupFile in=[/file find] do={\r\
\n :set backupFileName (\"/\".[/file get \$backupFile name])\r\
\n :set backupDestPath (\$FTPdest.\$backupFileName)\r\
\n :if ([:typeof [:find \$backupFileName \$sfname]] != \"nil\") do={\r\
\n # :log warning message=\"/tool fetch address=\$FTPServer port=\$FTPPor\
t src-path=\$backupFileName user=\$FTPUser mode=ftp password=\$FTPPass dst\
-path=\$backupDestPath upload=yes\"\r\
\n\r\
\n /tool fetch address=\$FTPServer port=\$FTPPort src-path=\$backupFile\
Name user=\$FTPUser mode=ftp password=\$FTPPass dst-path=\$backupDestPath \
upload=yes\r\
\n }\r\
\n}\r\
\n:delay 5s\r\
\n:foreach backupFile in=[/file find] do={\r\
\n :if ([:typeof [:find [/file get \$backupFile name] \"BACKUP-\"]]!=\"ni\
l\") do={\r\
\n /file remove \$backupFile\r\
\n }\r\
\n}\r\
\n\r\
\n:log info message=\"Successfully removed Temporary Backup Files\"\r\
\n:log info message=\"Automatic Backup Completed Successfully\"" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=aug/05/2021 start-time=20:56:45
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN