Redirect

Hi,

I run an organisation.

I am using squid in Linux machine. My staff access internet via proxy and they know the gateway and DNS.
They sometimes change their IP, Gateway and DNS to use internet.
However, whenever they use internet with different ip , i want them to be redirected to my squid ip and port.

Linux machine IP
eth0-192.168.1.60 to router then to internet

eth1-squid ip:192.168.2.1:4880

Eg: When people try to access internet from an IP like, 192.168.1.25, it should redirect to squid.

I wud appreciate any help that comes on this.
Thanks !

Going to need some more information to make a more accurate rule, but this is very simple to do with a NAT rule. Mainly I’m not sure where your Squid proxy is located on the network or how you have your network set up.

/ip firewall nat
add chain=dstnat action=dst-nat src-address=192.168.1.0/24 protocol=tcp dst-port=80 to-address=192.168.2.1 to-port=4880

Note that this will likely only work for HTTP, you can try to add a rule for HTTPS, but I think that would end up breaking it and not work.

Thanks. Its is working.Will give more information if i get an problem.

Regards
Suresh