Ticker

6/recent/ticker-posts

Basic configuration for MikroTik by new terminal Script step by step

The basic configuration is carried out using text commands launched from the command line interface (CLI)

Basic configuration for MikroTik by new terminal Script step by step.

1. Create bridge port

/interface bridge add name=<bridge-name>

Example:

 /interface bridge add name=bridge1

 2. Add bridge port interface

/interface bridge port add interface=<ether-port>  bridge=<bridge-name>

 Example:

/interface bridge port add interface=ether1 bridge=bridge1
/interface bridge port add interface=ether2 bridge=bridge1
/interface bridge port add interface=ether3 bridge=bridge1
/interface bridge port add interface=ether4 bridge=bridge1
/interface bridge port add interface=ether5 bridge=bridge1
/interface bridge port add interface=ether6 bridge=bridge1
/interface bridge port add interface=ether7 bridge=bridge1
/interface bridge port add interface=ether8 bridge=bridge1
/interface bridge port add interface=ether9 bridge=bridge1
/interface bridge port add interface=ether10 bridge=bridge1

 3. Assign IP addresses to the interfaces

/ip address add address=<IP LAN> interface=<bridge-name>
/ip address add address=<IP WAN> interface=<ether-port>

  Example:

/ip address add address=192.168.137.1/24 interface=bridge1
/ip address add address=103.100.222.38/24 interface=ether1

 4. Configuring DNS

/ip dns set servers=<your dns>

 Example:

/ip dns set servers=8.8.8.8,8.8.4.4

5. Add gateway for the router 

/ip route add gateway=<IP Gateway>

  Example:

/ip route add gateway=103.100.222.1

6. DHCP

/ip dhcp-server setup [enter]
Select interface to run DHCP server on
 
dhcp server interface: local [enter]
Select network for DHCP addresses
 
dhcp address space: 192.168.137.0/24 [enter]
Select gateway for given network
 
gateway for dhcp network: 192.168.137.1 [enter]
Select pool of ip addresses given out by DHCP server
 
addresses to give out: 192.168.137.2-192.168.137.254 [enter]
Select DNS servers
 
dns servers: 8.8.8.8, 8.8.4.4[enter]
Select lease time
 
lease time: 10m [enter]

7. Configuration NAT for outgoing network traffic

/ip firewall nat add chain=srcnat action=masquerade

 8. Changing the device name

/system identity set name=<Name>
Example:
/system identity set name=TheTech4Talk

9. Set Password

/user set admin password=<Password>
Example:
/user set admin password=thetech4talk




Conclusion

In this post, we have made a step-by-step tutorial on  Basic configuration for MikroTik by new terminal Script step by step.I hope you liked it and please do share it with your friends and follow our social media for more.

If you face any problems with the code or have any questions, please feel free to ask in the comments section or contact us.

Post a Comment

0 Comments