Transparent proxi in routerOS

hi

how do i setup a transparent web proxy in router OS?

as you can read in manual

Then, please explain this one from the manual a bit further:
src-address (IP address; default: 0.0.0.0) - the web-proxy will use this address connecting to the parent proxy or web site.
0.0.0.0 - appropriate src-address will be automatically taken from the routing table (preferred source of the respective route)

I am wondering especially about “… to the PARENT proxy …”
Or is it possible, simply to say, this is the IP-adrs, the proxy is listening on ? Then 127.0.0.1 should work, right ?

i followed it just as it is in the manual: http://www.mikrotik.com/testdocs/ros/2.9/ip/webproxy_content.php.
but this is not working.

please checkout my network diagram and advice. note that i have a masquerade between x.x.x.x/29 (global IP) and 192.168.32.1/22 (private ip).
x.x.x.x/29 in on ether1 and 192.168.32.1/22 in on ether2.
proxy.JPG

@uumar: Which version of RoS do you use ?

Parent proxy means that the routerOS device doesn’t fulfill the role of an active proxy, but rather passes on all requests to another proxy outside of the system. The src-address parameter sets the IP address routerOS will use to contact the parent proxy. If set to 0/0, it will pick the first IP address on the interface with the most specific route to the parent proxy. If set manually, it’ll use that instead.

That also means that the src-address parameter is not used unless you specify a parent proxy. If you don’t intend to use an outside proxy server, don’t set either.

uumar, it’s tough to guess at your configuration. Post the proxy configuration as well as your firewall rules (filter, nat and mangle).

Thanx for clarification. I am using an upstream (parent) proxy, but as I see, RoS finds the route itself, even in cae I do NOT specify anything for “src-adrs”.

However, I think, in case I specify a “Parent Proxy-IP/Port”, then RoS proxy should also do its job (caching), before passing the request upstream, if necessary.
Or, in other words, in case the request can be handled from cache, then no request to parent proxy. Otherwise, pass to parent, right ?
The point is, I want to use RoS Proxy for RAM cache only, and an upstream proxy, running squid.

As far as I know, parent proxy means that all traffic is handed off to the parent.

That is an interesting question.
I also have a small LINUX-internet-gateway-box running squid, connected to another LINUX-box on the web, with squid, too, and web-filter-SW (for parental control). In case, the request can be solved from the local squid, squid does NOT pass on the request to the parent proxy.
Which makes sense for a cache-hirarchy.
Something similar I just want to do with the MT-box, too: Requests to be satisfied from small RAM-cache, if possible, OR from upstream squid-cache in big LINUX-box. In this case, page should be stored in RoS-proxy-cache (if space available), and next time request can be satisfied from RAM.
Makes sense, or not ? :slight_smile:

Actually, I am fighting with this one on RoS 3.30. In case, you are right, then I will have bad cards -(, but I think, the explanation for “Parent Cache” is like".
In case, this HTTP-proxy can not do the job (fetch, get etc.), then pass it on to the parent, if avaliable.

you can always enable transparent proxy @ ip firewall nat. just add the following commands

chain=dstnat action=redirect to-ports=8080 protocol=tcp
src-address=x.x.x.x/x in-interface=ether1 dst-port=80



thanks guyz. now my transparent proxy is working. i realise i didnt specify src-address. it works after i specified src-address.