Configuring a MikroTik Cloud Core Router (CCR) involves several key steps, from basic setup to more advanced network configurations. Below is a guide to configure a MikroTik CCR, covering initial setup, IP addressing, interfaces, routing, and firewall rules.
1. Initial Setup
To start configuring your MikroTik CCR, you will need to access it through either the console or WinBox (MikroTik's Windows utility).
a. Connect to the CCR:
- Console Access: Use a serial cable or SSH (if already set up) for initial configuration.
- WinBox Access: Connect your computer to one of the router’s Ethernet ports and use the WinBox utility to log in.
b. Login to the Router:
- Default username:
admin
- Default password: (blank)
Once logged in, you'll be in the router's main configuration screen.
c. Set the Router’s Hostname:
In the terminal or WinBox:
2. Set Up IP Addressing
Assigning an IP address is necessary to allow access to the router remotely (via WinBox, WebFig, or SSH).
a. Assign an IP Address to the Interface:
For a simple setup, configure an IP address on the router’s LAN interface (usually ether1
or bridge
):
b. Configure the Default Gateway:
This step ensures that the router knows where to send traffic destined for networks outside of its local subnet:
(Replace 192.168.1.254
with the actual gateway IP.)
3. Configure DHCP Server (Optional)
If you want your MikroTik CCR to assign IP addresses to clients in your network, enable the DHCP server.
a. Add a DHCP Server:
First, define a DHCP address pool:
Then, configure the DHCP server:
4. Configure NAT (Network Address Translation)
If your router is connected to the internet and you want to allow devices on the LAN to access the web, you'll need to configure NAT.
a. Configure Source NAT (Masquerade):
This assumes ether2
is your WAN interface. Replace with the appropriate interface if necessary.
5. Configure Routing
For more advanced setups, you can configure static or dynamic routing. If you want to set up basic static routes, use the following:
a. Add a Static Route:
This will set the default route to your gateway.
6. Configure Firewall Rules
The firewall helps secure your network. Below are some basic firewall rules:
a. Allow Established and Related Connections:
b. Allow Ping (ICMP) from LAN:
c. Drop Invalid Connections:
d. Allow SSH, WinBox, and HTTP Access:
e. Drop All Other Input Traffic:
7. Set Up VLANs (Optional)
If you want to segment your network into different VLANs, MikroTik supports VLAN tagging. Here's how to create a VLAN on a specific interface:
a. Create a VLAN:
b. Assign IP Address to VLAN Interface:
c. Configure DHCP for the VLAN (Optional):
8. Save Configuration
Once you're done with your configuration, save it to ensure that it persists after a reboot.
9. Verify Configuration
Use the following commands to verify your configurations:
- Check IP Addressing:
- Check Routing Table:
- Check Firewall Rules:
Example Configuration Summary
0 Comments