Allow access from outside to internal network

Dear Mikrotik master,

hello, i’m a newbie on this application. I have problem to make my mikrotik can be accessed from outside.
Firstly i will tell about my configuration, i am using mikrotik 2.9.27 which is has ip public 124.81.x.x and i have internal webserver which has ip address 192.0.x.x. The case is, i want when people from outside access on their browser by type my mikrotik ip address it will be redirect automatically to my internal webserver so they can see my website. Can anyone help me to solve this problem and give me example of a configuration for this case?
Thank you for your attention and respond.

Thanks,

zerone

Zerone

Welcome.

The solution to your problem is here: http://www.mikrotik.com/testdocs/ros/3.0/qos/nat.php There’s a section near the bottom which gives an example of Destination NAT.

Regards

Andrew

Hello Brother,

You need two pubic IPs. i have deployed this situation in two companies and it is working effectively.

Example of Destination NAT
If you want to link Public IP 10.5.8.200 address to Local one 192.168.0.109, you should use destination address translation feature of the MikroTik router. Also if you want allow Local server to talk with outside with given Public IP you should use source address translation, too Add Public IP to Public interface:

/ip address add address=10.5.8.200/32 interface=Public

Add rule allowing access to the internal server from external networks:

/ip firewall nat add chain=dstnat dst-address=10.5.8.200 action=dst-nat
to-addresses=192.168.0.109

Add rule allowing the internal server to talk to the outer networks having its source address
translated to 10.5.8.200:

/ip firewall nat add chain=srcnat src-address=192.168.0.109 action=src-nat
to-addresses=10.5.8.200
You are through at the level of mikrotik. On your webserver, you have to put the two ips i.e 10.5.8.200 with the corresponding gateway and 192.168.0.109 with the corresponding gateway. metric can be 1 and 2.

Please i will like to know if your problem has been solved.

simon
cameroon

Dear simon and andrew,

Thanks for you reply and it’s work, now i can access my local webserver from outside. :smiley:

I want ask one more, and now about the security, what rules i must put on my firewall to keep my website safety?after i open the outside connection i’m worried about my website will be hack by someone, can you give me some guide how to make secure my webserver base on your experience? :smiley:

Thanks,
zerone

If you run Apache then I’d recommend having a copy of this on your bookshelf:

[url][http://www.apachesecurity.net/[url](http://www.apachesecurity.net/[url)]

Otherwise, there are plenty of good articles on the web. Google is your friend.

Regards

Andrew