Need help?

Our experts will login to your server within 30 minutes to fix urgent issues.

Customer support or server support, make your own solution using our support configuration wizard.

Vyatta – My Basic Setup Guide

If you haven’t already been introduced to Vyatta… Vyatta meet reader, reader meet Vyatta.Vyatta is a fairly new Opensource, Debian based router that’s taking geeks by storm. And I can tell you from personal experience with Vyatta that it’s a powerful system.

So, I would put together a quick start guide on getting Vyatta working “out of the box.” Here it is…


Hire Bobcares Linux Server Administrators
Get super reliable servers and delighted customers

See how we do it!


STEP 1: Installing and Updating Vyatta

Let’s assume you have already downloaded the ISO Image from Vyatta’s website and burned it to CD and you have the hardware there that you want to run Vyatta on. For my example, I’m running an AMD Sempron 2600, 1GB Ram, 80GB HD, 2 Ethernet Cards (min. suggestion for a good router.) Okay, pop the CD in the drive and boot up to the CD. It should start loading the OS and Vyatta.

Vyatta is setup so you don’t have to have a hard drive to run it. It can run directly from the CD, as it’s setup in a “live cd” format. Problem with this is, if you reboot, you lose your configuration settings. So we’ll want to install it to the drive, in my case 80GB is major overkill. To do this, you’ll first need to login to Vyatta once it’s booted up. The default logins are (user: root pass: vyatta) To install to the drive you will issue the command:


During the install you will be asked how much diskspace to allot to the different partitions. I went with the default. Once that’s complete, pop the CD out, and reboot to your installed Vyatta. Now we can start configuring the system. Let’s start by setting up the Debian repos and making sure we’re running the latest version of Vyatta. So you need to get into the Vyatta configure Cli. You can go this by logging in as root and then running the commands:

su vyatta
set system package repository community component "experimental testing main"
set system package repository community url
set system package repository etch component main
set system package repository main url

STEP 2: Configuring Ethernet Interfaces

I have some static IPs from my internet provider, so I’m going to assign one of them to one of the ethernet cards, and the other ethernet card will be used for my LAN. Below is sample code from my setup:

set interfaces ethernet eth0 address prefix-length 29
set interfaces ethernet eth0 description "Internet"
set interfaces ethernet eth1 address prefix-length 24
set interfaces ethernet eth1 description "OfficeLan"

So I created my first interface with my ISP’s IP: /29 which is netmask: (If you need to know how to get your prefix-length – good luck. It’s hard to explain without having some networking knowledge.) I also, added a description for this interface as “Internet” as I tend to get forgetful. This ethernet card will be plugged into my internet connection.

The second interface I created with the LAN IP: /24 which is netmask:, and gave it a description as “Lan.” This ethernet will be plugged into a Switch or Hub which my workstations and IP phones are plugged into.

By the way, you may have noticed the “commit” command. This basically commits my settings to the system. If there’s something missing, or conflicting, it will let me know during the commit.

STEP 3: Setting Up Route and NAT

So the workstations and phones that will be connected to the same switch as my LAN ethernet, will have 192.168.15.x IPs, I want them to have an internet connection and the rest of the world to see their IP as: I need to setup my route and NAT. Below I’m doing that.

set protocols static route next-hop
set service nat rule 1
set service nat rule 1 type source
set service nat rule 1 translation-type masquerade
set service nat rule 1 outbound-interface eth0
set service nat rule 1 protocols all
set service nat rule 1 source network
set service nat rule 1 destination network

So in the above, I setup the route with the next-hop being my default gateway from my ISP: This will give my LAN the internet connection. The rest translates my LAN IPs into the ISP IP.

STEP 4: Setting up DHCP Server

While having static LAN IPs set on all my workstations and Phones is best, I do have users that come and go on their laptop. So I want the router to automatically assign IPs. I can set that up below:

set service dhcp-server name OfficeLan start stop
set service dhcp-server name OfficeLan network-mask 24
set service dhcp-server name OfficeLan dns-server
set service dhcp-server name OfficeLan dns-server
set service dhcp-server name OfficeLan default-router
set service dhcp-server name OfficeLan interface eth1
set service dhcp-server name OfficeLan domain-name

In the example above, I want no more than 25 dynamic IPs on my network, so the DHCP server is only going to assign IPs in the range: through I setup the default nameservers to be Level3’s: and with the gateway: on my second ethernet. And then I gave it a hostname.

That’s all you need for a basic setup. There’s additional configurations that can be done, including firewalls, etc. Hopefully I will publish something on those shortly.

Note: The above instructions work for the Vyatta Community Edition 2. Instructions for Vyatta community edition 3 (released on October 31, 2007) are a bit different from the above.

Articles by Robert BroylesAbout the author:
Robert Broyles is Team Leader at the Bobcares Phone Support Center, Phoenix, AZ. While he is not busy managing the team and Phone support, Robert loves to tweak open source systems like Asterisk, Vyatta etc. His blog can be found at



  1. In your NAT settings:

    set service nat rule 1 translation-type masquerade
    set service nat rule 1 protocols all
    set service nat rule 1 source network
    set service nat rule 1 destination network


    set service nat rule 1 type masquerade
    set service nat rule 1 protocol all
    set service nat rule 1 source address
    set service nat rule 1 destination address


  2. I like the named of your domain.

  3. Looks like this one


Bobcares is a server management company that helps businesses deliver uninterrupted and secure online services. Our engineers manage close to 51,500 servers that include virtualized servers, cloud infrastructure, physical server clusters, and more.

Related Posts