Skip to content

Router install

Ycarus (Yannick Chabanois) edited this page Apr 23, 2024 · 47 revisions

Install from precompiled images

You can download precompiled images from https://www.openmptcprouter.com/

sysupgrade images are for upgrade, for a first installation use factory image.

For Raspberry PI 2/3/4/5

You don't need ethernet adapters, only a switch is enough. Modems doesn't need to be directly connected to RPI ethernet port.

Download the image, then copy it to a sdcard.

You can use etcher graphical interface available for Windows, Linux and MacOS, Rufus or Win32 Disk Imager available for Windows as sometimes etcher seems to fail...

You can also use this commands under Linux (replace openmptcprouter-*.img.gz with the full filename of the image you want):

gunzip openmptcprouter-*.img.gz
dd bs=4M if=openmptcprouter-*.img of=/dev/sdX conv=fsync

The Raspberry PI is then available at ip 192.168.100.1

For Linksys WRT3200ACM/WRT32X

The build is experimental. Need more testing...

WAN/Internet port is used as LAN port and LANs ports as WANs ports.

To flash the image go to ConnectivityManual Update and select factory image [*.img]. Once flash completes, router will reboot.

More info on OpenWrt WRT3200ACM/WRT32X support here

The Linksys WRT3200ACM/WRT32X is then available at ip 192.168.100.1

For Banana PI BPI-R2

The build is experimental. Current status: https://github.com/Ysurac/openmptcprouter/issues/180

WAN port is used as LAN port and LANs ports as WANs ports. EMMC image is not tested.

Download the image, then copy it to a sdcard.

You can use etcher graphical interface available for Windows, Linux and MacOS.

You can also use this commands under Linux (replace openmptcprouter-*.img.gz with the full filename of the image you want):

gunzip openmptcprouter-*.img.gz
dd bs=4M if=openmptcprouter-*.img of=/dev/sdX conv=fsync

The Banana PI BPI-R2 is then available at ip 192.168.100.1

For NanoPI R2S/R4S/R5S

You don't need ethernet adapters, only a switch is enough. Modems doesn't need to be directly connected to NanoPI WAN port.

Download the image, then copy it to a sdcard.

You can use etcher graphical interface available for Windows, Linux and MacOS.

You can also use this commands under Linux (replace openmptcprouter-*.img.gz with the full filename of the image you want):

gunzip openmptcprouter-*.img.gz
dd bs=4M if=openmptcprouter-*.img of=/dev/sdX conv=fsync

The NanoPI is then available at ip 192.168.100.1

For Espressobin v7

Download the image, then copy it to a sdcard.

You can use etcher graphical interface available for Windows, Linux and MacOS.

You can also use this commands under Linux (replace openmptcprouter-*.img.gz with the full filename of the image you want):

gunzip openmptcprouter-*.img.gz
dd bs=4M if=openmptcprouter-*.img of=/dev/sdX conv=fsync

The Espressobin is then available at ip 192.168.100.1

For Virtualbox

Set one interface as Server Intel PRO/1000 MT (82545EM) set to bridge with promiscous mode enabled.

For ESXI

You can find a way to use the VMware image here: https://github.com/Ysurac/openmptcprouter/issues/87

For Proxmox

You can use this tutorial, by replacing OpenWrt image by OpenMPTCProuter image: https://www.jwtechtips.top/how-to-install-openwrt-in-proxmox/

For x86 and x86_64

Image can also be copied to a HD or an USB key.

You can use etcher graphical interface available for Windows, Linux and MacOS.

You can also use this commands under Linux (replace openmptcprouter-*.img.gz with the full filename of the image you want):

gunzip openmptcprouter-*.img.gz
dd bs=4M if=openmptcprouter-*.img of=/dev/sdX conv=fsync

or if you have one NVMe disk:

gunzip openmptcprouter-*.img.gz
dd bs=4M if=openmptcprouter-*.img of=/dev/nvme0n1 conv=fsync

For EdgeRouter X

Download a minimal install image: http://openwrt.jaru.eu.org/openwrt-18.06/targets/ramips/mt7621/openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar

# scp /path/to/openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar ubnt@192.168.1.1:/tmp/
# ssh ubnt@192.168.1.1 (default pass: ubnt)
ubnt@ubnt:/$ add system image /tmp/openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar
Checking upgrade image...Done
Preparing to upgrade...Done
Copying upgrade image.../usr/bin/ubnt-upgrade: line 509: [: too many arguments
Done
Removing old image...Done
Checking upgrade image...Done
Copying config data...Done
Finishing upgrade...Done
Upgrade completed

ubnt@ubnt:/$ show system image
The system currently has the following image(s) installed:
ramips Bleeding Edge r7911 (default boot) 
v1.7.1.4821926.151103.1114 (running image) 
A reboot is needed to boot default image

ubnt@ubnt:/$ reboot

SSH is available on eth2 after reboot (or eth0?). Then download OpenMPTCProuter sysupgrade image and update the router:

# scp /path/to/openmptcprouter-v0.58.4-ramips-mt7621-ubnt_edgerouter-x-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/
# ssh root@192.168.1.1
root@OpenWrt:/$ sysupgrade -F -n /tmp/openmptcprouter-v0.58.4-ramips-mt7621-ubnt_edgerouter-x-squashfs-sysupgrade.bin

Boot is quite long, and OpenMPTCProuter interface will be available on eth0.

For RUTX 12/50 kernel 6.1 snapshot

  1. Enable SSH in the Teltonika UI (System --> Administration --> Access Control)

  2. Check from which partition set the device is currently running from.

  $ cat /proc/boot_info/rootfs/primaryboot

In case this output reads 0, install a Software update from Teltonika first. After upgrade completion, check this file now reads 1 before continuing.

  1. Transfer the OpenWrt factory image to the device using scp. Use the same password (user root!) as used for the Web-UI.
   $ scp -O openmptcprouter-*-factory.ubi root@192.168.1.1:/tmp
  1. Connect to the device using ssh as the root user.

  2. Install OpenWrt by writing the factory image to flash.

   $ ubiformat /dev/mtd16 -y -f /tmp/openwrt-factory.bin
  1. Instruct the bootloaer to boot from the first partition set.
   $ echo 0 > /proc/boot_info/rootfs/primaryboot
   $ cat /proc/boot_info/getbinary_bootconfig > /tmp/bootconfig.bin
   $ cat /proc/boot_info/getbinary_bootconfig1 > /tmp/bootconfig1.bin
   $ mtd write /tmp/bootconfig.bin /dev/mtd2
   $ mtd write /tmp/bootconfig1.bin /dev/mtd3
  1. Reboot the device.
   $ reboot
  1. Wait for some long minutes
  2. Connect to 192.168.100.1 using WAN port

Update

Save the configuration System->Backup/Flash Firmware->Backup->Generate archive.

Then 2 choices:

  • Write the latest image on the SD card, restore the configuration System->Backup/Flash Firmware->Backup->Restore backup
  • Download the image (.img) then use System->Backup/Flash Firmware->Backup->Flash new firmware image (this can fail, you really should backup your configuration).

Don't update packages via the interfaces, current packages are from OpenWRT snapshot and this can break everything.