# model: RBD52G-5HacD2HnD # serial-number: HE508HMKMZF # firmware-type: ipq4000L # current-firmware: 6.48.6 # installed-version: 7.14.2 # # software id = CVQJ-A7Q7 # # model = RBD52G-5HacD2HnD # serial number = HE508HMKMZF /interface bridge add name=bridge1 port-cost-mode=short /interface wireless set [ find default-name=wlan1 ] ssid=MikroTik set [ find default-name=wlan2 ] country=no_country_set frequency-mode=superchannel scan-list=5000-6000 ssid=MikroTik /interface ethernet set [ find default-name=ether1 ] comment=Uplink set [ find default-name=ether2 ] comment=Iroda set [ find default-name=ether3 ] comment="masik iroda" set [ find default-name=ether5 ] comment=JNM /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 hotspot profile set [ find default=yes ] html-directory=hotspot /ip pool add name=dhcp_pool0 ranges=192.168.2.20-192.168.2.254 add name=dhcp_pool1 ranges=192.168.5.100-192.168.5.254 /ip dhcp-server add address-pool=dhcp_pool0 interface=bridge1 name=dhcp1 add address-pool=dhcp_pool1 interface=ether5 name=dhcp2 /queue simple add max-limit=50M/50M name=Wscope target=192.168.2.0/24 /snmp community set [ find default=yes ] addresses=86.109.64.0/27 /system logging action set 3 remote=86.109.64.16 /user group add name=backup policy="ssh,read,sensitive,!local,!telnet,!ftp,!reboot,!write,!policy,!test,!winbox,!password,!web,!sniff,!api,!romon,!rest-api" /interface bridge port add bridge=bridge1 ingress-filtering=no interface=ether2 internal-path-cost=10 path-cost=10 add bridge=bridge1 ingress-filtering=no interface=ether3 internal-path-cost=10 path-cost=10 add bridge=bridge1 ingress-filtering=no interface=ether4 internal-path-cost=10 path-cost=10 /ip firewall connection tracking set udp-timeout=10s /ip neighbor discovery-settings set discover-interface-list=!dynamic /ip settings set max-neighbor-entries=8192 /ipv6 settings set disable-ipv6=yes max-neighbor-entries=8192 /interface ovpn-server server set auth=sha1,md5 /ip address add address=86.109.72.54/30 interface=ether1 network=86.109.72.52 add address=192.168.2.1/24 interface=bridge1 network=192.168.2.0 add address=192.168.5.1/24 interface=ether5 network=192.168.5.0 /ip dhcp-server lease add address=192.168.2.2 client-id=1:48:a9:8a:3d:85:a4 mac-address=48:A9:8A:3D:85:A4 server=dhcp1 /ip dhcp-server network add address=192.168.2.0/24 gateway=192.168.2.1 add address=192.168.5.0/24 gateway=192.168.5.1 /ip dns set servers=86.109.64.5,86.109.64.66 /ip firewall address-list add address=86.109.64.0/27 list=support add address=10.0.0.0/8 list=support add address=86.109.64.0/19 comment="Ez torolheto" list=support add address=192.168.88.0/24 list=support /ip firewall filter add action=accept chain=input comment=telnet,ssh,ftp dst-port=21-23 protocol=tcp src-address-list=support add action=drop chain=input comment=telnet,ssh,ftp dst-port=21-23 protocol=tcp add action=accept chain=input comment="Bandwidth test" protocol=tcp src-address-list=support src-port=2000 add action=accept chain=input comment="Bandwidth test" dst-port=2000 protocol=tcp src-address-list=support add action=add-src-to-address-list address-list=Syn_Flooder address-list-timeout=30m chain=input comment="Add Syn Flood IP to the list" connection-limit=30,32 protocol=tcp tcp-flags=syn add action=drop chain=input comment="Drop to syn flood list" src-address-list=Syn_Flooder add action=add-src-to-address-list address-list=Port_Scanner address-list-timeout=1h chain=input comment="Port Scanner Detect" protocol=tcp psd=21,3s,3,1 add action=drop chain=input comment="Drop to port scan list" src-address-list=Port_Scanner add action=jump chain=input comment="Jump for icmp input flow" jump-target=ICMP protocol=icmp add action=add-src-to-address-list address-list=Port_Scanner address-list-timeout=1h 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_Scanner address-list-timeout=1h chain=input comment="SYN/FIN scan" protocol=tcp tcp-flags=fin,syn add action=add-src-to-address-list address-list=Port_Scanner address-list-timeout=1h chain=input comment="SYN/RST scan" protocol=tcp tcp-flags=syn,rst add action=add-src-to-address-list address-list=Port_Scanner address-list-timeout=1h 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_Scanner address-list-timeout=1h 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_Scanner address-list-timeout=1h chain=input comment="NMAP NULL scan" protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg add action=drop chain=input comment="Block all access to the winbox - except to support list # DO NOT ENABLE THIS RULE BEFORE ADD YOUR SUBNET IN THE SUPPORT ADDRESS LIST" dst-port=8291 protocol=tcp src-address-list=!support add action=accept chain=input comment="Accept to established connections" connection-state=established add action=accept chain=input comment="Accept to related connections" connection-state=related add action=accept chain=input comment="Full access to SUPPORT address list" src-address-list=support add action=accept chain=input dst-address=255.255.255.255 add action=log chain=input comment="Drop anything else! # DO NOT ENABLE THIS RULE BEFORE YOU MAKE SURE ABOUT ALL ACCEPT RULES YOU NEED" disabled=yes add action=drop chain=input comment="Drop anything else! # DO NOT ENABLE THIS RULE BEFORE YOU MAKE SURE ABOUT ALL ACCEPT RULES YOU NEED" add action=accept chain=ICMP comment="Echo request - Avoiding Ping Flood" icmp-options=8:0 limit=20,30:packet protocol=icmp add action=accept chain=ICMP comment="Echo reply" icmp-options=0:0 protocol=icmp add action=accept chain=ICMP comment="Time Exceeded" icmp-options=11:0 protocol=icmp add action=accept chain=ICMP comment="Destination unreachable" icmp-options=3:0-1 protocol=icmp add action=accept chain=ICMP comment=PMTUD icmp-options=3:4 protocol=icmp add action=drop chain=ICMP comment="Drop to the other ICMPs" protocol=icmp add action=jump chain=output comment="Jump for icmp output" jump-target=ICMP protocol=icmp add action=fasttrack-connection chain=forward connection-state=established,related disabled=yes hw-offload=yes add action=accept chain=forward connection-state=established,related disabled=yes /ip firewall nat add action=masquerade chain=srcnat src-address=192.168.2.0/24 add action=masquerade chain=srcnat src-address=192.168.5.0/24 add action=dst-nat chain=dstnat comment="wifi eszkoz eleres" dst-port=58291 in-interface=ether1 protocol=tcp to-addresses=192.168.5.2 to-ports=8291 /ip route add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=86.109.72.53 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10 /ip service set www address=86.109.64.0/27 set api address=86.109.64.0/27 set api-ssl address=86.109.64.0/27 /routing bfd configuration add disabled=no interfaces=all min-rx=200ms min-tx=200ms multiplier=5 /snmp set contact=admin@rlan.hu enabled=yes location=Budapest /system clock set time-zone-name=Europe/Budapest /system identity set name=gw-wscope /system logging add action=remote topics=info add action=remote topics=critical add action=remote topics=error add action=remote topics=warning /system note set show-at-login=no /system ntp client set enabled=yes /system ntp client servers add address=time.rlan.hu /system routerboard settings set cpu-frequency=716MHz /system scheduler add interval=6d name=mentes on-event=mentes policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=2020-03-28 start-time=06:48:29 /system script add dont-require-permissions=no name=mentes owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="/export file=export\r\n/tool e-mail send from=\"backup@rlan.hu\" to=\"backup@rlan.hu\" subject=([/system identity get name] . \" export\") file=export.rsc \r\n/system backup save name=backup\r\n/tool e-mail send from=\"backup@rlan.hu\" to=\"backup@rlan.hu\" subject=([/system identity get name] . \" Backup\") file=backup.backup\r\n" /tool e-mail set from=gw-wscope@magicnet.hu server=86.109.64.10 /tool graphing interface add /tool graphing queue add /tool graphing resource add