Setting up a gateway on a VyOS instance

From 44Net Wiki
Jump to navigation Jump to search

Setting up a gateway on VyOS

VyOS is a Network Operating System, similar to pfSense, where everything is done on CLI. This is a fork of the base Vyatta network OS, which Ubiquiti uses for most of their products.


Assumptions / Pre requisites

• You have already registered with AMPRNet and got your 44.x.x.x/y allocation and it is showing in the encap.txt file

• You have registered some hosts in the AMPRNet DNS like <your call sign>.ampr.org


• You have already setup VyOS and know how to get around linux. This guide only covers the AMPR connection, not a complete setup.


Warning!!

The author does not assume responsibility if you mess up/brick your router. Please make sure to back up your VyOS configuration prior to any change. Also make sure you know how to restore your configuration and you know how to restore your router to factory defaults if everything else fails.

Process of Getting Started

We will begin by getting the Jesse repositories installed onto the router. To do this, run the following command:

Next, run following commands:

  • sudo apt-get -f install
  • sudo apt-get update

NOTE: DO NOT RUN APT-GET UPGRADE!!!! This will break many things within VyOS

From that point it is possible to install many packages from Debian "jessie" distribution.

OPTIONAL: As in VyOS there is no file manager. To make life a bit easier, you can install Midnight Commander: sudo apt-get install mc

Now, it's time to configure access to 44-net.


Downloading the Source Files for AMPR-RIPd and Compiling

What we can do now, is create a folder called ampr within our home directory, and install the materials to build out ampr-ripd.

So do the following:

  • sudo -i # This will log you in as root
  • apt-get update # Just to make sure your lists are updated
  • apt-get install -y build-essential # This installs all the build materials needed to build our binary
  • mkdir /home/ampr && cd /home/ampr # Self-Explanatory
  • wget http://www.yo2loj.ro/hamprojects/ampr-ripd-1.15.tgz # Again, self-explanatory
  • tar -xvzf ampr-ripd-1.15.tgz # Extracts the compressed file
  • rm -rf ampr-ripd-1.15.tgz # Deletes it after extraction
  • make # Compiles
  • cp ampr-ripd /usr/local/bin/


After this, you need to find out the password for the RIP broadcasts. These broadcasts run every 5 minutes. Run the following command and wait: ./find_pass.sh

Once it shows the password, Ctrl-C out of there and copy the password down. You will need it. Run the following after your done:

  • rm -rf /home/ampr/*

Creating the ax25 script

Copy the text linked here[1] to a text editor, like notepad, and edit the portions that are commented with <> and []: --- Once done editing, you will copy the text and put it in your clipboard. Open back up the terminal, and run the following:

  • sudo nano /etc/rc.local

You should be at a screen with some text and with some key-commands on the bottom

Using your arrow keys, move your cursor above the part that says "# Do not remove----" and paste the contents of your clipboard into the terminal by right-clicking. You can close out the file once everything is in there. Note: Close out of the file and save it, by doing Ctrl-X, then pressing 'Y', then 'Enter'.

Script

Fire-up the ax25 script by just running 'ax25' and wait. Remember, there is a rip44 broadcast every 5 minutes. After 10-15 minutes, check your routing table.

To check your routing table:

 ip route show table 1

Table should be filled-up with many entries pertaining to AMPR They should mimic /var/lib/ampr-ripd/encap-txt