Konfigurasi Mikrotik dan Squid Proxy

Konfigurasi Mikrotik dan Squid Proxy Ubuntu Sejajar Client
Topologi Jaringan and Hardware

Hardware :
- Kabel LAN
- Modem ADSL
- Mikrotik RB750
- PC Ubuntu Squid Proxy
- Switch
- PC Client
Koneksi port :
Port 1 di MT RB750 > port LAN di Modem
Port 2 di MT RB750 > port Switch
Port eth0 di Ubuntu Squid > port Switch

Konfigurasi Jaringan
IP Squid
IP Client
IP Modem
IP MT RB750


: 192.168.0.4/24
: 192.168.0.0/24
: 192.168.1.1/24
: 192.168.0.1/24

Konfigurasi Squid di Ubuntu 10.4
Install Squid di ubuntu
- masuk ke terminal
- ketik sudo su , isi password ubuntu anda
- ketik sudo apt-get update
- ketik sudo apt-get install squid
- Do you want continue [Y] Y
- apt-get install squid squidclient squid-cgi
- apt-get install ccze

Membuat Directory cache
- mkdir /cache1 && mkdir /cache2 && mkdir /cache3 && mkdir /cache4
- touch /var/log/squid/access.log
- touch /var/log/squid/cache.log
Mengaktifkan directory cache

- chown -R proxy.proxy /cache1
- chown -R proxy.proxy /cache2
- chown -R proxy.proxy /cache3
- chown -R proxy.proxy /cache4
- chown -R proxy.proxy /var/log/squid/access.log
Edit Squid.conf
- gedit /etc/squid/squid.conf
Silahkan download file Squid.conf disini (sesuaikan dengan jaringan,memory,hdd dari PC Proxy anda)
Pengecekan file Squid.conf
- squid -k parse
membuat direktori swap
- squid -z
- squid -DFY
cek squid apakah sudah berfungsi
- ps -ax|grep squid
Reboot Ubuntu Squid
Jalankan perintah terakhir di terminal
iptables -t nat -A POSROUTING -j MASQUERADE

Konfigurasi Tambahan di Mikrotik

/ip firewall nat chain=dstnat in-interface=ToSwitch src-address=!192.168.0.4 protocol=tcp dst-port=80
action=dst-nat to-addresses=192.168.0.4 to-ports=8080
/ip firewall nat chain=srcnat out-interface=ToSwitch src-address=192.168.0.0/24 protocol=tcp
action=src-nat to-addresses=192.168.0.1 to-ports=0-65535

Cek Apakah anda sudah terkoneksi dengan Proxy
Buka Browser dan masuk ke http://www.lagado.com/proxy-test