Hi there
General question, I have a VM that is running SQUID as a proxy. This works perfect when I update any computer to use the Proxy server directly.
This works for HTTP and HTTPS
I have one Mikrotik router that connects to the internet on eth1.
Question, is it possible to use the SQUID proxy as a VM as a proxy for all connections to MK before reaching the internet?
Example, I any device connects to the router to use the internet, it needs to send the internet traffic to the proxy server, from the proxy server it will go back to the same router to reach the internet.
Yes, it is possible to use the SQUID proxy running on a VM as a proxy for all connections that pass through the Mikrotik router before reaching the internet.
One way to do this is by configuring the Mikrotik router to forward all incoming traffic to the SQUID proxy server. This is typically done by setting up port forwarding on the router, so that all traffic on port 80 (for HTTP) and port 443 (for HTTPS) is forwarded to the IP address of the SQUID proxy server.
Another way is by configure the Mikrotik as a transparent proxy, in this way the Mikrotik will intercept the traffic and forward to the Squid proxy, this can be done by the Mikrotik firewall rules, marking the HTTP and HTTPS traffic, and redirecting them to the proxy.
In either case, the SQUID proxy server will need to be configured to allow the router's IP address as a trusted client, and to allow traffic to pass through to the internet.
Keep in mind that if your Squid proxy has SSL bumping feature enable for SSL, you should make sure that Mikrotik router can handle SSL, otherwise the traffic will be blocked by Squid.
You should test the configuration with some troubleshooting and monitoring, to see if there's any issues or traffic not being forwarded correctly.
Also, you should keep the security in mind, the traffic between the Mikrotik and the proxy will be sent unencrypted, so it is a good idea to use a VPN connection between these two devices for secure communication.