Browsing around I found the pieces of this solution, and I put them together in a guide.
I did not use the guide in the Raspberry site since I found it complicate to make it compatible with the mobile dongle, and I used instead the NetworkManager daemon, following many advices in that sense I found in technical blogs. The problem with this solution is that, as of now, it is incompatible with the native solution in the Raspian distribution, and so I removed some native network tools. This is relevant if you plan to alter the network configuraton of the Raspberry, but it is otherwise transparent.
The reason why I developed this solution is to have an autonomous IoT concentrator device; as succh, it does not provide Internet access to devices connected to the RPi through WiFi or wired Ethernet. In t