Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # model = CCR1009-8G-1S
- /interface bridge
- add add-dhcp-option82=yes arp=proxy-arp comment=BRIDGE dhcp-snooping=yes \
- fast-forward=no name=bridge1
- /interface ethernet
- set [ find default-name=ether1 ] mac-address=E4:8D:8C:7F:BF:70 speed=100Mbps
- set [ find default-name=ether2 ] mac-address=E4:8D:8C:7F:BF:71 speed=100Mbps
- set [ find default-name=ether3 ] mac-address=E4:8D:8C:7F:BF:72 speed=100Mbps
- set [ find default-name=ether4 ] mac-address=E4:8D:8C:7F:BF:73 speed=100Mbps
- set [ find default-name=ether5 ] advertise=\
- 10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full mac-address=\
- E4:8D:8C:7F:BF:74 speed=100Mbps
- set [ find default-name=ether6 ] mac-address=E4:8D:8C:7F:BF:75 speed=100Mbps
- set [ find default-name=ether7 ] advertise=100M-full comment=WAN2 \
- mac-address=E4:8D:8C:7F:BF:76 speed=100Mbps
- set [ find default-name=ether8 ] advertise=\
- 10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full mac-address=\
- E4:8D:8C:7F:BF:77 speed=100Mbps
- set [ find default-name=sfp1 ] advertise="10M-half,10M-full,100M-half,100M-ful\
- l,1000M-half,1000M-full,2500M-full,5000M-full,10000M-full" \
- auto-negotiation=no comment=WAN1 mac-address=E4:8D:8C:7F:BF:6F
- /ip firewall layer7-protocol
- add name=HC regexp="^.+(youtube.com|instagram.com|facebook.com).*\$"
- /ip ipsec profile
- set [ find default=yes ] dh-group="ecp256,ecp384,ecp521,ec2n185,ec2n155,modp81\
- 92,modp6144,modp4096,modp3072,modp2048,modp1536,modp1024,modp768" \
- enc-algorithm=\
- aes-256,camellia-256,aes-192,camellia-192,aes-128,camellia-128,blowfish
- /ip ipsec proposal
- set [ find default=yes ] auth-algorithms=sha512,sha256,sha1 enc-algorithms="ae\
- s-256-cbc,aes-256-ctr,aes-256-gcm,camellia-256,aes-192-cbc,aes-192-ctr,aes\
- -192-gcm,camellia-192,aes-128-cbc,aes-128-ctr,aes-128-gcm,camellia-128"
- /ip pool
- add name=XXXXXX ranges=192.168.244.11-192.168.244.253
- add name=XXXXXX ranges=192.168.252.13-192.168.252.19
- add name=XXXXXX ranges=192.168.251.45-192.168.251.99
- add name=XXXXXX ranges=192.168.254.112-192.168.254.130
- add name=XXXXXX ranges=192.168.100.215-192.168.100.216
- add name=XXXXXX ranges=192.168.250.100-192.168.250.129
- /ip dhcp-server
- add address-pool="XXXXXX" disabled=no interface=bridge1 name=dhcp1 \
- parent-queue="XXXXXX"
- /snmp community
- set [ find default=yes ] addresses=192.168.100.211/32,192.168.100.213/32 \
- disabled=yes name=XXXXXX-snmp-community-little-things-come-true
- /system logging action
- set 3 remote=192.168.100.201 src-address=192.168.100.254
- /user group
- set read policy="local,reboot,read,test,winbox,password,sniff,!telnet,!ssh,!ft\
- p,!write,!policy,!web,!sensitive,!api,!romon,!dude,!tikapp"
- set write policy="local,ssh,reboot,read,write,test,winbox,password,sniff,sensi\
- tive,romon,tikapp,!telnet,!ftp,!policy,!web,!api,!dude"
- /caps-man manager
- set ca-certificate=auto certificate=auto
- /caps-man manager interface
- set [ find default=yes ] forbid=yes
- add disabled=no interface=bridge1
- /caps-man provisioning
- add action=create-dynamic-enabled master-configuration=XXXXXX
- /interface bridge port
- add bridge=bridge1 interface=ether2
- add bridge=bridge1 interface=ether3
- add bridge=bridge1 interface=ether4
- add bridge=bridge1 interface=ether5
- add bridge=bridge1 interface=ether8
- add bridge=bridge1 interface=ether6
- add bridge=bridge1 interface=ether1
- /interface bridge settings
- set use-ip-firewall=yes
- /ip neighbor discovery-settings
- set discover-interface-list=none protocol=""
- /ip settings
- set tcp-syncookies=yes
- /interface l2tp-server server
- set allow-fast-path=yes default-profile=default enabled=yes use-ipsec=\
- required
- /interface ovpn-server server
- set auth=sha1 certificate=server-certificate cipher=\
- blowfish128,aes128,aes192,aes256 default-profile=XXXXXX enabled=yes \
- require-client-certificate=yes
- /interface pptp-server server
- set default-profile=default
- /ip address
- add address=192.168.100.254/24 comment=XXXXXX interface=bridge1 network=\
- 192.168.100.0
- add address=XXXXXX/30 interface=ether7 network=XXXXXX
- add address=192.168.253.254/24 comment="XXXXXX" interface=\
- "XXXXXX" network=192.168.253.0
- add address=192.168.254.254/24 comment=XXXXXX interface=bridge1 network=\
- 192.168.254.0
- add address=XXXXXX/29 comment="XXXXXX XXXXXX XXXXXX" interface=sfp1 network=\
- XXXXXX
- add address=XXXXXX/30 interface=sfp1 network=XXXXXX
- add address=192.168.253.254/24 interface=XXXXXX" network=192.168.253.0
- add address=192.168.248.254/24 interface="XXXXXX" network=192.168.248.0
- add address=192.168.253.254/24 interface="XXXXXX" network=192.168.253.0
- add address=192.168.249.254/24 interface="XXXXXX" network=192.168.249.0
- add address=192.168.253.254/24 interface="XXXXXX" network=192.168.253.0
- add address=XXXXXX/29 interface=sfp1 network=XXXXXX
- add address=192.168.252.254/24 comment=XXXXXX interface=bridge1 network=\
- 192.168.252.0
- add address=XXXXXX/29 interface=sfp1 network=XXXXXX
- add address=192.168.251.254/24 comment="XXXXXX" interface=bridge1 \
- network=192.168.251.0
- add address=XXXXXX/29 interface=sfp1 network=XXXXXX
- add address=192.168.249.254/24 interface="XXXXXX" network=192.168.249.0
- add address=192.168.247.254/24 comment="XXXXXX" interface=\
- "Kosova 1.1" network=192.168.247.0
- add address=192.168.249.254/24 interface="XXXXXX" network=192.168.249.0
- add address=192.168.250.254/24 comment=XXXXXX interface=bridge1 \
- network=192.168.250.0
- add address=10.124.231.129/26 comment="XXXXXX" interface=ether6 \
- network=10.124.231.128
- add address=192.168.249.254/24 interface="XXXXXX" network=192.168.249.0
- add address=XXXXXX/29 comment="XXXXXX" interface=ether7 \
- network=XXXXXX
- add address=XXXXXX/29 interface=ether7 network=XXXXXX
- add address=192.168.244.254/24 comment=LAN-DHCP interface=bridge1 network=\
- 192.168.244.0
- add address=XXXXXX/29 interface=ether7 network=XXXXXX
- add address=XXXXXX/29 interface=ether7 network=XXXXXX
- add address=192.168.247.254/24 interface="XXXXXX 1.2" network=192.168.247.0
- add address=192.168.248.254/24 interface="XXXXXX 1.2" network=192.168.248.0
- add address=192.168.247.254/24 interface="XXXXXX 2.1" network=192.168.247.0
- add address=192.168.247.254/24 interface="XXXXXX 2.2" network=192.168.247.0
- add address=192.168.248.254/24 interface="XXXXXX 2.1" network=192.168.248.0
- add address=192.168.248.254/24 interface="XXXXXX 2.2" network=192.168.248.0
- add address=192.168.241.254/24 comment=XXXXXX interface=bridge1 \
- network=192.168.241.0
- /ip cloud
- set update-time=no
- /ip dhcp-relay
- add dhcp-server=192.168.100.200 disabled=no interface=bridge1 name=XXXXXX
- /ip dhcp-server network
- add address=192.168.100.0/24 dns-server=192.168.100.254,192.168.100.200 \
- domain=XXXXXXXXXXXX gateway=192.168.100.254
- add address=192.168.244.0/24 dns-server=192.168.100.200,1.1.1.3 domain=\
- XXXXXXXXXXXX gateway=192.168.244.254
- add address=192.168.250.0/24 dns-server=\
- 192.168.100.201,192.168.250.254,8.8.8.8 domain=XXXXXX gateway=\
- 192.168.250.254
- add address=192.168.251.0/24 dns-server=\
- 192.168.100.201,192.168.251.254,8.8.8.8 domain=XXXXXX gateway=\
- 192.168.251.254
- add address=192.168.252.0/24 dns-server=\
- 192.168.100.201,192.168.252.254,8.8.8.8 domain=XXXXXX gateway=\
- 192.168.252.254
- /ip dns
- set servers=1.1.1.3,192.168.100.200
- /ip dns static
- add address=192.168.100.201 name=XXXXXX
- add address=192.168.11.5 name=XXXXXX
- add address=192.168.252.207 name=XXXXXX
- add address=192.168.100.208 name=XXXXXX
- /ip firewall address-list
- add address=217.160.0.227 list=Website
- /ip firewall filter
- add action=drop chain=forward log=yes log-prefix="[XXXXXX]" \
- src-address=XXXXXX
- add action=accept chain=input comment=\
- "Accept Related or Established Connections" connection-state=\
- established,related
- add action=accept chain=input comment=XXXXXX disabled=yes src-address=\
- XXXXXX/20
- add action=drop chain=forward comment="XXXXXX" \
- add action=accept chain=input disabled=yes src-address=XXXXXX/23
- dst-address=192.168.100.200 src-address=192.168.244.200/31
- add action=drop chain=forward dst-address=192.168.244.200-192.168.100.201 \
- src-address=192.168.100.200
- add action=accept chain=forward dst-address=192.168.244.201 src-address=\
- 192.168.244.200
- add action=accept chain=forward dst-address=192.168.244.200 src-address=\
- 192.168.244.201
- add action=drop chain=forward dst-address=192.168.244.200/31 src-address=\
- 192.168.240.0/20
- add action=accept chain=forward comment="XXXXXXXXX" dst-address=\
- XXXXXXX dst-port=5060 log-prefix="XXXXXXX" \
- protocol=udp src-address=192.168.100.2
- add action=accept chain=forward dst-address=192.168.100.2 dst-port=5060 \
- log-prefix="XXXXXX" protocol=udp src-address=\
- XXXXXXX
- add action=drop chain=forward comment="XXXXXXX" dst-address=\
- 192.168.100.220 dst-port=8006,22 log=yes protocol=tcp src-address=\
- !192.168.100.213-192.168.100.216
- add action=accept chain=forward comment="XXXXXX" dst-address=\
- 192.168.100.200/31 dst-port=3389 log=yes log-prefix=\
- "[XXXXXXXX]" protocol=tcp src-address=\
- 192.168.100.153
- add action=drop chain=forward dst-address=192.168.100.200/31 dst-port=3389 \
- log=yes log-prefix="[XXXXXXX]" protocol=tcp \
- src-address=!192.168.100.213-192.168.100.216
- add action=accept chain=forward comment=\
- "XXXXXXX (Disable last rule if upgrading)" dst-address=\
- 192.168.100.202 dst-port=1514,1515,55000 protocol=tcp
- add action=accept chain=forward dst-address=192.168.100.202 dst-port=443,22 \
- protocol=tcp src-address=192.168.100.213-192.168.100.216
- add action=drop chain=forward dst-address=192.168.100.202 log-prefix=\
- "[XXXXXX"
- add action=accept chain=forward comment="XXXXXXXXX" \
- dst-address=192.168.240.0/20 port=7680,22551,22543,443,3389 protocol=tcp \
- src-address=192.168.240.0/20
- add action=accept chain=forward dst-address=192.168.240.0/20 port=22551,22543 \
- protocol=udp src-address=192.168.240.0/20
- add action=drop chain=forward dst-address=192.168.240.0/20 src-address=\
- 192.168.240.0/20
- add action=drop chain=forward comment="XXXXXXX" dst-address=\
- 192.168.100.204 dst-port=9090,9091 protocol=tcp src-address=\
- !192.168.100.213-192.168.100.214
- add action=drop chain=forward dst-address=192.168.100.204 dst-port=22 \
- protocol=tcp src-address=!192.168.100.213-192.168.100.214
- add action=accept chain=forward comment="XXXXXXXX" \
- dst-address=192.168.100.209 src-address=192.168.241.1-192.168.241.6
- add action=accept chain=forward dst-address=192.168.100.208/31 dst-port=22 \
- protocol=tcp src-address=192.168.100.213-192.168.100.216
- add action=drop chain=forward dst-address=192.168.100.209
- add action=accept chain=input comment="XXXXXXX" src-address=\
- .XXXXXXX
- add action=accept chain=forward src-address=XXXXXX
- add action=accept chain=input comment="XXXXXXX" src-address=\
- XXXXXXX
- add action=accept chain=forward src-addressXXXXXX
- add action=drop chain=input comment=\
- "Drop ICMP Broadcast to prevent ICMP Spoofing" dst-address-type=broadcast \
- protocol=icmp
- add action=drop chain=input comment="Drop Packets from Port Scanners" \
- src-address-list=portscan
- add action=jump chain=input jump-target=port-scan protocol=tcp
- add action=add-src-to-address-list address-list=portscan \
- address-list-timeout=4w chain=port-scan protocol=tcp psd=21,3s,3,1
- add action=add-src-to-address-list address-list=portscan \
- address-list-timeout=4w chain=port-scan protocol=tcp psd=23,3s,3,1
- add action=add-src-to-address-list address-list=portscan \
- address-list-timeout=4w chain=port-scan protocol=tcp psd=179,3s,3,1
- add action=add-src-to-address-list address-list=portscan \
- address-list-timeout=4w chain=port-scan protocol=tcp psd=5555,3s,3,1
- add action=return chain=port-scan
- add action=drop chain=input comment=DDOS connection-state=invalid
- add action=jump chain=forward connection-state=new jump-target=dedect-dodos
- add action=add-src-to-address-list address-list=block-doss \
- address-list-timeout=2w1d chain=input connection-limit=32,32 protocol=tcp
- add action=tarpit chain=input connection-limit=3,32 protocol=tcp \
- src-address-list=block-doss
- add action=drop chain=input comment="SSH Blacklist Enforcement" \
- src-address-list="Black List (SSH)"
- add action=jump chain=input jump-target="TSG SSH Chain"
- add action=add-src-to-address-list address-list="Black List (SSH)" \
- address-list-timeout=none-dynamic chain="TSG SSH Chain" connection-state=\
- new dst-port=22 protocol=tcp src-address-list="SSH Stage 3"
- add action=add-src-to-address-list address-list="SSH Stage 3" \
- address-list-timeout=none-dynamic chain="TSG SSH Chain" connection-state=\
- new dst-port=22 protocol=tcp src-address-list="SSH Stage 2"
- add action=add-src-to-address-list address-list="SSH Stage 2" \
- address-list-timeout=2w1d1m chain="TSG SSH Chain" connection-state=new \
- dst-port=22 protocol=tcp src-address-list="SSH Stage 1"
- add action=add-src-to-address-list address-list="SSH Stage 1" \
- address-list-timeout=2w1d1m chain="TSG SSH Chain" connection-state=new \
- dst-port=22 protocol=tcp
- add action=return chain="TSG SSH Chain"
- add action=drop chain=input comment="Telnet Blacklist Enforcement" \
- src-address-list="Black List (Telnet)"
- add action=jump chain=input jump-target="TSG Telnet Chain"
- add action=add-src-to-address-list address-list="Black List (Telnet)" \
- address-list-timeout=none-dynamic chain="TSG Telnet Chain" \
- connection-state=new dst-port=23 protocol=tcp src-address-list=\
- "Telnet Stage 3"
- add action=add-src-to-address-list address-list="Telnet Stage 3" \
- address-list-timeout=2w1d1m chain="TSG Telnet Chain" connection-state=new \
- dst-port=23 protocol=tcp src-address-list="Telnet Stage 2"
- add action=add-src-to-address-list address-list="Telnet Stage 2" \
- address-list-timeout=2w1d1m chain="TSG Telnet Chain" connection-state=new \
- dst-port=23 protocol=tcp src-address-list="Telnet Stage 1"
- add action=add-src-to-address-list address-list="Telnet Stage 1" \
- address-list-timeout=2w1d1m chain="TSG Telnet Chain" connection-state=new \
- dst-port=23 protocol=tcp
- add action=return chain="TSG Telnet Chain" connection-state=new
- /ip firewall mangle
- add action=mark-routing chain=prerouting comment="XXXXXXX" \
- disabled=yes new-routing-mark=FreePBX passthrough=yes src-address=\
- 192.168.100.2
- add action=mark-routing chain=prerouting comment="XXXXXXX" disabled=\
- yes new-routing-mark="251 Subnet" passthrough=yes src-address=\
- 192.168.251.0/24
- add action=mark-routing chain=prerouting comment="XXXXXXX" disabled=\
- yes new-routing-mark="252 Subnet" passthrough=yes src-address=\
- 192.168.252.0/24
- add action=mark-routing chain=prerouting new-routing-mark=XXXXXX passthrough=\
- yes src-address=192.168.100.213
- /ip firewall nat
- add action=dst-nat chain=dstnat comment="WireGuard Forwarding" dst-address=\
- XXXXXX dst-port=13231 log=yes protocol=udp to-addresses=\
- 192.168.100.153 to-ports=13231
- add action=dst-nat chain=dstnat comment="XXXXXX 500 XXXXXX" dst-port=500 \
- in-interface=sfp1 log=yes log-prefix="XXXXXX VPN Nat Rule" protocol=\
- udp src-address=XXXXXX to-addresses=192.168.251.100 to-ports=500
- add action=dst-nat chain=dstnat comment="XXXXXX 4500 XXXXXX" dst-port=4500 \
- in-interface=sfp1 log=yes log-prefix="XXXXXX VPN Nat Rule" protocol=\
- udp src-address=XXXXXX to-addresses=192.168.251.100 to-ports=4500
- add action=dst-nat chain=dstnat comment="XXXXXX XXXXXX" dst-port=500 \
- in-interface=ether7 log=yes log-prefix="XXXXXX VPN Nat Rule" protocol=\
- udp src-address=XXXXXX to-addresses=192.168.251.100 to-ports=500
- add action=dst-nat chain=dstnat comment="XXXXXX XXXXXX" dst-port=4500 \
- in-interface=ether7 log=yes log-prefix="XXXXXX VPN Nat Rule" protocol=\
- udp src-address=XXXXXX to-addresses=192.168.251.100 to-ports=4500
- add action=masquerade chain=srcnat comment=XXXXXX out-interface=sfp1 \
- src-address=!XXXXXXXX/29
- add action=masquerade chain=srcnat comment=XXXXXX out-interface=ether7
- /ip firewall service-port
- set ftp disabled=yes
- set tftp disabled=yes
- set irc disabled=yes
- set h323 disabled=yes
- set sip disabled=yes
- set pptp disabled=yes
- set udplite disabled=yes
- set dccp disabled=yes
- set sctp disabled=yes
- /ip proxy
- set src-address=192.168.101.222
- /ip route
- add check-gateway=ping comment=WAN1 distance=1 gateway=XXXXXXXX
- add check-gateway=ping comment=WAN2 distance=2 gateway=XXXXXXXX
- add distance=1 dst-address=192.168.0.0/24 gateway=192.168.100.153
- add distance=1 dst-address=192.168.11.0/24 gateway=192.168.251.100
- /ip service
- set telnet disabled=yes
- set ftp disabled=yes
- set www address=192.168.100.213/32 disabled=yes
- set ssh disabled=yes
- set api disabled=yes
- set winbox address=
- set api-ssl disabled=yes
- /ip smb
- set allow-guests=no
- /ip ssh
- set forwarding-enabled=remote strong-crypto=yes
- /ip traffic-flow
- set cache-entries=1k
- /ip traffic-flow target
- add dst-address=192.168.100.213 port=9999
- /snmp
- set contact=XXXXX@XXXXXXXXXXX location=Lab trap-generators=interfaces \
- trap-interfaces=all trap-version=2
- /system clock
- set time-zone-name=Europe/XXXXX
- /system identity
- set name="XXXXXX Main Router"
- /system leds
- set 0 leds="" type=interface-speed
- add leds="" type=interface-activity
- add interface=sfp1 leds="" type=interface-activity
- add interface=ether7 leds="" type=interface-activity
- /system logging
- set 0 topics=firewall
- set 1 disabled=yes
- set 2 prefix="[Main Router Warning]" topics=warning,dhcp
- set 3 action=disk
- add prefix="[Main Router Interface Problem]" topics=interface
- add disabled=yes topics=ovpn,debug
- add disabled=yes topics=l2tp,ppp
- add disabled=yes topics=caps
- /system note
- set note="Unauthorized access to this device is prohibited."
- /system ntp client
- set enabled=yes server-dns-names=\
- 0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org,3.pool.ntp.org
- /system scheduler
- add name=Reboot on-event="/system reboot" policy=reboot start-date=\
- jun/08/2024 start-time=05:00:00
- add interval=1w name="Automatic Backup" on-event=Backup policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
- start-date=aug/05/2024 start-time=09:30:00
- /system script
- add dont-require-permissions=no name=Backup owner=XXXXX policy=\
- ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":\
- global date ([:pick [/system clock get date] 0 3] . [:pick [/system clock \
- get date] 4 6] . [:pick [/system clock get date] 7 11]);\r\
- \n:global time ([:pick [/system clock get time] 0 9]);\r\
- \n:local fileName ([/system identity get name].\"_\".\$date.\"_\".\$time.\
- \".rsc\")\r\
- \n:local rsc \$fileName\r\
- \n/export file=\$rsc;"
- /system watchdog
- set watchdog-timer=no
- /tool bandwidth-server
- set enabled=no
- /tool e-mail
- set address=XXXXXX from=XXXX@XXXXXXXXXXXX port=587 start-tls=\
- yes user=XXXX@XXXXXXXXXXXX
- /tool graphing
- set store-every=hour
- /tool graphing interface
- add allow-address=192.168.100.213/32
- /tool mac-server
- set allowed-interface-list=none
- /tool mac-server mac-winbox
- set allowed-interface-list=none
- /tool mac-server ping
- set enabled=no
Advertisement
Add Comment
Please, Sign In to add comment