Localization in long-range Internet of Things networks is a challenging task, mainly due to the long distances and low bandwidth used. Moreover, the cost, power, and size limitations restrict the integration of a GPS receiver in each device. In this work, we introduce a novel received signal strength indicator (RSSI) based localization solution for ultra narrow band (UNB) long-range IoT networks such as Sigfox. The essence of our approach is to leverage the existence of a few GPSenabled sensors (GSNs) in the network to split the wide coverage into classes, enabling RSSI based fingerprinting of other sensors (SNs). By using machine learning algorithms at the network backed-end, the proposed approach does not impose extra power, payload, or hardware requirements. To comprehensively validate the performance of the proposed method, a measurement-based dataset that has been collected in the city of Antwerp is used. We show that a location classification accuracy of 80% is achieved by virtually splitting a city with a radius of 2.5 km into seven classes. Moreover, separating classes, by increasing the spacing between them, brings the classification accuracy up-to 92% based on our measurements. Furthermore, when the density of GSN nodes is high enough to enable device-to-device communication, using multilateration, we improve the probability of localizing SNs with an error lower than 20 m by 40% in our measurement scenario.