Many homes and businesses today use a NAT router to manage multiple computers and devices on a single public IP address. To explain briefly,  may exist some complication associated to NAT router, this involved to the public IP address. NAT routers take the public IP address for itself and assign local IP addresses to computers and devices on the local network, this is because all of them can effectively share the same IP address. The system works well until you want to give access to files, programs or other information to people in external Internet. When they try to connect to the computer through the IP address, you are actually connecting to the router and it does not know how to forward the connection to the appropriate equipment unless it has been informed how.
When the router communicates which device should forward a connection, it is known as port forwarding. Each application server is based on a port number through which it works. Its port number is useful to give the router the information you need to forward a connection.
First, you must determine which port the application uses and the type of connection: it can be TCP or UDP. You can usually find this information in the program settings in the help documentation or online. Certain types of programs will use a specific port that is reserved for application such as HTTP for web traffic on port 80, or SMTP for sending email on port 25.
Most modern routers comes with a built-in virtual server option which allows to define a single public port on the router for redirection to an internal address called IP LAN and private LAN port. This feature is useful for hosting online services such as FTP, VoIP Servers, Printer Servers or Web servers. In other words, and with a more practical sense, basically what you do is open holes (ports) in the firewall to allow the correct IP routing requests that are made to the router. You must then log on the router and access the settings. This process is different for each router, so you will need to find help documentation and read about how to do and how to redirect ports. The following steps can help guide you and provide information on what you will find in the router, but keep in mind this is just a starting point.

We will take as an example a router D-LINK DIR-505 model

Step 1:

Login to the router, typing the gateway IP address, for this example the IP is

Step 2:

Once we have logged in we must go to 'Advanced' tab

Step 3:

The first page we found is virtual server configuration, there we can configure up to 8 virtual servers (DIR-505 model), select the 'Application Name' drop-down menu to get a list of predefined server types. If we select one of the predefined server types, must click the arrow button next to the drop-down menu to fill the field.

Step 4:

We can select a computer from the list of DHCP clients in the Computer Name drop down menu, or  manually enter the IP address of the computer at which we are going to open the specified port.

Step 5:

Setup the ports, there are two types of ports:
    Private Port.
        The port that will be used on the internal network.
    Public Port.
        The port that will be accessed from the Internet.
For example, if our ISP have blocked the port 80 we need to configure another 'unblocked' port, as port 8888, using the port 80 as private port and the port 8888 as public port. With this Virtual Server entry, all Internet traffic on Port 8888 will be redirected to your internal web server on port 80 at IP Address

Step 6:

Select the protocol used by the service. Can use UDP, TCP or both.  To specify any other protocol, select "Other" from the list, then enter the corresponding protocol number in the Protocol box.

Step 7:

Check the left box to activate or deactivate the entries and click the 'save settings' button.


Note: It is necessary to note that configuring virtual servers on your home  or office network is a exposure of your devices to attacks by outsiders, due this  you have to take all necessary security actions to protect your network from risks.