Virtual Private Networks

A virtual private network (VPN) can add another effective form of security to data that moves from a remote client to a host network that can be located anywhere with a connection to the Internet.

A VPN uses a data tunnel to connect two points on a network through an encrypted channel. The endpoints can be a single network client and a network server, a pair of client computers or other devices, or the gateway to a pair of LANs. Data that passes through a public network such as the Internet is completely isolated from other network traffic. VPNs use login and password authentication to restrict access to authorized users; they encrypt the data to make it unintelligible to intruders who intercept the data; and they use data authentication to maintain the integrity of each data packet and to assure that all data originates with legitimate network clients.

Note

VPN functions occur at the IP or network layer of the ISO model. Therefore, they can operate on top of the Wi-Fi or other wireless protocols, which operate at the physical layer. VPNs can also pass data across a network connection that includes more than one physical medium (for example, a wireless link that passes data onward to a wired Ethernet network). In other words, a VPN is an end-to-end service; the data can use a wireless link, an Ethernet cable, an ordinary telephone line, or some combination of those and other transmission media.

In a traditional VPN, a remote user can log in to a distant LAN and obtain all the same network services that are available to local clients. VPNs are commonly used to extend corporate networks to branch offices and to connect users to the LAN from home or from off-site locations such as a client or customer's office.

A connection through a VPN server looks to the rest of the network exactly like a client device connected directly to the LAN. The only difference is the data from the VPN passes through a VPN driver and a public network instead of moving directly from the network adapter to the LAN. Figure 13-3 shows a typical VPN connection to a remote network.

A remote network can connect to a LAN through a virtual private network.

Figure 13-3. A remote network can connect to a LAN through a virtual private network.


All of the same security benefits also apply to short-range VPNs that tunnel through a wireless link and longer-range VPNs that start on a wireless network and relay the data to a remote server. These are two different uses for a VPN: a local VPN that only extends across the wireless portion of a network between the client devices and the access point, and an extended network that carries VPN-encoded data beyond the access points to a VPN server through a public network, such as the Internet or a dial-up telephone connection. An extended network is a traditional VPN that happens to originate from a wireless network client. The same VPN can also support connections that don't include a wireless segment and logins from public wireless services, such as the ones at airports or coffee shops. This setup is conventional for a VPN.

Local, short-range VPNs are interesting to people who operate wireless networks because they add another layer of security to wireless links. Because the data moving between wireless clients and the network access point is encrypted (using an algorithm that is more secure than WPA encryption), it is unintelligible to any third party who might be monitoring the radio signal. Because the VPN server won't accept data links at the access point from wireless clients that are not using the correct VPN drivers and passwords, an intruder can't break into the network by associating a rogue client with the access point.

The goal of a wireless VPN is to protect the wireless link between the clients and the access point and to lock out unauthorized users. Therefore, the isolated and encrypted data can only move across a single room rather than over hundreds or thousands of miles. Of course, the access point might also relay VPN-encoded data onward through the Internet to a network host in another location.

Figure 13-4 shows a wireless connection to a VPN. The VPN server is located between the wireless access point and the host LAN, so all of the packets that move through the wireless portion of the network are encoded. For clarity, the diagram shows the VPN server as a separate component, but the most practical way to add VPN security to a wireless LAN is to use a router or gateway that incorporates VPN support. VPN-enabled routers are available from several vendors, including Cisco, NETGEAR, and TRENDnet.

A VPN provides a secure connection between a wireless network and an Internet gateway or a local LAN.

Figure 13-4. A VPN provides a secure connection between a wireless network and an Internet gateway or a local LAN.


A VPN moves data through one or more intermediate networks to a destination on another network. The VPN's tunneling client encapsulates the existing data packets or frames by adding a new header with the routing information that instructs the packets how to reach the VPN's endpoint. The transmission path through the intermediate networks is called a tunnel. At the other end of the tunnel, the VPN server removes the tunneling header and forwards the data to the destination specified by the next layer of headers. The exact form of the tunnel doesn't make any difference to the data because the data treats the tunnel as a point-to-point connection.

The tunneling headers can take several forms. The methods used most widely in VPNs are Point-to-Point Tunneling Protocol (PPTP), Layer Two Tunneling Protocol (L2TP), and IP Security (IPsec) mode. PPTP and L2TP can move data through IP, IPX, and NetBEUI networks; IPsec is limited to IP networks. Both the client and the server must use the same protocol.

In PPTP and L2TP, the client and server must configure the tunnel for each transmission before they begin to exchange data. The configuration parameters include the route through the intermediate network and the encryption and compression specifications. When the transmission is complete, the client and server terminate the connection and close the tunnel.

Unfortunately, several data security analysts have identified significant flaws in PPTP that allow intruders to break into a PPTP-based VPN and sniff passwords and then decode encryption, read data, or inflict damage to a network server. Therefore, PPTP headers are not secure and should not be used.

In an IPsec network link, the client and server must establish the tunnel through the intermediate networks in a separate transaction before they begin to exchange data.

Both L2TP and IPsec offer specific advantages and disadvantages, but they're both good enough to create a secure link between a wireless network client and an access point. The differences among the three are technical rather than practical. You can find an excellent explanation of the internal operation of all three protocols in Microsoft's white paper entitled "Virtual Private Networking in Windows 2000: An Overview," which is available online at http://technet.microsoft.com/en-us/library/bb742566.aspx (but remember that the flaws in PPTP networks were identified after that whitepaper was written).

A VPN server (or host) can be part of a Linux/Unix or Windows server, or it can be built into a stand-alone network router or gateway. If your network already uses a separate computer as a dedicated server, you can use that computer as the VPN server. A separate piece of hardware might be a better choice if your network does not already have a full-blown network server.

Dozens of VPN equipment makers offer routers, gateways, and other products that support one or more of the VPN protocols. Each of these products has a different feature set, so testing the specific combination of client and server that you intend to use on your own network before you commit to them is essential. The Virtual Private Network Consortium (VPNC) is moving toward a set of interoperability tests and certification standards (much like the Wi-Fi standards for wireless Ethernet equipment). The VPNC website (http://www.vpnc.org/) lists the products that have passed the interoperability tests, and the site also provides links to information sources for a long list of VPN products.

If you're committed to using a Windows server, you can use either L2TP or IPsec with Windows Server 2003 or Windows Server 2008; if your server runs the older Windows NT Server 4.0 or Windows 2000 Server software, you're limited to L2TP (or the seriously flawed PPTP). The server also requires two network interface cards: one connected to the wired LAN or the Internet gateway and the other connected to the wireless network. The interface card that is connected to the wireless port normally connects directly to the wireless access point's Ethernet port. The exact process of installing an L2TP host on a Windows server is slightly different in each version of Windows, but the general steps are the same. For specific information about configuring a particular operating system, consult the online Help screens and Microsoft's Resource Kit and other online documentation for your server's operating system. The following sections describe the configuration steps in general terms.

Configure the connection to the LAN.

The link to the LAN or other network is a dedicated connection through a network adapter. The network connection profile for this connection must include the IP address and subnet mask assigned to this connection and the default gateway address assigned to the network gateway.

Configure the VPN connection.

The VPN connection is usually an Ethernet link to one or more access points. The connection profile on the server for the VPN connection must include the IP address and subnet mask assigned to this port and the addresses of the DNS and WINS name servers used by this network.

Configure the remote-access server as a router.

The server must use either static routes or routing protocols that make each VPN client reachable from the wired network.

Enable and configure the server for L2TP clients.

Windows uses Remote Access Service (RAS) and point-to-point protocol (PPP) to establish VPN connections. The Routing and Remote Access service enables RAS. A VPN connection requires the following RAS configuration options:

Configure L2TP ports.

Set each L2TP port to accept remote access.

Configure network filters.

Input and output filters keep the remote-access server from sending and receiving data that does not originate at a VPN client. These filters will reject data to or from unauthorized users, so those intruders will not be able to obtain an Internet connection (or a connection to the wired LAN) through the wireless network.

Configure remote-access policies.

Set the remote-access permission for each VPN client to allow access to the RAS server. The port type must be set to the correct VPN protocol (for example, PPTP or L2TP), and the profile for each connection must include the type of encryption in use. Windows offers three encryption strength options:

A wireless client connects to a VPN server through its wireless Ethernet link to the network access point, which the operating system sees as a LAN connection. To set up a VPN tunnel through that connection, you must install the tunneling protocol as a network service.

Windows XP and Vista include support for virtual private networks, but this support is not part of the default installation, so the first step in setting up a VPN client is to install the protocol.

In Windows XP and Windows Vista, a wizard makes the whole process easy. In XP, follow these steps to set up a VPN connection:

In Vista, follow these steps:

  1. Open the Control Panel.

  2. Select the Network and Sharing Center.

  3. In the Tasks list on the left side of the Network and Sharing Center, shown in Figure 13-10, select the Set up a connection or network option. A Choose a Connection Option window will open.


  4. Select the Connect to a workplace option and click the Next button. The wizard will ask if you want to use an existing connection.

  5. Select the No, create a new connection option. The wizard will ask if you want to use a VPN or a dial-up connection.

  6. Select the Internet connection (VPN) option. The wizard will then ask for details in the screen shown in Figure 13-11.

  7. Type the VPN server's address provided by the network manager in the Internet address field. This can be either a numeric address or a name.

  8. Type the name you want to use on your own computer for this VPN connection in the Destination name field.

  9. If you want to test the connection, click the Next button. If you don't want to connect, select the Don't connect now option and then click Next. The wizard will ask for your name and password.

  10. Type the name and password you use for this VPN account. If you want your computer to automatically send your password, turn on the Remember this password option. Click the Create button to establish the VPN connection and close the wizard.


To create a shortcut to a VPN on your desktop in Windows, follow these steps:

Windows XP and Windows Vista offer many VPN options that were not available in earlier versions of Windows. To set these options, follow these steps:

  1. Choose the Network Connections window from the Control Panel. If you have a shortcut to your VPN connection on the desktop, you can skip this step.

  2. Double-click the VPN icon. A Connect VPN to Internet window, like the one in Figure 13-12, will appear.


  3. Click the Properties button. The Properties window for your VPN client will appear. Figure 13-13 shows the General tab of the VPN to Internet Properties window.


  4. The IP address of the VPN server should already be visible in the Host name or IP address of destination field. The Dial another connection first option should be disabled. Click the Networking tab to view the dialog shown in Figure 13-14.


  5. Select the type of VPN server your network will use from the Type of VPN menu. If you don't know the VPN type, select the Automatic option.

  6. Select Internet Protocol (TCP/IP) or Internet Protocol Version 4 from the list of connection items, and click the Properties button to change the network settings, including the use of a DHCP server or manual settings for IP address and DNS.

  7. Click the Advanced tab to open the dialog shown in Figure 13-15. If your network is not already protected by a firewall, select the Internet Connection Firewall option. This will protect the wireless client from attacks coming through the Internet.


The Options and Security tabs in the VPN to Internet Properties window control connection options that normally don't change from the default settings. Network managers who want to change the security settings should instruct their users on how to configure these options to comply with the network's specific requirements.

Using a VPN client on a computer running Unix is more complicated than running a VPN from a Windows machine because the client is not integrated into the kernel. Therefore, you must find a client program that works with the version of Unix and the VPN protocol you're trying to use. No single program offers a universal VPN client, and some combinations, such as PPTP on BSD Unix versions, don't seem to exist at all.

Linux users, however, can choose from several IPsec implementations:

FreeS/WAN http://www.freeswan.org/
pipsec http://perso.enst.fr/~beyssac/pipsec
NIST Cerberus http://w3.antd.nist.gov/tools/cerberus/

IPsec is included in the OpenBSD distribution. You can find a tutorial that explains how to use it at http://tutorials.papamike.ca/pub/obsd_ipsec.html.

The IPsec implementation for FreeBSD is at http://www.r4k.net/ipsec/. For information about NetBSD IPsec, take a look at http://www.netbsd.org/Documentation/network/ipsec/.

OpenVPN (http://openvpn.net/) is an open source VPN that does not use IPSec. It can operate on Windows, Mac OS X, Linux, and Unix. It's designed for ease of use and security, even through noisy or otherwise unreliable networks.

When you connect your laptop to your corporate LAN through a public network at an airport or in a conference center, or if you're using a broadband wireless service, you can connect through that network to the Internet and onward to your corporate VPN server. Because you'll have to log in to the public network before you initiate the VPN connection, you should create a separate VPN via Public Network connection profile in addition to the one you use from your own office. The profile should point to your corporate VPN server, but it should not be your default connection.

To connect through a public network on a computer running Windows, follow these steps:

VPNs are an important part of many networks' security plans for off-site users. With just a few keystrokes or mouse clicks, you can establish access to your network resources from anywhere with an Internet connection. If any Internet technique can eliminate the apparent distance between you and your LAN, your office, and your colleagues without sacrificing security, a virtual private network is that technique.