Posts

Showing posts with the label VyOS

Add SSH key to Vyatta for SSH authentication

I was trying to set up unattend ssh login for vyatta user by concatenate my computer's public key to /home/vyatta/.ssh/authorized_keys but every time the server gets restarted, the key's gone. I shouldn't do it that way because Vyatta has its own way of managing ssh keys. Do this instead: 1. From my computer, copy the public key to vyatta server: $ rsync -arv ~/.ssh/id_rsa.pub vyatta@vyatta:/home/vyatta (at this point, I have to enter the password for vyatta user) 2. On Vyatta, using Vyatta's commands to import the key: $ configure $ loadkey vyatta /home/vyatta/id_rsa.pub From now I don't have to enter password to ssh to Vyatta.

Apt-get update error in VyOS-1.1.6 (Debian 6.0.10 - Squeeze)

I's trying to install some packages on my VyOS (1.1.6 image) and got 404 errors with "apt-get update": Err http://ftp.us.debian.org squeeze/main Sources   404  Not Found [IP: 128.30.2.26 80] Err http://ftp.us.debian.org squeeze/contrib Sources   404  Not Found [IP: 128.30.2.26 80] Err http://ftp.us.debian.org squeeze/non-free Sources   404  Not Found [IP: 128.30.2.26 80] Err http://ftp.us.debian.org squeeze/main amd64 Packages   404  Not Found [IP: 128.30.2.26 80] Err http://ftp.us.debian.org squeeze/contrib amd64 Packages   404  Not Found [IP: 128.30.2.26 80] Err http://ftp.us.debian.org squeeze/non-free amd64 Packages   404  Not Found [IP: 128.30.2.26 80] W: Failed to fetch http://ftp.us.debian.org/debian/dists/squeeze/main/source/Sources.gz  404  Not Found [IP: 128.30.2.26 80] W: Failed to fetch http://ftp.us.debian.org/debian/dists/squeeze/contrib/source/Sources.gz  404  Not Found [IP: 128.30.2.26 80]...

Getting started with VyOS firewall

This is a super simple command lines to get started with VyOS firewall. In this example, we will create a firewall rule that block every packet coming out of interface eth0 except the client with IP address 172.20.1.11: 1. Create the firewall rule set by name set firewall name Genius default-action drop set firewall name Genius rule 1 action accept set firewall name Genius rule 1 source address 172.20.1.11 commit 2. Apply the rule set to an interface: set interfaces ethernet eth0 firewall out name genius commit save Reference:  https://wiki.vyos.net/wiki/User_Guide#Firewall

Dynamic DNS and OpenDNS on the vyatta box

Vyatta has problems with sending the ddclient traffic to OpenDNS on the same interface that it is updated. This means that the network identity in the OpenDNS dashboard is unreliable, and we get a lot of errors in the Vyatta logs. The workaround is to disable dynamic DNS configuration in Vyatta, and use a script based on cUrl. cUrl is like Wget, for downloading URLs, and it can be forced to use a specific interface. Steps to install: 1. Download the opendns_updater.sh script, and put it in /usr/local/bin/ on Vyatta. Make sure you update the username and password! Make it executable with chmod +x /usr/local/bin/opendns_updater.sh For convenience, I created one more script, opendns_update_all.sh, with this content, for example you have 5 Internet lines: #!/bin/bash /usr/local/bin/opendns_updater.sh <interface1> <Network Identity 1> /usr/local/bin/opendns_updater.sh <interface2> <Network Identity 2> /usr/local/bin/opendns_updater.sh <interf...