Page 1 of 1

Redirect

Posted: Wed Jun 26, 2019 4:39 pm
by neoanderson
Hi guys

I need some help. Note sure how to explain what i need but im going to try my best. Ok so I have a very basic network, fiber to highsite, then link to office,

At the office I have a server running UCRM (client info system). There is a client side, and admin side, so clients can log in and create a ticket and check billing. My problem is when I create a client, it sends them a welcome mail with a link to the ucrm like this "http://www.example.com/first-login/1005 ... 21c37477f0" and it does not work. if i replace the domain with the ip it works because its all local. like this http://10.0.2.5/first-login/1005/270732 ... 21c37477f0.

My question, I would like to redirect local traffic that goes to www.example.co.za to that ip 10.0.2.5 in mikrotik. something like Walled garden in the hotspot(but cant use hotspot). Like a firewall rule or mangle. This should only be reachable from inside the network. I sent UCRM a mail and the response was "Looks like you need to create host mapping on your router for the www.neonetworks.co.za to resolve the DNS." no idea how to do that.

Please know I have my MTCNA cert but is still a beginner and only know basics. Thank you all in advance

Re: Redirect

Posted: Wed Jun 26, 2019 6:56 pm
by anav
Suggest using a consultant in your area! It will save much time.
https://mikrotik.com/consultants

Re: Redirect

Posted: Thu Jun 27, 2019 12:28 am
by sebastia
on router run this:
/ip dns static add name=www.example.co.za address=10.0.2.5

Re: Redirect

Posted: Sat Jun 29, 2019 2:58 pm
by sindy
on router run this:
/ip dns static add name=www.example.co.za address=10.0.2.5
The above will work if the clients use the Mikrotik with that record as their upstream DNS server. If they don't, they either have to me made to or you may use a dstnat rule on the router somewhere between the client and the internet uplink, redirecting requests to the actual public IP(s) of www.example.co.za to 10.0.2.5. But the clients may still be able to miss that rule if they e.g. use one network interface to connect to your network and another one to connect to the internet. So the only 100% reliable solution is to modify the UCRM's configuration to send 10.0.2.5 inside the link.

But maybe you have clients in the internet as well and www.example.co.za resolves to your own public IP, and what you actually look for is a hairpin NAT?