Creating a Virtual Private Network
A Virtual Private Network (VPN) is an encrypted channel that operates across public networks. The encryption keeps your information private. VPNs are used to connect remote offices, distributed manufacturing sites, and remote workers.
We've discussed copying files with nc
, or scp
, or ssh
. With a VPN network, you can mount remote drives via NFS and access resources on the remote network as if they were local.
Linux has clients for several VPN systems, as well as client and server support for OpenVPN.
This section's recipes will describe setting up an OpenVPN server and client. This recipe is to configure a single server to service multiple clients in a hub and spoke model. OpenVPN supports more topologies that are beyond the scope of this chapter.
Getting ready
OpenVPN is not part of most Linux distributions. You can install it using your package manager:
apt-get install openvpn
Alternatively, this command can also be used:
yum install openvpn
Note that you'll need...