From askubuntu:
Security updates are available for 12.04, 12.10 and 13.10, see Ubuntu Security Notice USN-2165-1.
So first you need to apply the available security updates, for example by running:
sudo apt-get update sudo apt-get upgrade
from the command line.
Do not forget to restart the services (HTTP, SMTP, etc.) that use the affected OpenSSL version, otherwise you are still vulnerable. See also Heartbleed: What is it and what are options to mitigate it? on Serverfault.com.
The following command shows (after an upgrade) all services that need to be restarted:
ps uwwp $(sudo find /proc -maxdepth 2 -name maps -exec grep -HE ‘/libssl.so.* (deleted)’ {} \; | cut -d/ -f3 | sort -u)
After that, you need to regenerate all server SSL keys (you don’t need to since , then evaluate whether your keys may have leaked, in which case attackers may have retrieved confidential information from your servers.
More at this fantastic webpage, Heartbleed.com. And you definitely should get tested!
Note that you should regularly run the first two commands mentioned which ensures all packages on your box are up to date.