How to change proxy error page in 3.28?

How to change proxy error page in 3.28?
I didn’t find where.

if you ftp to your router, edit webproxy/error.html

$(status) = status of error
$(error) = error message

I have a problem with images and css files.
How can i write the image and css file in the error.html?

Because this dont work:

<!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">
		<link rel="stylesheet" href="text.css" type="text/css">
		<title>ERROR: $(status)</title>
	</head>
	<body>
		<img src="webproxy/ih.jpg" border="1">

Can someone help me?

The reason your img-src doesn’t work is because webproxy/ is is not accessible via http. When the web-proxy displays an error page, it returns error.html, but any references to files are appended to the page your trying to access.

Ex:

  1. Block www.google.com in web-proxy
  2. Try to access www.google.com on a client (should get access denied message)

if my error.html says "
it will try to display an image from http://www.google.com/webproxy/myimage.jpg

but, if i use , it displays an image.

The error.html is only text that get’s sent back to your browser, it’s not a directory that’s accessible via http on the router.

Also, if you want to link against images stored on your router, you’d have to setup a transparent hotspot as it is accessible using http on the router.

Hope this makes sense.

Thank you for your answer.
I intend to try, if maintenance work is carried out on the net, I can use the pictures from the router board.
Since the html file can be read it was so close that it can also load images.
How do I create a transparent hotspot in connection with the Web proxy?

you can add CSS directly into HTML, using tag

inserting images:

<div style="height: 24px; background: no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAYCAYAAAFy7sgCAAAGsUlEQVRo3u2ZbWwcZxHHf3s%2B7LNbO3ZjXBtowprGODRX0qpNQCjmJKuVKhMl1P2AkCwhFOIKkCBSm9IXavGFKAixIAECwkmWo5MrhRI3Ub40IEwQgp6aIDg3Cd6eEqyIHEteah%2B1E69vhw%2BZtTaX8704ZzkKjHS6271nZ56ZZ%2BY%2F%2F%2BdZKF%2FCwYshx3EkkggLsD1v4FQkEZZYLCbAKyG9%2Ba9EIsG6hnUAf8x74K3aUC3j4%2BM54HcsR2oAIomwZOezkv%2FnSHpYNh%2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Ke5DfgYsCYAZ2ngD8CfAkzqTpW7xY%2F%2FSznyX%2FVeUb2kVmX4AAAAAElFTkSuQmCC)">&nbsp;</div>

Chupaka,

Wow, i did not know that about CSS. Thank your for that, I now know a bit more about CSS.

mk0000,

The reason for a “transparent” hotspot is simply so you can access html pages and images from the hotspot page as it is a small web-server. It’s a bit more complex, but you will be able to get Mikrotik as a small web-server:

Note: Move your www service to a different port (I use 8000):

/ip service set www address=0.0.0.0/0 disabled=no port=8000

Ex. Physical interface is LAN in my setup.

  1. Create a new profile with a folder name to be accessible:
/ip hotspot profile add name="Web Accessible" hotspot-address=0.0.0.0 dns-name="" html-directory=webaccess
     rate-limit="" http-proxy=0.0.0.0:0 smtp-server=0.0.0.0 login-by="" use-radius=no
  1. Create a new hotspot (but set it disabled) or you’ll loose access:
/ip hotspot add disabled=yes idle-timeout=none interface=LAN keepalive-timeout=none name="Web Accessible Hotspot" profile="Web Accessible"
  1. Create a new walled-garden ip entry to allow traffic across the interface with no login required
    (this will allow a hotspot with no restrictions, and no login requird):
/ip hotspot walled-garden ip add action=accept comment="Allow traffic to traverse this interface ( no hotspot restrictions or login required" disabled=no server="Web Accessible Hotspot"
  1. Enable hotspot on interface:
/ip hotspot set "Web Accessible Hotspot" disabled=no

Now, you have a small web-server on the Mikrotik that you can dump files into.
FTP into your router and delete all pages under webaccess/ directory.
Put any html, jpg, or any other file you want to access in this directory.

Ex. If you have these files on the router:
webaccess/mypage.html
webaccess/mypic.jpg

You can now directly access these files using:

http://<LAN IP>/mypage.html
http://<LAN IP>/mypic.jpg

To access your router’s main page:

http://<LAN IP>:8000

This may be a bit complex, but it will give you the ability to access files via HTTP stored on your router.

Thanks for the instructions.
It runs at best.
One question I have, but still … if I now create a page in the hotspot folder, how can this

  • Show unique surfing
  • Always show while surfing
    Thank you in advance.

Best regards,
Michael

We’re getting off topic here but…

I’m not quite sure what you mean.

It’s not possible using the standard hotspot mechanism.
Referenced from: http://www.mikrotik.com/testdocs/ros/3.0/pnp/hotspot.php

request for a remote host

  • if user is logged in and advertisement is not scheduled for this user, the requested page is served

If you want to do this, you’d have to use the “advertisement” system, every 1 sec to display a page, which then use variables to display frames or other web page style.

This would be a very complex setup though. To achieve your desired results, I would look into Squid proxy, or some other full featured web proxy system.

Thanks for the instructions.

  • Show unique surfing

I will show this site for every site the user is call…
Because: www.google.de → my Site was show, www.ebay.de → my Site was show and so on…

With regard to the hotspot, however, came on errors but …
I do not get some pages are rendered, but there is no error message and retrieve emails with such Outlook does not even work anymore.
I disable the hotspot again all is well … what can be the problem?

I want to display only the image place in the web proxy folder named error.png alone.
how could i do it.
pls share the html code

Hi Master Can you teach me how to do this for just a simple payment Reminder with image plain html?