Community discussions

MikroTik App
 
User avatar
cholegm
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Thu Jul 19, 2007 7:43 pm
Location: Gornji Milanovac, Serbia
Contact:

Can I change proxy redirect pages?

Sat Jul 28, 2007 12:18 am

Now I need help!? :)

I have MT with configured web proxy.

Can I change proxy redirect pages???

Simple: I have rule to deny *.exe and when somebody (client) thy to download exe file proxy redirect him to error the page "Access deny..."

I wont to translate that page and add some text about ruls on network... :?
 
User avatar
cholegm
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Thu Jul 19, 2007 7:43 pm
Location: Gornji Milanovac, Serbia
Contact:

Re: Can I change proxy redirect pages?

Mon Jul 30, 2007 9:13 am

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to retrieve the URL:
<A HREF="http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe">http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe</A>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Access Denied.
</STRONG>
<P>
Access control configuration prevents your request from
being allowed at this time.  Please contact your service provider if
you feel this is incorrect.
</UL>
<P>Your cache administrator is <A HREF="mailto:webmaster@domain.com">webmaster@domain.com</A>. 
<BR clear="all">
<HR noshade size="1px">
<ADDRESS>
Generated Sun, 30 Jul 2007 8:10:45 GMT by proxy.domain.com (squid/2.5.STABLE11)
</ADDRESS>
</BODY></HTML>
Can I change it?
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Can I change proxy redirect pages?

Mon Jul 30, 2007 9:16 am

You are not able to change pages builtin in RouterOS proxy, however it is possible to use 'redirect-to' option in access list, that will redirect user that hitted prohibited resource to specific page.
 
User avatar
cholegm
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Thu Jul 19, 2007 7:43 pm
Location: Gornji Milanovac, Serbia
Contact:

Re: Can I change proxy redirect pages?

Mon Jul 30, 2007 9:30 am

OK :( (maybe will be in 3.xxx :) )

Can you write a simple code. To understand how to do that.

Thanks
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Can I change proxy redirect pages?

Mon Jul 30, 2007 9:43 am

ip proxy access add dst-host=www.youcannotgothere.com redirect-to=www.mypagetoshow.com
 
User avatar
cholegm
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Thu Jul 19, 2007 7:43 pm
Location: Gornji Milanovac, Serbia
Contact:

Re: Can I change proxy redirect pages?

Mon Jul 30, 2007 10:00 am

OK I know for that.

But i config webproxy with rule to deny *.exe files.

I must make rule to redirect from MT proxy page to mypage...

Because webproxy don't have option redirect-to I set as parent proxy my second MT with configured proxy. And every works for a pages. But for rules to deny download some files... not working! I don't have a rule to redirect from hardcored MT pages to some my page!
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Can I change proxy redirect pages?

Mon Jul 30, 2007 10:33 am

For redirect-to you need to use MikroTik proxy (web-proxy test package).
Use appropriate matcher (dst-host or path I guess) to determine .exe content.
 
User avatar
cholegm
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Thu Jul 19, 2007 7:43 pm
Location: Gornji Milanovac, Serbia
Contact:

Re: Can I change proxy redirect pages?

Mon Jul 30, 2007 11:12 am

Problem resolved!

Thanks for help! You have beer from me! :)

/ ip proxy access
add action=deny path=:\\.zip$ redirect-to=www.domain.com
I use webproxy because I don't know that url= (in webproxy) and path= (in proxy) it same (can do the same job)!

Now I use only Proxy (webproxy-test)!

End every working OK!!


Thanks!!!

Who is online

Users browsing this forum: ashraf993, GoogleOther [Bot] and 92 guests