Ubuntu servers SHOULD be LTS

I was young. Bleeding edge was what i wanted. Little i knew that non-LTS Ubuntu releases become obsolete after 9 months (ref).

After reading a lot about the shell-shock, I tested whether my VPS was vulnerable to it. And it was! It was an Ubuntu Server 13.10.

I thought a simple apt-get update && apt-get upgrade would fix it. But no. The repositories were obsolete. I was getting errors like these:


W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-security/restricted/binary-i386/Packages 404 Not Found [IP: 91.189.88.153 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-security/universe/binary-i386/Packages 404 Not Found [IP: 91.189.88.153 80]
...

Following this guy’s advice on Askubuntu.com was life saving.


$ sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
$ sudo apt-get update && sudo apt-get dist-upgrade
$ sudo apt-get install update-manager-core
$ sudo do-release-upgrade

All seemed to go fine until i got an error saying:

import apt ImportError: No module named apt

More googling led me to this post on stackoverflow. I ran the following command:

$ apt-get install python-apt

do-release-upgrade was able to continue then. After pressing yes to multiple questions, few reboots, my Ubuntu server was finally on Ubuntu 14.04 LTS 😀

The Bash Patch

Logan made a little presentation titled “Shellshock: Survival guide” at the Univeristy of Mauritius (UoM).

Logan said that he was suggesting a patch that would consist of disabling certain “features” of Bash. According to Google and other people, it would break the internet as the patch would not be backwards compatible.

Personally, I feel a perfect patch would do these following 2 things:
1. Fix the shell shock bug
2. Not break existing applications

From the presentation, it seemed to me that the shell shock problem could be fixed by just fixing the parser or maybe in the future use a drop-in replacement parser.

Logan then mentioned that the parser is linked to a network interface which complicated stuffs. He suggested that the parser should be separated from the network interface and thus breaking lots of existing applications which does not fall into the category of perfect patch.

There was not enough demos of vulnerabilities in the presentation except the shell shock test which everyone is posting on the internet

$ env x='() { :;}; echo vulnerable' bash -c 'echo hello'

Logan was suggesting to use his hardened Bash patch inside Linux containers (LXC, docker) so as you can make only your application compliant to the hardened Bash rather than making your whole operating system compliant.

Anyways, due to lack of information on the subject, I can really decide whether Bash can be ever “fixed” or not.

Network Restart on Ubuntu >14.04

I used to use the commands below a lot:

$ sudo service networking restart

But it fails giving the following output

stop: Job failed while stopping
start: Job is already running: networking

After some googling , seems like we need to restart network-manager instead.

$ sudo service network-manager restart

I’m trying to bridge an LXC container to my home LAN but i kept screwing my /etc/network/interface and had to restart my laptop each time.