Episode 6 - Seri Tutorial Mikrotik - Step by Step, Basic Config Secara Dynamic (Gateway Mikrotik)

3 min read 21 days ago
Published on Sep 13, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial provides a step-by-step guide on configuring Mikrotik routers dynamically, focusing on setting up a gateway. It's designed for those in computer networking, particularly students and practitioners at SMK IT Bani Abdurrahman. Following these steps will help you establish a basic yet functional Mikrotik setup.

Step 1: Access the Mikrotik Router

  • Connect your computer to the Mikrotik router via Ethernet cable.
  • Open a web browser and enter the default IP address of the router, typically 192.168.88.1.
  • Log in using the default credentials (usually username: admin, password: no password).

Step 2: Configure the WAN Interface

  • Navigate to the Interfaces section.
  • Identify the WAN interface that connects to your internet service provider.
  • Click on the interface to configure it:
    • Set the Type to either DHCP Client or Static IP based on your Internet Service Provider's requirements.
    • If using DHCP, click Add and select DHCP Client to receive an IP address automatically.
    • If using a static IP, enter the IP address, subnet mask, and gateway provided by your ISP.

Step 3: Set Up the LAN Interface

  • Go back to the Interfaces section.
  • Select the LAN interface, typically named ether2 or similar.
  • Assign an IP address to the LAN interface:
    • Example: 192.168.1.1/24.
  • Enable the interface if it’s not already active.

Step 4: Configure DHCP Server for LAN

  • Navigate to the IP menu, then select DHCP Server.
  • Click on DHCP Setup to launch the setup wizard.
  • Choose your LAN interface and follow the prompts:
    • Specify the address space (e.g., 192.168.1.0/24).
    • Define the range of IP addresses to allocate (e.g., 192.168.1.2 to 192.168.1.100).
    • Set the DNS servers, either using public DNS (like Google’s 8.8.8.8) or your ISP's.

Step 5: Set Up Firewall Rules

  • Go to the IP menu, then select Firewall.
  • Under the Filter Rules tab, click Add to create rules:
    • Allow established and related connections.
    • Allow traffic from the LAN to the WAN.
    • Drop invalid connections to enhance security.

Step 6: Configure NAT for Internet Access

  • In the IP menu, select Firewall, then go to the NAT tab.
  • Click on Add to create a new NAT rule:
    • Set Chain to srcnat.
    • Set Out. Interface to your WAN interface.
    • In the Action tab, set Action to masquerade.

Step 7: Test the Configuration

  • Connect a device to the LAN and check if it receives an IP address from the DHCP server.
  • Open a web browser and try accessing the internet.
  • If there are issues, revisit your configurations to ensure all settings are correct.

Conclusion

You've successfully configured a Mikrotik router with dynamic settings, establishing both WAN and LAN interfaces, a DHCP server, firewall rules, and NAT for internet access. For further learning, consider experimenting with advanced features like VPN setup or monitoring traffic. Always remember to keep your router's firmware updated for security and performance improvements.