The traditional use of residential gateways (RGs) is limited to the owners of the RG (residential users) only. The umbrella project on the Collaborative Community Network (CCN) 2 opens up RG infrastructure to the community by enabling wireless access to the infrastructure, thereby permitting broadband Internet sharing within neighbourhoods. Therefore, it is essential that providers (RG owners) have mechanisms in place to protect their RG infrastructure against various security threats that arise due to the nature of wireless transmission and that roaming users (MNs) can efficiently interact with RGs in order to capitalise on their services. In this research efficient and scalable solutions for RG service discovery are proposed, a systematic threat analysis is carried out to identify potential security threats, and finally we conduct a detailed performance evaluation of the proposed solutions which validates our proposal.