For old servers that need to stay that way (for whatever reason) updates are no longer available but you can access the packages that were available for that distro by pointing apt at the archive - for example see lenny:

deb http://archive.debian.org/debian/ lenny contrib main non-free
<span id="line-5" class="anchor"></span>

And for ubuntu:

deb http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse
<span id="line-11" class="anchor"></span>deb http://old-releases.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse
<span id="line-12" class="anchor"></span>deb http://old-releases.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse