3

Click here to load reader

Deploy WPAD via DHCP Server MikroTik.pdf

  • Upload
    rino

  • View
    608

  • Download
    14

Embed Size (px)

DESCRIPTION

wwtwtwtwtwtwt

Citation preview

Page 1: Deploy WPAD via DHCP Server MikroTik.pdf

1

Deploy WPAD via DHCP Server MikroTik

Apa itu WPAD ?

Web Proxy Auto Discovery (WPAD) adalah metode yang digunakan untuk mendeteksi lokasi file skrip

Proxy Auto Config (PAC). Tujuannya , supaya kita tidak lagi melakukan manual config proxy di browser.

Ada 2 cara yang bisa digunakan untuk men-deploy WPAD yaitu 1. Melalui DHCP , 2. Melalui DNS.

Ref : http://tools.ietf.org/html/draft-ietf-wrec-wpad-01

Apa aja yang dibutuhkan :

1. Setup Web Server , digunakan untuk hosting file PAC (Proxy Auto Config)

2. File Proxy Auto Config (PAC)

3. Setup DHCP Server di MikroTik

Instalasi :

PC User

DHCPINFORM DHCPACK

DHCP Server MikroTik

252 = http://192.168.0.12/wpad.txt

Page 2: Deploy WPAD via DHCP Server MikroTik.pdf

2

1. Web Server

Install Apache2 di Ubuntu server (service proxy juga ada di OS ini)

Command :

apt-get install apache2

2. File Proxy Auto Config (PAC)

Buka notepad, copy paste script berikut , lalu simpan dengan nama wpad.txt

function FindProxyForURL(url, host)

{

if (isInNet(host, "192.168.0.0", "255.255.255.0")) {

return "DIRECT";

} else {

if (shExpMatch(url, "http:*"))

return "PROXY 192.168.0.12:3128" ;

if (shExpMatch(url, "https:*"))

return "PROXY 192.168.0.12:3127" ;

if (shExpMatch(url, "ftp:*"))

return "PROXY 192.168.0.12:3128" ;

return "DIRECT";

}

}

Catatan : IP Address 192.168.0.12 adalah IP Address yang menjalankan service proxy

Lalu upload file ini ke web server di folder /var/www, pastikan bisa diakses http://ip-web-

server/wpad.txt

3. DHCP Server MikroTik

Setup DHCP Server di MikroTik

Command :

/ip dhcp-server setup

Ikuti instruksi yang muncul di terminal console. Lalu tambahkan opsi 252 dengan command

sebagai berikut :

/ip dhcp-server option

add code=252 name=auto-proxy-config value=http://192.168.0.12/wpad.txt

/ip dhcp-server network

add address=192.168.0.0/24 dhcp-option=auto-proxy-config dns-server=192.168.0.1

gateway=192.168.0.1

Browser Support

Page 3: Deploy WPAD via DHCP Server MikroTik.pdf

3

Berdasarkan hasil uji coba, berikut list browser ( Windows 7 SP1) yang support wpad via DHCP Server :

IE v8.x : OK

Mozilla : Fail

Chrome 31.x : OK

More info : http://findproxyforurl.com/