Community discussions

MikroTik App
 
bronco1980
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Wed Jul 22, 2009 5:02 pm

STATIC DNS

Sat Mar 22, 2014 2:08 pm

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,
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: STATIC DNS

Sat Mar 22, 2014 2:12 pm

You can do that with the proxy, but what is the purpose? What are you doing on your server?
 
bronco1980
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Wed Jul 22, 2009 5:02 pm

Re: STATIC DNS

Sat Mar 22, 2014 2:51 pm

Thanks for replying,

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

Regards,
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: STATIC DNS

Sat Mar 22, 2014 3:22 pm

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.
 
bronco1980
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Wed Jul 22, 2009 5:02 pm

Re: STATIC DNS

Sat Mar 22, 2014 3:47 pm

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,
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: STATIC DNS

Sat Mar 22, 2014 4:46 pm

Yes. Use the onboard proxy. Here is an example of how to set up a transparent proxy.
http://wiki.mikrotik.com/wiki/Manual:IP ... on_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 ... ccess_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.
 
bronco1980
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Wed Jul 22, 2009 5:02 pm

Re: STATIC DNS

Sat Mar 22, 2014 6:16 pm

Thank u man.. i appreciate it..


Regards

Who is online

Users browsing this forum: GoogleOther [Bot], hex2bin and 38 guests