Lompat ke konten Lompat ke sidebar Lompat ke footer

Port Forwarding Multiple Webserver Different Domains Mikrotik

Article

Port Forwarding Multiple Webserver Different Domains


In the previous article we tried to port forwarding so that the web server on the local network can be accessed using the IP Public installed in the router. For more information can be found at the following link here.

But what if we want to access more than one webserver on a LAN network using a domain name from the internet. And each of those domain names we resolve to one Public IP installed in the router.

This can be done using MikroTik router which is with NAT configuration and combined with other features namely Web Proxy and Dns Static.

Example of a case



Port Forwarding Multiple Webserver Different Domains Mikrotik
Port Forwarding Multiple Webserver Mikrotik


With the topology as above, when there is a user who will access from the internet using a domain name will be resolved to ip public installed in the router. So that the request traffic from the internet can be redirected to each webserver on the LAN network according to the domain name, then we will use webproxy. The configuration on the web proxy is as follows:


  • Enable web proxy service on router

Port Forwarding Multiple Webserver Different Domains Mikrotik
web proxy mikrotik


  • For security we will configure on 'webproxy access' by only allowing request traffic from the domain names of both the webserver and the other traffic to be blocked.

Port Forwarding Multiple Webserver Different Domains Mikrotik port forward server
Multiple Webserver Different Domains Mikrotik


After the webproxy configuration as above we will then set NAT in the firewall menu. For NAT later we will redirect any traffic with the purpose of port 80 that enters the router from the internet network to the webproxy. The configuration of NAT is as follows:


  • Winbox - on the Menu ''IP--> Firewall --> NAT''

Port Forwarding Multiple Webserver Different Domains Mikrotik fitur nat NAT
Ip firewall NAT Mikrotik


  • CLI Terminal

Port Forwarding Multiple Webserver Different Domains Mikrotik CLI Terminal Terminal
Terminal Mikrotik firewall


And our last step is also to configure the Static DNS in the router to map/resolve the domain name to each webserver IP address on the LAN network. Examples of configurations are like the following:


  • We enter on the IP --> DNS menu, and click on the command button 'Static'. We fill in the list for the domain name as well as the IP Address of the webserver.

Port Forwarding Multiple Webserver Different Domains Mikrotik IP DNS


Until this step the configuration is complete. For testing we try to access our wenbserver domain name from the internet network.


*) Note:

  • We must first purchase the domain name on the domain service provider & hosting and fill in the A record with the Public IP of our router.
  • To be more stable IP Public from our router using IP Public Static.


Thankyou So Much to visit artickle Port Forwarding Multiple Webserver Different Domains Mikrotik. i hope you enjoy.

Posting Komentar untuk "Port Forwarding Multiple Webserver Different Domains Mikrotik"