Friday, December 5, 2008

An example of Mikrotik and Squidproxy configuration

Here are some codes i get from a blog that provides an example of how to configure Mikrotik and Squidproxy. Check it out:

++ MT BOX [ 2.9.27 ]
———————————–
WAN:= 192.168.119.2
LAN1:= 192.168.123.1
WIFI1:= 192.168.124.1
SQUIDBOX:= 192.168.120.2

++ Squid Box [ MINT | SQUID 2.7STABLE5 zph mode on]
——————————————————-

INTERNET - MT - SWITCH — CLIENTS

++++++      |

++++++    SQUIDbox

 

+redirect http request (port 80/TCP) from 192.168.10.0/24  to proxy 192.168.120.1 port 3128
—————
ip firewall nat
add action=dst-nat  chain=dstnat src-address=!192.168.120.0/24 protocol=tcp dst-port=80  action=dst-nat to-addresses=192.168.120.1 to-ports=3128 comment="" disabled=no

SQUID 2.7 stable 5, integrated with zph.
must be transparent mode.

http_port 3128 transparent

compile squid

sudo ./configure –prefix=/usr/share/ –localstatedir=/var –libexecdir=${prefix}/usr/share/squid \
–srcdir=. –sysconfdir=/etc/squid –enable-gnuregex –enable-icmp –enable-delay-pools \
–enable-kill-parent-hack –enable-snmp –enable-cache-digests –enable-carp –enable-async-io=24 –with-aufs-threads=24 \
–with-pthreads –with-aio –with-dl –enable-storeio=coss,ufs,diskd,aufs –enable-removal-policies=heap \
-disable-wccp –enable-default-err-languages=Russian –enable-linux-netfilter –disable-ident-lookups \
–disable-hostname-checks –enable-underscores

make

sudo make install

No comments: