Thursday, March 10, 2016

Mikrotik Tutorial for Beginners

After finishing installation, a beginner like me might be confused how to login a Mikrotik router. :(
User: admin
Password: <none/ blank>
Anyways, I am going to share some very basic commands of Mikrotik CLI.
Add IP address in a interface:
>ip address add address 10.0.0.1/24 interface ether1
Check the IP:
>ip address print
Add default Gateway for Mikrotik:
>ip route add gateway=192.168.200.1
Check the Route:
>ip route print
Masquerade / NAT implementation through WAN interface:
>ip firewall nat add chain=srcnat action=masquerade out-interface=ether1
Check NAT:
>ip firewall nat print
Forward your External Interface request to a Internal IP:
>ip firewall nat add chain=dstnat dst-address=10.5.8.200 action=dst-nat to-addresses=192.168.0.109 ### 10.5.8.200 (External), 192.168.0.109 (Internal)
Port Forward / Mapping from External to Internal:
>ip firewall nat add chain=dstnat dst-port=1234 action=dst-nat protocol=tcp to-address=192.168.1.1 to-port=1234 ### port forward/ mapping