Introduction

Port forwarding is the term used for setting up you router to forward all traffic on a given port to the correct PC in the local network.
VPPPN uses a UDP port to communicate on the Internet, it is not always necessary to configure your network for port forwarding for VPPPN to work. However, if you are having problems connecting and the VPPPN client has shown a warning that has linked you to this page, you should consider setting it up.
For some types of router and firewall configurations this is necessary to have reliable two way communication between peers in the network.
It is not always possible to configure the router, for example if you are using a public Internet connection.
This guide helps you setup port forwarding for a home network using the administration console of a home ASDL router. The administration console is usually accessible with a browser on the URL
http://192.168.1.1

Configuration requirements

To set up the VPPPN client for port forwarding there are three steps required.

  • The PC which runs the VPPPN client must have a static IP address on the local network.
  • The router must forward traffic to the PC running the VPPPN client
  • The VPPPN client should be configured to use a fixed port
You must also open the firewall on your PC if there is one.

Static IP address

Usually IP address are automatically allocated by a service called DHCP which runs on the router. If your PC already has a static IP address on the local network you can skip to the next section.
If your network card is configured to "Obtain an IP address automatically" you can configure your DHCP service to always give the same IP address to the PC running the VPPPN client.
Your router should have a configuration page for DHCP, it may also be called Static IPs or Fixed IP/MAC bindings or mappings.

The image below shows and example of the configuration page in the ASDL router.


In this router to add a static IP you click the Add fixed host button.
The following page enables you to provide enter the fixed IP address and map it to the MAC address of you network card.


The MAC address being used by VPPPN is visible in the "Show local network config page", from the "Network" menu of the VPPPN client.

To start using the new IP assignment you should renew your DHCP lease.
In Windows this is done on the command line with

C:\> ipconfig /renew 
				
and on Linux

# dhclient -r
# dhclient
				

Port forwarding

When DHCP is configured for a static IP it is possible to set up port forwarding to forward all VPPPN traffic to the static IP address. Usually VPPPN traffic uses the openvpn port of 1194.
The following image shows the port forwarding page of the router.


This router configuration already has the openvpn port configured.

The following page shows the configuration adding the port forwarding rule to forward all VPPPN traffic on port 1194 to the newly configured static IP address.

Configuring VPPPN

In the abscence of a GUI tool to make this change the VPPPN client is configured buy editing the application-config.xml file.

The port-type property should be changed to "fixed" (lowercase)

<port-type value="fixed" />

the port should be set to the port being forwarded, by default it is already "1194"

<bind-port value="1194"/>