MMM MMM KKK TTTTTTTTTTT KKK MMMM MMMM KKK TTTTTTTTTTT KKK MMM MMMM MMM III KKK KKK RRRRRR OOOOOO TTT III KKK KKK MMM MM MMM III KKKKK RRR RRR OOO OOO TTT III KKKKK MMM MMM III KKK KKK RRRRRR OOO OOO TTT III KKK KKK MMM MMM III KKK KKK RRR RRR OOOOOO TTT III KKK KKK MikroTik RouterOS 7.2 (c) 1999-2022 https://www.mikrotik.com/ Press F1 for help [master@MikroTik] > /system default-configuration print script: #| Welcome to RouterOS! #| 1) Set a strong router password in the System > Users menu #| 2) Upgrade the software in the System > Packages menu #| 3) Enable firewall on untrusted networks #| 4) Set your country name to observe wireless regulations #| ----------------------------------------------------------------------------- #| RouterMode: #| * WAN port is protected by firewall and enabled DHCP client #| * Wireless and Ethernet interfaces (except WAN port/s) #| are part of LAN bridge #| LAN Configuration: #| IP address 192.168.88.1/24 is set on bridge (LAN port) #| DHCP Server: enabled; #| DNS: enabled; #| wlan1 Configuration: #| mode: ap-bridge; #| band: 2ghz-b/g/n; #| tx-chains: 0;1; #| rx-chains: 0;1; #| installation: indoor; #| wpa2: no; #| ht-extension: 20/40mhz-XX; #| WAN (gateway) Configuration: #| gateway: ether1 ; #| ip4 firewall: enabled; #| ip6 firewall: enabled; #| NAT: enabled; #| DHCP Client: enabled; #| Login #| admin user protected by password :global ssid; :global defconfMode; :log info "Starting defconf script"; #------------------------------------------------------------------------------- # Apply configuration. # these commands are executed after installation or configuration reset #------------------------------------------------------------------------------- :if ($action = "apply") do={ # wait for interfaces :local count 0; :while ([/interface ethernet find] = "") do={ :if ($count = 30) do={ /interface list add name=WAN comment="defconf" /interface list add name=LAN comment="defconf" /interface bridge add name=bridge disabled=no auto-mac=yes protocol-mode=rstp comment=defconf; :local bMACIsSet 0; :foreach k in=[/interface find where !(slave=yes || name="ether1" || name~"bridge")] do={ :local tmpPortName [/interface get $k name]; :if ($bMACIsSet = 0) do={ :if ([/interface get $k type] = "ether") do={ /interface bridge set "bridge" auto-mac=no admin-mac=[/interface get $tmpPortName mac-address]; :set bMACIsSet 1; } } :if (([/interface get $k type] != "ppp-out") && ([/interface get $k type] != "lte")) do={ /interface bridge port add bridge=bridge interface=$tmpPortName comment=defconf; } } /ip pool add name="default-dhcp" ranges=192.168.88.10-192.168.88.254; /ip dhcp-server add name=defconf address-pool="default-dhcp" interface=bridge lease-time=10m disabled=no; /ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1 dns-server=192.168.88.1 comment="defconf"; /ip address add address=192.168.88.1/24 interface=bridge comment="defconf"; /ip dns { set allow-remote-requests=yes static add name=router.lan address=192.168.88.1 comment=defconf } /interface wireless { :local ifcId [/interface wireless find where default-name=wlan1] :local currentName [/interface wireless get $ifcId name] set $ifcId mode=ap-bridge band=2ghz-b/g/n disabled=no wireless-protocol=802.11 \ distance=indoors installation=indoor set $ifcId channel-width=20/40mhz-XX; set $ifcId frequency=auto :local wlanMac [/interface wireless get $ifcId mac-address]; :set ssid "MikroTik-$[:pick $wlanMac 9 11]$[:pick $wlanMac 12 14]$[:pick $wlanMac 15 17]" set $ifcId ssid=$ssid } /ip dhcp-client add interface=ether1 disabled=no comment="defconf"; /interface list member add list=LAN interface=bridge comment="defconf" /interface list member add list=WAN interface=ether1 comment="defconf" /ip firewall nat add chain=srcnat out-interface-list=WAN ipsec-policy=out,none action=masquerade comment="defconf: masquerade" /ip firewall { filter add chain=input action=accept connection-state=established,related,untracked comment="defconf: accept established,related,untrac> filter add chain=input action=drop connection-state=invalid comment="defconf: drop invalid" filter add chain=input action=accept protocol=icmp comment="defconf: accept ICMP" filter add chain=input action=accept dst-address=127.0.0.1 comment="defconf: accept to local loopback (for CAPsMAN)" filter add chain=input action=drop in-interface-list=!LAN comment="defconf: drop all not coming from LAN" filter add chain=forward action=accept ipsec-policy=in,ipsec comment="defconf: accept in ipsec policy" filter add chain=forward action=accept ipsec-policy=out,ipsec comment="defconf: accept out ipsec policy" filter add chain=forward action=fasttrack-connection connection-state=established,related comment="defconf: fasttrack" filter add chain=forward action=accept connection-state=established,related,untracked comment="defconf: accept established,related, unt> filter add chain=forward action=drop connection-state=invalid comment="defconf: drop invalid" filter add chain=forward action=drop connection-state=new connection-nat-state=!dstnat in-interface-list=WAN comment="defconf: drop all> } /ipv6 firewall { -- [Q quit|D dump|right|up|down]