# nov/11/2018 19:28:15 by RouterOS 6.43.4
# software id =
#
# model = 2011UiAS-2HnD
# serial number =
/interface bridge
add fast-forward=no name=BRIDGE
/interface ethernet
set [ find default-name=ether5 ] name=Duo speed=100Mbps
set [ find default-name=ether6 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full name=Epson
set [ find default-name=ether1 ] disabled=yes name=G1 speed=100Mbps
set [ find default-name=ether2 ] disabled=yes name=G2 speed=100Mbps
set [ find default-name=ether3 ] disabled=yes name=G3 speed=100Mbps
set [ find default-name=ether9 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full name=HP
set [ find default-name=ether4 ] name=NetGear speed=100Mbps
set [ find default-name=sfp1 ] disabled=yes name=Optika
set [ find default-name=ether8 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full name=Panasonic
set [ find default-name=ether10 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full name=ZYXEL poe-out=off
set [ find default-name=ether7 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full name=eGreat
/interface pppoe-client
add add-default-route=yes disabled=no interface=ZYXEL keepalive-timeout=disabled max-mru=1492 max-mtu=1492 name=WIA password= use-peer-dns=yes user=
/interface wireless
set [ find default-name=wlan1 ] ampdu-priorities=0,1,2,3,4,5,6,7 band=2ghz-b/g/n country="czech republic" disabled=no distance=indoors frequency=2437 frequency-mode=regulatory-domain mode=ap-bridge name=WLAN ssid=TEST wireless-protocol=802.11 wmm-support=enabled wps-mode=disabled
/interface list
add name=BRIDGELIST
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk disable-pmkid=yes eap-methods="" mode=dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key= wpa2-pre-shared-key=
add authentication-types=wpa-psk,wpa2-psk disable-pmkid=yes eap-methods="" mode=static-keys-required name=legacy static-algo-0=40bit-wep static-key-0= supplicant-identity=""
/interface wireless
add default-forwarding=no keepalive-frames=disabled mac-address= master-interface=WLAN multicast-buffering=disabled name=VWLAN security-profile=legacy ssid=legacy wds-cost-range=0 wds-default-cost=0 wps-mode=disabled
/ip pool
add name=Pool ranges=192.168.242.51-192.168.242.100
add name=PoolL ranges=192.168.241.1-192.168.241.50
/ip dhcp-server
add add-arp=yes address-pool=Pool authoritative=after-2sec-delay disabled=no interface=BRIDGE lease-time=3d name=DHCP
add add-arp=yes address-pool=PoolL authoritative=after-2sec-delay disabled=no interface=VWLAN lease-time=3d name=DHCPL
/port
set 0 name=Serial
/snmp community
set [ find default=yes ] addresses=0.0.0.0/0
/interface bridge port
add bridge=BRIDGE interface=WLAN
add bridge=BRIDGE interface=G1
add bridge=BRIDGE interface=Epson
add bridge=BRIDGE interface=G2
add bridge=BRIDGE interface=G3
add bridge=BRIDGE interface=Duo
add bridge=BRIDGE interface=eGreat
add bridge=BRIDGE interface=Panasonic
add bridge=BRIDGE interface=HP
add bridge=BRIDGE interface=NetGear
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add interface=BRIDGE list=LAN
add interface=BRIDGE list=BRIDGELIST
add interface=ZYXEL list=LAN
add interface=VWLAN list=LAN
/interface wireless access-list
add comment=Kamera interface=WLAN mac-address= vlan-mode=no-tag
add comment=Aligator interface=WLAN mac-address= vlan-mode=no-tag
add comment=Kindle interface=WLAN mac-address= vlan-mode=no-tag
add comment=Venue interface=WLAN mac-address= vlan-mode=no-tag
add comment=D505 interface=WLAN mac-address= vlan-mode=no-tag
add comment=D505 forwarding=no interface=VWLAN mac-address= vlan-mode=no-tag
add comment=Armada forwarding=no interface=VWLAN mac-address= vlan-mode=no-tag
add authentication=no comment="Reject the rest" forwarding=no vlan-mode=no-tag
/ip address
add address=192.168.242.254/24 interface=BRIDGE network=192.168.242.0
add address=192.168.240.254/24 interface=ZYXEL network=192.168.240.0
add address=192.168.241.254/24 interface=VWLAN network=192.168.241.0
/ip cloud
set update-time=no
/ip dhcp-server lease
add address=192.168.242.55 mac-address= server=DHCP
add address=192.168.242.60 mac-address= server=DHCP
/ip dhcp-server network
add address=192.168.241.0/24 dns-server=192.168.241.254,8.8.8.8,208.67.222.222,208.67.220.220 gateway=192.168.241.254 netmask=24
add address=192.168.242.0/24 dns-server=192.168.242.254,8.8.8.8,208.67.222.222,208.67.220.220 gateway=192.168.242.254 netmask=24 wins-server=192.168.242.10
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,208.67.222.222,208.67.220.220
/ip dns static
add address=208.67.222.222 name=OpenDNS1
add address=208.67.220.220 name=OpenDNS2
/ip firewall address-list
add address=A.B.C.D comment=Internet list=public-add
add address=192.168.242.0/24 comment=LAN list=internal-nets
add address=192.168.240.0/24 comment=Zyxel list=internal-nets
add address=192.168.241.0/24 comment="Legacy Wifi" list=internal-nets
add address=0.0.0.0/8 comment="RFC6890 Self-Identification - This host on this network" list=not_in_internet
add address=127.0.0.0/8 comment="RFC6890 Loopback" list=not_in_internet
add address=169.254.0.0/16 comment="RFC6890 Link Local" list=not_in_internet
add address=10.0.0.0/8 comment="RFC6890 Private - CLASS A" list=not_in_internet
add address=172.16.0.0/12 comment="RFC6890 Private - CLASS B" list=not_in_internet
add address=192.168.0.0/16 comment="RFC6890 Private - CLASS C" disabled=yes list=not_in_internet
add address=224.0.0.0/4 comment="Multicast, Class D, IANA" list=not_in_internet
add address=192.0.2.0/24 comment="RFC6890 Reserved - IANA - TestNet1" list=not_in_internet
add address=198.51.100.0/24 comment="RFC6890 Reserved - IANA - TestNet2" list=not_in_internet
add address=203.0.113.0/24 comment="RFC6890 Reserved - IANA - TestNet3" list=not_in_internet
add address=192.88.99.0/24 comment="RFC6890 6to4 Relay Anycast" list=not_in_internet
add address=198.18.0.0/15 comment="RFC6890 Network Interconnect Device Benchmark Testing" list=not_in_internet
add address=100.64.0.0/10 comment="RFC6890 Shared Address Space" list=not_in_internet
add address=192.0.0.0/24 comment="RFC6890 Reserved - IANA - IETF Protocol Assignments" list=not_in_internet
add address=240.0.0.0/4 comment="RFC6890 Reserved for Future Use" list=not_in_internet
add address=91.121.109.209 comment=TALOS list=DROPDDOS
add address=217.12.202.40 comment=TALOS list=DROPDDOS
add address=94.242.222.68 comment=TALOS list=DROPDDOS
add address=82.118.242.124 comment=TALOS list=DROPDDOS
add address=46.151.209.33 comment=TALOS list=DROPDDOS
add address=217.79.179.14 comment=TALOS list=DROPDDOS
add address=91.214.203.144 comment=TALOS list=DROPDDOS
add address=95.211.198.231 comment=TALOS list=DROPDDOS
add address=195.154.180.60 comment=TALOS list=DROPDDOS
add address=5.149.250.54 comment=TALOS list=DROPDDOS
add address=91.200.13.76 comment=TALOS list=DROPDDOS
add address=94.185.80.82 comment=TALOS list=DROPDDOS
add address=62.210.180.229 comment=TALOS list=DROPDDOS
/ip firewall filter
add action=jump chain=input comment="Accept up to 5 pings in 5 seconds and jump for ICMP input flow" jump-target=ICMP limit=5/5s,1 protocol=icmp
add action=add-src-to-address-list address-list=icmp-attack address-list-timeout=12h chain=input comment="Add all other ICMP input into icmp-attack address list" in-interface=WIA protocol=icmp
add action=drop chain=input comment="Drop excessive ICMP traffic" protocol=icmp src-address-list=icmp-attack
add chain=input comment="Established, Related" connection-state=established,related
add action=drop chain=input comment="Drop invalid" connection-state=invalid
add action=accept chain=input comment="From LAN" in-interface=!WIA src-address-list=internal-nets
add action=accept chain=input comment="Allow DHCP" dst-port=67 in-interface=BRIDGE protocol=udp src-port=68
add action=tarpit chain=input comment="Tarpit port-scan address list" protocol=tcp src-address-list=port-scan
add action=drop chain=input comment="Drop port-scan address list" src-address-list=port-scan
add action=add-src-to-address-list address-list=port-scan address-list-timeout=2w chain=input comment="Add port scannes to port-scan list" in-interface=WIA protocol=tcp psd=21,3s,3,1 src-address-list=!internal-nets
add action=add-src-to-address-list address-list=port-scan address-list-timeout=2w chain=input comment="NMAP FIN Stealth scan" protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg
add action=add-src-to-address-list address-list=port-scan address-list-timeout=2w chain=input comment="SYN/FIN scan" protocol=tcp tcp-flags=fin,syn
add action=add-src-to-address-list address-list=port-scan address-list-timeout=2w chain=input comment="SYN/RST scan" protocol=tcp tcp-flags=syn,rst
add action=add-src-to-address-list address-list=port-scan address-list-timeout=2w chain=input comment="FIN/PSH/URG scan" protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack
add action=add-src-to-address-list address-list=port-scan address-list-timeout=2w chain=input comment="ALL/ALL scan" protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg
add action=add-src-to-address-list address-list=port-scan address-list-timeout=2w chain=input comment="NMAP NULL scan" protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg
add action=drop chain=input comment="Drop syn-flood address list" src-address-list=syn-flood
add action=add-src-to-address-list address-list=syn-flood address-list-timeout=30m chain=input comment="Add Syn Flooders to syn-flood address list" connection-limit=30,32 protocol=tcp tcp-flags=syn
add action=drop chain=input comment="Avoid spammers action" dst-port=25,587 protocol=tcp src-address-list=spammers
add action=add-src-to-address-list address-list=spammers address-list-timeout=3h chain=input comment="Add Spammers to the list for 3 hours" connection-limit=30,32 dst-port=25,587 limit=30/1m,0 protocol=tcp
add action=drop chain=input comment="TCP flags and Port 0 attacks" protocol=tcp tcp-flags=!fin,!syn,!rst,!ack
add action=drop chain=input comment="Drop FIN,SYN" protocol=tcp tcp-flags=fin,syn
add action=drop chain=input comment="Drop FIN,RST" protocol=tcp tcp-flags=fin,rst
add action=drop chain=input comment="Drop FIN,!ACK" protocol=tcp tcp-flags=fin,!ack
add action=drop chain=input comment="Drop FIN,URG" protocol=tcp tcp-flags=fin,urg
add action=drop chain=input comment="Drop SYN,RST" protocol=tcp tcp-flags=syn,rst
add action=drop chain=input comment="Drop RST,URG" protocol=tcp tcp-flags=rst,urg
add action=drop chain=input comment="Drop src Port 0 TCP" protocol=tcp src-port=0
add action=drop chain=input comment="Drop dst Port 0 TCP" dst-port=0 protocol=tcp
add action=drop chain=input comment="Drop src Port 0 UDP" protocol=udp src-port=0
add action=drop chain=input comment="Drop dst Port 0 UDP" dst-port=0 protocol=udp
add action=drop chain=input comment="Drop DNS queries from the internet" dst-port=53 in-interface=WIA protocol=udp
add action=drop chain=input comment="Drop DNS queries from the internet" dst-port=53 in-interface=WIA protocol=tcp
add action=drop chain=input comment="Drop all packets which are not destined to routers IP address" dst-address-type=!local log=yes log-prefix="Not for router"
add action=drop chain=input comment="Drop all packets which don't have unicast source IP address" src-address-type=!unicast
add action=drop chain=input comment="Drop RFC6890 and multicast inbound" in-interface=WIA src-address-list=not_in_internet
add action=drop chain=input comment="Drop our addressing inbound - spoofed" in-interface=WIA src-address-list=public-add
add action=drop chain=input comment="Drop all access to the winbox - except list" dst-port=8291 log=yes log-prefix="Winbox attack" protocol=tcp src-address-list=!internal-nets
add action=drop chain=input comment=DROPDDOS src-address-list=DROPDDOS
add action=drop chain=input comment="Drop new from WIA" connection-state=new in-interface=WIA log-prefix="Drop new"
add action=log chain=input comment="Log everything else" log-prefix=Log
add action=drop chain=input comment="Drop everything else" disabled=yes
add action=jump chain=forward comment="Jump for ICMP forward flow" jump-target=ICMP protocol=icmp
add chain=forward comment="Established, Related" connection-state=established,related
add action=drop chain=forward comment="Drop invalid" connection-state=invalid
add action=accept chain=forward comment="From LAN" in-interface=!WIA src-address-list=internal-nets
add action=drop chain=forward comment="Drop port-scan address list" src-address-list=port-scan
add action=drop chain=forward comment="Drop RFC6890 and multicast inbound" in-interface=WIA src-address-list=not_in_internet
add action=drop chain=forward comment="Drop our addressing inbound - spoofed" in-interface=WIA src-address-list=public-add
add action=drop chain=forward comment="Drop tries to reach not public addresses from LAN" dst-address-list=not_in_internet in-interface-list=LAN log=yes log-prefix=!public_from_LAN out-interface-list=!LAN
add action=drop chain=forward comment="Drop packets from LAN that do not have LAN IP" in-interface=BRIDGE log=yes log-prefix=LAN_!LAN src-address=!192.168.242.0/24
add action=drop chain=forward comment="Drop packets from ZYXEL that do not have ZYXEL IP" in-interface=ZYXEL log=yes log-prefix=LAN_!LAN src-address=!192.168.240.0/24
add action=drop chain=forward comment="Drop packets from VWLAN that do not have VWLAN IP" disabled=yes in-interface=VWLAN log=yes log-prefix=LAN_!LAN src-address=!192.168.241.0/24
add action=drop chain=forward comment="Drop incoming packets that are not NATted" connection-nat-state=!dstnat connection-state=new in-interface=WIA log=yes log-prefix=!NAT
add action=drop chain=forward comment="Avoid spammers action" dst-port=25,587 protocol=tcp src-address-list=spammers
add action=add-src-to-address-list address-list=spammers address-list-timeout=3h chain=forward comment="Add Spammers to the list for 3 hours" connection-limit=30,32 dst-port=25,587 limit=30/1m,0 protocol=tcp
add action=drop chain=forward comment="TCP flags and Port 0 attacks" protocol=tcp tcp-flags=!fin,!syn,!rst,!ack
add action=drop chain=forward comment="Drop FIN,SYN" protocol=tcp tcp-flags=fin,syn
add action=drop chain=forward comment="Drop FIN,RST" protocol=tcp tcp-flags=fin,rst
add action=drop chain=forward comment="Drop FIN,!ACK" protocol=tcp tcp-flags=fin,!ack
add action=drop chain=forward comment="Drop FIN,URG" protocol=tcp tcp-flags=fin,urg
add action=drop chain=forward comment="Drop SYN,RST" protocol=tcp tcp-flags=syn,rst
add action=drop chain=forward comment="Drop RST,URG" protocol=tcp tcp-flags=rst,urg
add action=drop chain=forward comment="Drop src Port 0 TCP" protocol=tcp src-port=0
add action=drop chain=forward comment="Drop dst Port 0 TCP" dst-port=0 protocol=tcp
add action=drop chain=forward comment="Drop src Port 0 UDP" protocol=udp src-port=0
add action=drop chain=forward comment="Drop dst Port 0 UDP" dst-port=0 protocol=udp
add action=drop chain=forward comment="Drop bogon list" dst-address-list=not_in_internet
add action=drop chain=forward comment=DROPDDOS src-address-list=DROPDDOS
add action=drop chain=forward comment="Drop Windows ports" port=135-139 protocol=tcp
add action=log chain=forward comment="Drop new from WIA" connection-state=new in-interface=WIA log-prefix="Log new"
add action=log chain=forward comment="Log everything else" log-prefix=Log
add action=drop chain=forward comment="Drop everything else" disabled=yes
add chain=output comment="Established, Related" connection-state=established,related
add action=drop chain=output comment="Drop invalid" connection-state=invalid
add action=jump chain=output comment="Jump for ICMP output flow" jump-target=ICMP protocol=icmp
add chain=output comment="DNS query" dst-port=53 out-interface=WIA protocol=tcp
add chain=output comment="DNS query" dst-port=53 out-interface=WIA protocol=udp
add chain=output comment="NTP query" dst-port=123 out-interface=WIA protocol=udp
add action=log chain=output comment="Log everything else" log-prefix=Log
add action=drop chain=output comment="Drop everything else" disabled=yes
add action=drop chain=ICMP comment="Drop excessive ICMP traffic" protocol=icmp src-address-list=icmp-attack
add chain=ICMP comment="Echo reply" icmp-options=0:0 protocol=icmp
add chain=ICMP comment="Net unreachable" icmp-options=3:0 protocol=icmp
add chain=ICMP comment="Host unreachable" icmp-options=3:1 protocol=icmp
add chain=ICMP comment="Host unreachable fragmentation required" icmp-options=3:4 protocol=icmp
add chain=ICMP comment="Allow source quench" icmp-options=4:0 protocol=icmp
add chain=ICMP comment="Allow echo request" icmp-options=8:0 protocol=icmp
add chain=ICMP comment="Allow time exceed" icmp-options=11:0 protocol=icmp
add chain=ICMP comment="Allow parameter bad" icmp-options=12:0 protocol=icmp
add action=drop chain=ICMP comment="Drop all other types"
/ip firewall nat
add action=masquerade chain=srcnat out-interface=WIA
add action=masquerade chain=srcnat disabled=yes out-interface=WIA src-address=192.168.242.0/24
add action=masquerade chain=srcnat disabled=yes out-interface=WIA src-address=192.168.241.0/24
add action=masquerade chain=srcnat disabled=yes out-interface=WIA src-address=192.168.240.0/24
/ip service
set telnet address=192.168.242.0/24 disabled=yes
set ftp address=192.168.242.0/24 disabled=yes
set www address=192.168.242.0/24
set ssh address=192.168.242.0/24 disabled=yes
set www-ssl address=192.168.242.0/24
set api address=192.168.242.0/24 disabled=yes
set winbox address=192.168.242.0/24
set api-ssl address=192.168.242.0/24 disabled=yes
/ip smb
set allow-guests=no domain=
/ip ssh
set strong-crypto=yes
/lcd
set backlight-timeout=1h default-screen=interfaces read-only-mode=yes time-interval=hour
/lcd pin
set hide-pin-number=yes pin-number=
/lcd interface
set Optika disabled=yes
set G1 disabled=yes
set G2 disabled=yes
set G3 disabled=yes
set NetGear disabled=yes
set Duo disabled=yes
set Epson disabled=yes
set eGreat disabled=yes
set Panasonic disabled=yes
set HP disabled=yes
add interface=WIA
/lcd interface pages
set 0 interfaces=WIA,WLAN,ZYXEL
/system clock
set time-zone-name=Europe/Prague
/system identity
set name=RB2011
/system leds
add interface=WIA leds=sfp-led type=interface-activity
/system logging
add disabled=yes topics=pppoe
/system ntp client
set enabled=yes server-dns-names=cz.pool.ntp.org
/system routerboard settings
set silent-boot=no
/tool bandwidth-server
set enabled=no
/tool graphing interface
add allow-address=192.168.242.0/24 interface=WIA store-on-disk=no
add allow-address=192.168.242.0/24 interface=WLAN store-on-disk=no
/tool graphing resource
add allow-address=192.168.242.0/24 store-on-disk=no
/tool mac-server
set allowed-interface-list=BRIDGELIST
/tool mac-server mac-winbox
set allowed-interface-list=BRIDGELIST
/tool mac-server ping
set enabled=no