Port Forwarding Multiple Webserver Different Domains Mikrotik
Port Forwarding Multiple Webserver Different Domains
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
- Enable webproxy service on router
- 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.
- Winbox - on the Menu ''IP--> Firewall --> NAT''
- CLI Terminal
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.
Until this step the configuration is complete. For testing we try to access our wenbserver domain name from the internet network.
- 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.