A cooperative commons is a type of ad hoc network in which all devices are required to communicate and carry each other's traffic, even when devices are associated with different administrative domains. Thus, infrastructure is constructed at little cost to each owner. One unusual feature of the cooperative commons is that as more devices join, total communication capacity increases. These advantages are possible when devices are willing to cooperate and use their own resources to carry traffic of others, but are undermined by selfish behavior, where a device's actions increases benefit for that device while decreasing the average benefit for all devices. This paper demonstrates that selfish behavior cannot be detected with the prominent routing protocols currently used in ad hoc networks, and proposes a novel approach that includes use of routing protocols in which selfish behavior cannot be concealed, and watchdog algorithms that observe behavior of neighbors for signs of selfishness. We prove that our approach reliably detects all acts of selfishness by individual devices in a network where devices are fixed and there are no packet collisions. We demonstrate that our watchdog algorithms work with a general class of routing protocols, and show how existing routing protocols can be extended to fit in that class.