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 192.168.1.254

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 192.168.0.1.

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.

check

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.

When you have problems with your internet connection, one of the most viable solution is to change the DNS address. Especially if only work some internet-using applications, but the HTTP/HTTPS requests or other internet services do not work properly.

Concept of DNS

It was conceived as a hierarchical naming system for computers, services or any resource connected to Internet or a private network. Its main function is to translate and/or resolve intelligible names for people in binary identifiers associated with networked computers, this in order to better target and address these devices worldwide.

Functions of a DNS Server

When a user writes a web address in the address bar of the browser, the computer will fetch hierarchically by the translation of that address in an IP address. We said hierarchically, because normally the first search begins in the DNS's root  (servers that keep big routing tables that run the heart of this system) and once we have found the correct mapping, the machine will  find the specific address of the computer or "host" linked to DNS servers into particular domain that we are seeking.  Common users never communicate directly with the DNS server: name resolution is done transparently by the client applications (such as browsers, email clients and other applications that use Internet). When making a request that requires a DNS lookup, the request is sent to the local DNS server operating system. The operating system, before establishing any communication, check if the answer is in the cache. In a negative response, the request is sent to one or more DNS servers.
The DNS server also does a search in its cache, if  the response is found, it will be served to the client application, if not, then does a recursive search and when the answer is found it is stored in the cache of the same server for  future uses

How many DNS addresses has a router?

A router has two DNS addresses that are normally provided by the same Internet Service Provider, however, we have to know that the DNS servers can work independently of the ISP and, in fact, they are scattered all over the world, so that any user have a DNS server as near as possible.

How to manage DNS Addresses

We can configure the DNS Servers manually or automatically via DHCP. In other cases, network administrators have set up their own DNS servers.
Before starting thins we need to know the address of the Gateway router to access its web configuration. In any case, assuming that the Gateway uses the well known IP Address 192.168.1.254, used by some brands and models of routers, let's start giving an example using a D-LINK router.

The Index Page of D-LINK DIR 505 model

Step 1: Click on the 'Manual Internet Connection Setup' button. It will open he next window:

Many times we find the need to reserve IP addresses for specific purposes, this reservation is made through DHCP and most brands of modern routers let you do this configuration, as in the case of the router D-LINK model DIR 505, which allow us to reserve IP addresses, and assign the same IP address to the network device with the specified MAC address any time it requests an IP address. This activity is similar to the static IP configuration with the difference that the device should always make an IP address request from the router. The router will provide the device the same IP address every time. DHCP Reservations are helpful for server computers on the local network that are hosting applications such as Web and FTP. If you are going to use a computer just as a server it is needful toeither make a DHCP reservation or Static IP address.

In the strict sense, the DHCP reservation differs from the static IP  configuration in which the DHCP reservation is made on the router itself, instead, the static IP configuration set is done in the computer. In any case, the effect and applications are similar. This depends on the number of addresses available on the AP or router and this also can be configured within the same software.

There are three basic parameters to consider:

  • Computer Name:   This is a free-assignment parameter and is given to the computer which is configured with a reserved IP address. This may help you keep track of which computers are assigned this way. Example: Movie Server.  
  • IP Address: The LAN address that you want to reserve. You should have some care chosing this IP because it must be between the specified range given to the initial configuration of the router
  • MAC Address: You can enter this parameter in two ways:
    • Manually: in a shell command window, write ifconfig and the MAC address is HWaddr and is corresponding to your network adapter. If you are going to reserve for all the adapters of a PC, you must do this steps for every adapter, obviously, using a different IP Address for each single adapter.

Copy this code and paste in the MAC Address textbox.

Automatic: Using the cloning link/button built in web management of the router. In a D-link router this is 'Clone your PC's MAC Address'. Once you finished entering those parameters you can save the changes and maybe you would need to restart both, the computer and the router. 

Note: Please consider the fact of being carefully with IP assignment and to not repeat this for avoiding create network conflicts.