Transperant Proxy in a remote machine

Dear All,

I want to redirect all http traffic (IP network 10.0.0.0/24) from mikrotik box to a remote proxy server (203.112.204.241 and port 3128) running in linux/freebsd box.

How can Can I do it without using MT Web-Proxy ??

Please suggest.

regards,
Litu

DST NAT rule! :slight_smile: Or perferred, a web proxy with parent.

want to redirect all http traffic (IP network 10.0.0.0/24) from mikrotik box to a remote proxy server (203.112.204.241 and port 3128) running in linux/freebsd box.

try to make a vpn between two sites that allows to see both ends and now in the mikrotik you can redirect the traffic to linux proxy

Hi,

This is the config in MT (v3.28):

chain=dstnat action=dst-nat to-addresses=203.112.204.241 to-ports=3128 protocol=tcp src-address=10.0.0.0/24 dst-address=0.0.0.0/0 dst-port=80

My MT wan port IP is: 203.112.204.229

I got the following error in browser if i try to browse www.yahoo.com or anything :

ERROR

The Requested URL could not be retrieved

While trying to retrieve the URL: /

And in Squid log:
1256689646.668 1 203.112.204.229 TCP_DENIED/400 1437 GET / - NONE/- text/html
1256692810.831 1 203.112.204.229 TCP_DENIED/400 1437 GET / - NONE/- text/html
1256692812.014 1 203.112.204.229 TCP_DENIED/400 1437 GET / - NONE/- text/html

Any suggestion ??

Litu

Rather than redirect directly, it’s better to use the built in proxy with a parent proxy (your Squid box).

First enable the web proxy, and set up the parent:

/ip proxy set enabled=yes port=8000 parent-proxy=203.112.204.241

And then set up the transparent redirect:

/ip firewall nat add chain=dstnat action=redirect protocol=tcp dst-port=80 to-ports=8000 src-address=10.0.0.0/24

Then make sure that Squid is set up to answer those requests.