Difference between revisions of "MikroTik"

From "PTTLink Wiki"
Jump to navigation Jump to search
m
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category: MikroTik]]
 
[[Category: MikroTik]]
 
__FORCETOC__
 
__FORCETOC__
{{ Note|'''This document is a work in progress and should be considered a draft until this message disappears.''' }}
 
 
Welcome to the MikroTik Wiki page.  Here you will find items specifically about using MikoTik devices and software as it relates to Ham Radio and/or AllStarLink/PTTLink.
 
Welcome to the MikroTik Wiki page.  Here you will find items specifically about using MikoTik devices and software as it relates to Ham Radio and/or AllStarLink/PTTLink.
  
Line 14: Line 13:
 
== Preparation ==
 
== Preparation ==
 
*Spin up a VPS using a Debian based Linux distro
 
*Spin up a VPS using a Debian based Linux distro
**Choose one with at least one CPU and 512MB of memory.  You can go larger or smaller as your needs dictate.
+
**Choose one with at least one CPU and 512MB of memory.  You can increase the CPU and memory as your needs/use dictates.
 
*Login to VPS
 
*Login to VPS
  
Line 30: Line 29:
 
   apt-get install unzip
 
   apt-get install unzip
  
*Set '''$ADDRESS''' to the IP address the MikroTik CHR will use
+
*Then copy and run the entire block of commands below into the terminal.  Verify the name of the interface in line 4 matches what your VPS uses.
*Set $GATEWAY to the IP address of the Gateway the MikroTik CHR will use
 
 
 
  set $ADDRESS="1.1.1.1"
 
  set $GATEWAY="2.2.2.2"
 
 
 
*Then copy and run the entire block of commands below into the terminal
 
  
 
   wget https://download.mikrotik.com/routeros/6.48.3/chr-6.48.3.img.zip -O chr.img.zip && \
 
   wget https://download.mikrotik.com/routeros/6.48.3/chr-6.48.3.img.zip -O chr.img.zip && \
 
   gunzip -c chr.img.zip > chr.img && \  
 
   gunzip -c chr.img.zip > chr.img && \  
 
   mount -o loop,offset=33554944 chr.img /mnt && \  
 
   mount -o loop,offset=33554944 chr.img /mnt && \  
   ADDRESS=`ip addr show ens3 | grep global | cut -d' ' -f 6 | head -n 1` && \  
+
   ADDRESS=`ip addr show '''''ens3''''' | grep global | cut -d' ' -f 6 | head -n 1` && \  
 
   GATEWAY=`ip route list | grep default | cut -d' ' -f 3` && \  
 
   GATEWAY=`ip route list | grep default | cut -d' ' -f 3` && \  
 
   echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1] /ip route add gateway=$GATEWAY " > /mnt/rw/autorun.scr && \  
 
   echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1] /ip route add gateway=$GATEWAY " > /mnt/rw/autorun.scr && \  
 
   umount /mnt && \  
 
   umount /mnt && \  
   echo u > /proc/sysrq-trigger && \ dd if=chr.img bs=1024 of=/dev/vda
+
   echo u > /proc/sysrq-trigger && \ dd if=chr.img bs=1024 of='''''/dev/vda'''''
  
 
*Once you successfully complete the above, power off (do not shut down) the VPS and then turn it back on to boot into MikroTik CHR.
 
*Once you successfully complete the above, power off (do not shut down) the VPS and then turn it back on to boot into MikroTik CHR.
  
 +
== Configuration ==
 
*Login to the MikroTik CHR via the terminal using admin for the username with no password
 
*Login to the MikroTik CHR via the terminal using admin for the username with no password
 
*Change the default admin password with:
 
*Change the default admin password with:
 
   /user set name=admin password=<new password>
 
   /user set name=admin password=<new password>
  
== Configuration ==
+
'''If the IP address and Gateway were not properly set at installation:'''
 +
----
 
Set $ADDRESS and $GATEWAY first or replace them in the line below with the actual values.
 
Set $ADDRESS and $GATEWAY first or replace them in the line below with the actual values.
 
   echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1] /ip route add gateway=$GATEWAY"
 
   echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1] /ip route add gateway=$GATEWAY"
  
 
*If the above does not work on setting the IP address and gateway properly:
 
*If the above does not work on setting the IP address and gateway properly:
**Set IP address with:  '''/ip addres interface=ether1 add address=<ip address> netmask=<netmask>'''
+
**Set IP address with:  '''/ip address add address=<ip address> netmask=<netmask> interface=ether1'''
 
**Set Gateway IP address with:  '''/ip route add dst-address=0.0.0.0/0 gateway=<gateway IP>'''
 
**Set Gateway IP address with:  '''/ip route add dst-address=0.0.0.0/0 gateway=<gateway IP>'''
  
 
== Finishing Up ==
 
== Finishing Up ==
 
*Now login to the web page of your MikroTik CHR using http://<IP> or download Winbox from https://mikrotik.com/download to login and configure your MikroTik CHR.
 
*Now login to the web page of your MikroTik CHR using http://<IP> or download Winbox from https://mikrotik.com/download to login and configure your MikroTik CHR.
*Read the documentation at https://help.mikrotik.com/docs/display/ROS/Getting+started pay special attention to the First Time Configuration section
+
*Read the documentation at https://help.mikrotik.com/docs/display/ROS/Getting+started pay special attention to the [https://help.mikrotik.com/docs/display/ROS/First+Time+Configuration First Time Configuration] section
  
 
= AMPRNet/44Net =
 
= AMPRNet/44Net =
Line 81: Line 76:
  
 
= IPSEC =
 
= IPSEC =
Sometimes you need to secure a link between a system and an MikroTik device.  
+
Sometimes you need to secure a link between a system and a MikroTik device.  
  
 
*[[VPN#strongSwan to MikroTik|strongSwan to MikroTik]] - Information on connecting MikroTik to a system running the strongSwan IPSEC software
 
*[[VPN#strongSwan to MikroTik|strongSwan to MikroTik]] - Information on connecting MikroTik to a system running the strongSwan IPSEC software
 +
 +
= Wireguard =
 +
The Mikrotik Wireguard Road Warrior Install is located at [[VPN#Mikrotik_Wireguard_Road_Warrior_Config|Mikrotik Wireguard Road Warrior Setup]].
  
 
= HamWAN =
 
= HamWAN =

Latest revision as of 06:56, 24 January 2022


Welcome to the MikroTik Wiki page. Here you will find items specifically about using MikoTik devices and software as it relates to Ham Radio and/or AllStarLink/PTTLink.

General Information

Mikrotik Website: https://mikrotik.com/

MikroTik CHR on VPS

Instructions for installing the MikroTik Cloud Hosted Router (CHR) on a VPS provider.

Note: You will be overwriting the existing VPS server using this guide.

Preparation

  • Spin up a VPS using a Debian based Linux distro
    • Choose one with at least one CPU and 512MB of memory. You can increase the CPU and memory as your needs/use dictates.
  • Login to VPS

Installation

  • Run the following to replace the Linux install on the VPS.

Note: Adjust the /dev/vda listed in the last line to match the actual drive used in the VPS.

  • First make sure the packages information is up to date
  apt-get update
  • Ensure unzip is installed
  apt-get install unzip
  • Then copy and run the entire block of commands below into the terminal. Verify the name of the interface in line 4 matches what your VPS uses.
  wget https://download.mikrotik.com/routeros/6.48.3/chr-6.48.3.img.zip -O chr.img.zip && \
  gunzip -c chr.img.zip > chr.img && \ 
  mount -o loop,offset=33554944 chr.img /mnt && \ 
  ADDRESS=`ip addr show ens3 | grep global | cut -d' ' -f 6 | head -n 1` && \ 
  GATEWAY=`ip route list | grep default | cut -d' ' -f 3` && \ 
  echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1] /ip route add gateway=$GATEWAY " > /mnt/rw/autorun.scr && \ 
  umount /mnt && \ 
  echo u > /proc/sysrq-trigger && \ dd if=chr.img bs=1024 of=/dev/vda
  • Once you successfully complete the above, power off (do not shut down) the VPS and then turn it back on to boot into MikroTik CHR.

Configuration

  • Login to the MikroTik CHR via the terminal using admin for the username with no password
  • Change the default admin password with:
  /user set name=admin password=<new password>

If the IP address and Gateway were not properly set at installation:


Set $ADDRESS and $GATEWAY first or replace them in the line below with the actual values.

  echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1] /ip route add gateway=$GATEWAY"
  • If the above does not work on setting the IP address and gateway properly:
    • Set IP address with: /ip address add address=<ip address> netmask=<netmask> interface=ether1
    • Set Gateway IP address with: /ip route add dst-address=0.0.0.0/0 gateway=<gateway IP>

Finishing Up

AMPRNet/44Net

You can use MikroTik devices as a way to connect to AMPRNet/44Net. Once connected, you can then setup your AllStarLink/PTTLink node with a 44Net IP address.

IPIP Tunnel

Explanation: https://www.ampr.org/ipip/

Note: You can also download the above as a ZIP archive: http://www.yo2loj.ro/hamprojects/ampr-gw-3.2.zip

IPSEC

Sometimes you need to secure a link between a system and a MikroTik device.

Wireguard

The Mikrotik Wireguard Road Warrior Install is located at Mikrotik Wireguard Road Warrior Setup.

HamWAN

Website: https://hamwan.org

"HamWAN is a non-profit organization (501c3) developing best practices for high speed amateur radio data networks. HamWAN also runs the Puget Sound Data Ring, which is a real-world network implementation of the proposed designs."

MikroTik devices are used in HamWAN type networks. Once you are connected to HamWAN, you can then setup your AllStarLink/PTTLink devices on the network.

Certified Networks

Mi6WAN

Website: https://w8cmn.net/mi6wan/

"The Mi6WAN network is our Internet Protocol (IP) Based network. Utilizing microwave, fiber and wireless connections we have built a High-Speed Point to Point and Point to Multipoint network using standards based protocols and RF gear. Our links are measured in MBPS not bps like traditional ax.25 based amateur radio based networks. We are currently allocated subnets from the AMPRNet 44/8 of 44.103/19 and 44.103.32/21. These subnets we have allocated down to our different sites for the needs of our network. We primarily transport data in support of our other projects as IP is becoming more and more the standard to transport audio/video/data."

For those located within the Central Michigan area, you can connect to a HamWAN like network and receive an AMPRNet/44Net IP address for use with your AllStarLink/PTTLink nodes.

Client configuration information can be found at https://w8cmn.net/mi6wan/mi6wan-client-config/

HamNET

Website: http://hamnetdb.net/

European ham microwave network