Redirect HTTP traffic to internal proxy

Hi everyone,
I’ve installed squid proxy server on windows 10 (My PC). I’ve got a Mikrotik routerboard 750up and I want to redirect all my http traffic to my proxy server and then to the Internet.

Mikrotik IP : 192.168.88.1
Proxy server IP : 192.168.88.252

I added a nat rule like dstnat from 192.168.88.0/24 and tcp port 80 dstnat to address 192.168.88.252 port 3128.

but it doesn’t work.

And I have no connection to the Internet. I’ve tried to disable Squid but no result. It’s not a problem with squid.
Squid is working very well when i configure firefox with it.

can you help me ? thx a lot

Best regards from France

This should fix the problem:
http://wiki.mikrotik.com/wiki/Hairpin_NAT


In your case:
/ip firewall nat add chain=srcnat src-address=192.168.88.0/24 dst-address=192.168.88.252 protocol=tcp dst-port=3128 out-interface= action=masquerade

thx for ya help but it doesn’t work.

You must except 192.168.88.252 from dst-nat if it is using the same network to get to the router.
Not doing this will loop your outgoing port 80 traffic from the proxy back to itself.
Just add an accept rule for src=192.168.88.252 into the dst-nat chain before the dst-nat redirect rule…