Next Previous Contents

4. Amrita VPN Configuration - Essential Features

Follow these steps to quickly start up AmritaVPN once you have run make install. You need to do two things now:

Note:

One running amvpn instance can only handle one point-to-point VPN connection with another machine. One amvpn process cannot establish multiple point-to-point connections. If you need multiple VPN connections from your machine simply run multiple instances of amvpn with different amvpn.conf files. A different amvpn.conf file from the default can be specified using the -c or --config-file command-line parameter. For instance: amvpn -c /etc/amvpn_xyz.conf. See Running multiple instances section for more details.

Note:

All configuration parameters can be specified in either short (eg: -c) or long form (eg: --config-file) in the command line. Also, all configuration parameters except config-file and daemon-mode can be specified in the configuration file. In the configuration file, the long name of the configuration is used without the preceding hyphens (--). One configuration option is specified per line in the config file. Eg: The line: 'log-level verbose' in the config file is equivalent to the command line '--log-level verbose' or its short command line form: '-l verbose'.

4.1 Configuring amvpn.conf

Following are changes required in amvpn.conf

4.2 Running amvpn-keytool

amvpn-keytool can be used to:

Let's say you have two machines M1 and M2 and you want M1 to act as VPN CA. Then you need to do:

[Note: CSR stands for Certificate Signing Request.]

Important Note:

Make sure that system time in the machine acting as the CA does not exceed system time in the client machines which will use the CA key and CA cert. Otherwise SSL authentication would fail till the system time in the client machines reach the timestamp present in the notBefore field of the CA certificate.

In M1:

  1. amvpn-keytool genca - generate CA key/cert
  2. amvpn-keytool genkey - VPN key/CSR for M1
  3. amvpn-keytool gencert - VPN cert for M1 signed by CA

In M2:

  1. amvpn-keytool genkey - VPN key/CSR for M2
  2. To generate VPN cert for M2 there are two methods:

Now in both M1 and M2 run:

amvpn-keytool secure amvpn

Note:

In genkey and genca steps you'll be prompted to enter information used to distinguish the certificate (this information is kept in CSR and is used when generating certificate). At least the common-name must be different for each certificate (including CA cert) - otherwise SSL authentication would fail.

Note:

Do not enter any value for the challenge password, if prompted during the genkey/genca steps. If challenge password is given AmritaVPN may not be able to read the key information at run time.

4.3 Connecting through proxy

The amvpn client can connect to amvpn server through a proxy. This option may be required if the amvpn server is sitting behind a firewall. AmritaVPN currently supports proxy authentication using Basic HTTP authentication.

The following options need to be set at the client side for connecting through proxy:

The HTTP CONNECT method is used for connecting through proxy server.

4.4 Automatic Reconnecting

The amvpn client will automatically reconnect to the server if the connection fails because of network reasons. Reconnect will not occur if the connection fails because of Certificate authentication failure.

By default amvpn client will attempt to reconnect indefinitely with a delay of 30 seconds between each reconnect attempt. These defaults can be changed using the following options:

If domain name of the server is specified in the server-ip configuration option (instead of its public IP address), at each reconnect the amvpn client will freshly look up the server's IP address through a DNS query.

4.5 Connecting two remote Microsoft/Samba networks

AmritaVPN can be used to connect two remote Microsoft/Samba networks together over Internet. This can be easily achieved by setting a few configuration parameters in the amvpn.conf file.

Note:

For this feature to work Microsoft network must be configured to work over TCP/IP. This is normally the case with Microsoft network configuration.

To connect your local and remote MS/Samba networks provide the following configuration options in amvpn.conf file:

The local-net, local-mask, remote-net, and remote-mask values are internally used by AmritaVPN to route broadcast messages generated by Microsoft Networking protocol, transparently to the remote network.

The broadcast messages will not be routed over multiple VPN hops. As an example, let us assume we have three networks 192.168.0.0, 192.168.1.0, and 192.168.2.0. We have connected 192.168.0.0 with 192.168.1.0 through amvpn. Then we've linked 192.168.1.0 with 192.168.2.0, also through amvpn. The broadcast messages coming from 192.168.0.0 network to 192.168.1.0 network, will not be taken by amvpn and routed to 192.168.2.0. This feature has been put in place to avoid broadcast loops.

In the previous example, if 192.168.2.0 network was, in turn, connected to 192.168.0.0 network, directly or indirectly, without this feature we would have broadcast loops. In other words, packets generated 192.168.0.0 will be transmitted to 192.168.1.0, which, in turn, will be transmitted to 192.168.2.0, and then back to 192.168.0.0. This cycle would repeat. By setting Time-To-Live (TTL) in the IP Packet (based on a configuration parameter) to a cut-off value we could solve this, but we feel that improper setting of TTL would create havoc. So we decided to have a limitation rather than have a potential problem for all our users.

In this example we can have a VPN link between 192.168.0.0 and 192.168.2.0 networks to overcome this limitation.


Next Previous Contents