Vehicular ad hoc networks allow the exchange of information between vehicles to improve road safety. In addition, vehicles can be connected to the Internet through gateways placed alongside the roads, which allow drivers to use common Internet services and new applications specifically oriented to them. The European Telecommunications Standards Institute Technical Committee Intelligent Transport System has standardised the architecture and the communication protocols for an Intelligent Transport System, considering both safety applications and communications with the Internet. The GeoNetworking (GN) protocol has been designed to forward packets inside the vehicular ad hoc network taking safety requirements as the main concern. This paper analyses the GN protocol focusing on the provision of Internet connectivity to vehicles. The main contributions of this work are the identification of sources of performance losses when using the GN protocol in communications with the Internet and the proposal of different mechanisms to improve its performance in this type of communications. The evaluation of the GN protocol and the proposed improvements is conducted by means of extensive simulations.