STATIC DNS

Dear colleagues,


I have an internal web server, how can i redirect this site: WWW.example.com
to this: 192.168.168.1/radius/user/login.php?


waiting for your reply,
Regards,

You can do that with the proxy, but what is the purpose? What are you doing on your server?

Thanks for replying,

This is for the radius, so that each client can check his usage and the speed of his account!

Regards,

Then you could use static dns. It won’t change the page request. You would need to do that on the server.

/ip dns static
add name=www.example.com address=192.168.168.1

Insure the dhcp server issues your router localnet ip as the main dns server and “allow-remote-requests=yes” in your router dns settings.

I did tried this but the problem is in the address field.
i can’t put the ip with the extension, so the user must write all the URL http://www.examle.com/radius/admin/login.php to access his site!
This is the problem what we are facing!

any solution for this?


Regards,

Yes. Use the onboard proxy. Here is an example of how to set up a transparent proxy.
http://wiki.mikrotik.com/wiki/Manual:IP/Proxy#Transparent_proxy_configuration_example

Once you have the proxy set and enabled, then use the access list to deny access to that host and redirect to your server/page
http://wiki.mikrotik.com/wiki/Manual:IP/Proxy#Access_List

/ip proxy access-list
add dst-host=www.example.com action=deny redirect-to=192.168.168.1/radius/user/login.php

FYI: I have not tried this with an internal localnet server. My server is on the internet. It may cause a problem to redirect the request to a localnet server. That usually requires a hairpin nat, and I’m not certain how to do that with the proxy enabled.

Thank u man.. i appreciate it..


Regards