Basic Script to Configure a Blank MikroTik Router

Created by Faye Admin, Modified on Wed, May 28 at 9:13 AM by Faye Admin

I have developed a script you can simply paste into the router and it will configure everything for you and get you started on the right track.

/ip address 
add address=192.168.1.1/24 disabled=no interface=ether2 
add address=192.168.2.1/24 disabled=no interface=wlan1 
/ip pool 
add name=dhcp_pool1 ranges=192.168.1.2-192.168.1.254 
add name=dhcp_pool2 ranges=192.168.2.2-192.168.2.254 
/ip dhcp-server 
add address-pool=dhcp_pool1 \ 
disabled=no interface=ether2 lease-time=3d name=dhcp1 
add address-pool=dhcp_pool2 \ 
disabled=no interface=wlan1 lease-time=3d name=dhcp2 
/ip dhcp-server config 
set store-leases-disk=5m 
/ip dhcp-server network 
add address=192.168.1.0/24 dns-server=4.2.2.2 gateway=192.168.1.1 
add address=192.168.2.0/24 dns-server=4.2.2.2 gateway=192.168.2.1 
/system ntp client 
set enabled=yes primary-ntp=50.19.122.125 
/interface wireless 
set 0 band=2ghz-b default-authentication=yes disabled=no\ 
wireless-protocol=802.11 mode=ap-bridge 
/ip dhcp-client 
add interface=ether1 disabled=no 
/ip firewall nat

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article