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
And for ubuntu:
deb http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse