Tuesday, May 20, 2008

Vyatta VC4 Changing Locale

You might want to change locale your locale settings on your Vyatta router.
This is especially helpful when using console with non-english keyboard at your hands.

You can do this using the standard Debian way. Set Default Language.
dpkg-reconfigure locales
Select the ones to be generated and set the one that will be your default locale.

Set Keyboard Layout. Since this package is not installed on Vyatta by default, you have to install it.
apt-get console-tools console-data
If you wish to change it later, just run the following command.
dpkg-reconfigure console-data
Set your keyboard and you're done!

Vyatta VC4 Upgrading OpenSSL

As I mentioned in the previous post, due to an OpenSSL bug in Debian based systems, it is necessary to upgrade OpenSSL packages and re-create ssh keys, if you already used ssh connections to your Vyatta router.

First, I had to stop ssh service.
configure
delete service ssh
commit
Then navigated to ssh directory and deleted the keys.
su
cd /etc/ssh
ls
There were six keys. I removed all of them.
rm ssh_host_*
Upgraded the packages.
apt-get update
apt-get upgrade
OpenSSL package got upgraded.

After that I wanted to enable the ssh service again.
configure
set service ssh
commit
However, since I deleted all keys, the service complained about missing keys. Two keys get generated automatically, others have to be generated manually.
ssh-keygen
Next, I entered the proper path and filename for the rsa keys.
/etc/ssh/ssh_host_rsa_key
Repeated this step for dsa keys.
ssh-keygen -t dsa
/etc/ssh/ssh_host_dsa_key
Finally, I repeated disabling and enabling ssh service. Done.

Vyatta VC4 First Steps

Let's say you install Vyatta without problems.

You can login as vyatta and switch to root with su when necessary.

After installation you have to enable at least one interface, and set up internet access.

In my case in test environment I hooked the machine to my local network and set the interface to dhcp.
configure
set interfaces ethernet eth0 dhcp
commit
This got me a working internet access.
I could now also acces the system by ssh, rather than console.

configure
set service ssh
commit
Warning! Due to the infamous Debian OpenSSL bug and since Vyatta is Debian-based, it is necessary to upgrade OpenSSL packages and re-create ssh keys.

With this in my mind, I realized that it was not a good idea to enable ssh right away. I'll probably have more work than in case I upgraded the system first.
Advice: upgrade first, then enable ssh.

Now it is a good idea to add some repositories. I added Vyatta and Debian from my closest mirror.
configure
set system
package repository vyatta components main
set system package repository vyatta distribution stable
set system package repository vyatta url http://packages.vyatta.com/vyatta/
set system package repository debian components main
set system package repository debian distribution stable
set system package repository debian url http://ftp.si.debian.org/debian/
commit
We can finally upgrade packages now.
apt-get update
apt-get upgrade
As of time of writing, only OpenSSL package is being upgraded, using Vyatta VC4.0.2 .

Since we added Debian repository as well, we can also install additional packages that are not available from Vyatta repository.