To add SQUID Proxy Caching Server support in Mikrotik Router os 5.1, Assuming the following Scenario.
MIKROTIK WAN IP For All = 126.22.20.82/29
MIKROTIK LAN IP For F1 = 192.168.0.5/24
MIKROTIK LAN IP For F2= 192.168.5.1/24
MIKROTIK LAN IP For SQUID = 192.168.9.1/24
SQUID LAN IP = 192.168.9.2/24
SQUID WAN IP = 126.22.20.85/29
/ip firewall nat
add action=src-nat chain=srcnat disabled=no dst-address=!192.168.0.0/16 \
src-address=192.168.0.0/24 to-addresses=126.22.20.82
add action=src-nat chain=srcnat disabled=no dst-address=!192.168.0.0/16 \
src-address=192.168.5.0/24 to-addresses=126.22.20.82
New to add this [or] what ?
add action=dst-nat chain=dstnat comment=Forward_WWW_to_proxy disabled=no dst-address-list=!WWW-No-proxy \
dst-port=8080,3128,80 protocol=tcp src-address=192.168.0.0/24 src-address-list=!Direct-No-Proxy \
to-addresses=192.168.9.2 to-ports=3128
add action=dst-nat chain=dstnat comment=Forward_WWW_to_proxy disabled=no dst-address-list=!WWW-No-proxy \
dst-port=8080,3128,80 protocol=tcp src-address=192.168.5.0/24 src-address-list=!Direct-No-Proxy \
to-addresses=192.168.9.2 to-ports=3128
Squid Conf... i have
acl localnet src 192.168.9.0/24 # Local Lan
Ip Tables & route in linux
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to 126.22.20.85:312
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -I INPUT -s 192.168.9.0/24 -p tcp --dport 3128 -j ACCEPT
iptables -t filter -D INPUT -j REJECT --reject-with icmp-host-prohibited
iptables -t filter -D FORWARD -j REJECT --reject-with icmp-host-prohibited
But having problems, not working. can anyone help me to short out, where is the problems ?