9th December 2024

What is Mikrotik Router? Mikrotik Router Configurations – DHCP Server Installation

It is a Router Operating System which is developed on Mikrotik Linux kernel and requires a license. With this operating system, you can turn your pc-based computer into a modern router, a VPN server or a high-spec firewall. This product is generally preferred by web hosting companies, medium-sized businesses and networks with low traffic.

Mikrotik Router Configuration

Mikrotik devices allow connections through ssh, telnet, web and winbox applications at first installation. You can download the Winbox application from its site. You can connect over Winbox via MAC and IP address. In the first installation, the username “admin” password part is blank.

Mikrotik Router Configuration
Mikrotik Router Configuration

 

Dynamic IP Address

You can list the interfaces on the device with the “interface print” command.

IP Address Settings
IP Address Settings

 

Static IP Address

If the router will be given an Ip Address manually, we need to specify the Interface name, Ip Address and Subnetmask.

Dynamic IP Addressing
Dynamic IP Addressing

 

PPPoE Connection

You can follow the steps below for the PPPoE connection.

PPPoE Connection
PPPoE Connection
New Interface
New Interface
New Interface
New Interface

 

Bridge Port Setting

It is the combination of the Bridge Port 2 interface address. Our router does not route on these 2 ports, it acts as if there is a single port and a single ip address is assigned. You can usually use it to extend the Local Network.

Bridge Port Setting
Bridge Port Setting
Bridge Port Setting
Bridge Port Setting
Bridge Port Setting
Bridge Port Setting

 

User Password Settings

You can use the “user print” command to see the current users.

user print
user print

 

You can use the command “user set numbers = 0 password =” to change the user’s password.

User Password Settings
User Password Settings
User Password Settings
User Password Settings

 

Changing the Device Name

You can use “system identity set name =” command to change the Device Name.

LEARN MORE  Lsb_release Command in Linux
Changing the Device Name
Changing the Device Name

 

DHCP Server Installation

To activate the DHCP service over ssh, after we have given the “ip dhcp-server setup” command, a guide will come to determine the IP pool, Gateway and DNS addresses and lease time. You can take a look at the picture below to install it via Winbox.

dhcp-server setup
dhcp-server setup
Installing DHCP Server via Winbox
Installing DHCP Server via Winbox

 

Firewall Settings

Many services are open in the default settings of the device.

services
services

 

You can use the “ip service disable” command to turn off the services we do not use.

Firewall Settings
Firewall Settings

 

Firewall rules

We need to write a rule in the firewall to limit the connection requests from outside ports that we do not want. We will allow ICMP, SSH, and Winbox ports. At the same time, we will drop requests from the connection status that do not perform the triple handshake steps of the TCP.

Firewall rules
Firewall rules

 

NAT Settings

We need to adjust the NAT settings to get our users out of the internet from our local network. Out-Interface is our leg facing the internet.

NAT Settings
NAT Settings

 

Port Forwarding

Finally, you can use the following command to open a Server, Camera, PC etc. devices in our local to external access. In-Interface is our leg facing our local network.

Port Forwarding
Port Forwarding

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *