  We propose a method for setting upper limits to the extragalactic background
light (EBL). Our method uses simultaneous {\em Fermi}-LAT and ground-based TeV
observations of blazars and is based on the assumption that the intrinsic
spectral energy distribution (SED) of TeV blazars lies below the extrapolation
of the {\em Fermi}-LAT SED from GeV to TeV energies. By extrapolating the {\em
Fermi}-LAT spectrum, which for TeV blazars is practically unattenuated by
photon-photon pair production with EBL photons, a firm upper limit on the
intrinsic SED at TeV energies is provided. The ratio of the extrapolated
spectrum to the observed TeV spectrum provides upper limits to the optical
depth for the propagation of the TeV photons due to pair production on the EBL,
which in turn sets firm upper limits to EBL models. We demonstrate our method
using simultaneous observations from {\em Fermi}-LAT and ground-based TeV
telescopes of the blazars \object{PKS 2155-304} and \object{1ES 1218+304}, and
show that high EBL density models are disfavored. We also discuss how our
method can be optimized and how {\em Fermi} and X-ray monitoring observations
of TeV blazars can guide future TeV campaigns, leading to potentially much
stronger constraints on EBL models.
