## 1 Introduction  
Modern IT infrastructures can cover large geographic areas, and therefore, secure and reliable IT infrastructures are needed, while also guaranteeing low-cost factors, both in terms of space and time. The virtual private network (VPN) is one of the most reliable technology to satisfy this type of need, passing both through the \"old\" (PSTN) and through the most modern 4G/5G architectures [1, 2, 3]. VPNs create a secure connection between the user client and the remote endpoint. Traffic is encrypted to protect it from others. All this takes place via the VPN servers, to which the user's internet traffic is forwarded before reaching its destination [4]. This allows to use public Wi-Fi connections more quietly. Such connections can be easily intercepted, but thanks to a VPN you can avoid nasty intrusions while connected from a hotel, a shopping center or at the airport waiting for your next flight, especially accessing sensitive services, such as your home banking. In this case, it is the encryption offered by the VPN that makes the difference. A tunnel is built between the VPN client and the server on the public network to protect the connection and guaranteeing security and privacy for the users. The connection is initiated by the client that communicates with the server and, once the connection is created, the tunnel is established and the messages are encrypted between the two authenticated parties of the VPN link. Many types of VPN protocols have been proposed offering different security levels and features. So they present also different performance in terms of latency and throughput output parameters. The choice of the correct VPN solution is fundamental for the performance of the system. Moreover the compatibility with the hardware is important for the user experience. A clear separation between the protocols used on IPsee [5,6] or SSL [7,8] can be defined as follows. In this case, the different typologies of IPsec considered in our work are listed :  
* IKEv1-XAUTH, IKEv1-L2 TP, IKEv1 RSA
* IKEv2 RSA
* IKEv1 SITE TO SITE PSK, SITE TO SITE RASSIG
* IKEv2 SITE TO SITE RASSIG, IKEv2 SITE TO SITE PSK
* IKEv2 XRMI ROUTE BASED  
For the considered VPN SSL based [8,9]:  
* OpenVPN: ROAD WARRIORS, SITE TO SITE, SITE TO MULTI SITE
* Accel-PPP: SSTP ROAD WARRIORS, SSTP SITE TO SITE, SSTP SITE TO MULTI SITE
* Wireguard: SITE TO SITE, SITE TO MULTI-SITE, ROAD WARRIORS
* Ocserv : SITE TO SITE, ROAD WARRIORS  
The main contribution of this work focuses on demonstrating the power of OpenWRT Open Source firmware to implement different types of VPN infrastructures having a native Linux operating system \"under the hood\" with the possibility of installing it on various boards, from enterprise ones (Motherboard APU) to those TP-LINK/D-LINK for constrained environments and with poor connectivity problems. The main goal is to build an Open Source infrastructure for Smart Devices in IoT Environment for deployment in outdoor locations with poor network connectivity. The OpenWRT firmware allows to manage IPsec VPN initiator/respondor (Xauth, L2 TP, X509 IKEVI, and IKEY2), VPN client/server for OpenVPN, OpenConnect (aka Cisco AnyConnect) SSTP (Microsoft replaced the old and now insecure PPTPP) and Wireguard. It also allows using dynamic routing management systems through software such as Quagga (\"Quagga Routing Suite\", [[https://www.quagga.net/](https://www.quagga.net/)]([https://www.quagga.net/](https://www.quagga.net/)) (accessed on 15 June 2022)/Babeld (\"Babel Routing Suite\", [[https://www.irif.fr/~jch/software/babel/](https://www.irif.fr/~jch/software/babel/)]([https://www.irif.fr/~jch/software/babel/](https://www.irif.fr/~jch/software/babel/)) (accessed on 15 June 2022))/FRR (\"FRRouting Routing Suite\", [[https://frrouting.org/](https://frrouting.org/)]([https://frrouting.org/](https://frrouting.org/)) (accessed on 15 June 2022)).