Thursday, August 20, 2009

Web Proxy pada mikrotik

Langkah-langkah membuat web proxy menggunakan mikrotik.

[bastian@Mikriting] > ip proxy pr
enabled: yes
src-address: 0.0.0.0
port: 8080
parent-proxy: 0.0.0.0
parent-proxy-port: 0
cache-administrator: "webmaster"
max-cache-size: unlimited
cache-on-disk: yes
max-client-connections: 600
max-server-connections: 600
max-fresh-time: 3d
serialize-connections: no
always-from-cache: yes
cache-hit-dscp: 4
cache-drive: system

Buat NAT:

ip firewall nat add chain=srcnat action=masquerade out-interface=Astinet

ip firewall nat add chain=dstnat action=redirect to-ports=8080 protocol=tcp src-address=192.168.0.0/24 dst-address=!192.168.0.0/16 in-interface=Local dst-port=80

Buat Mangle:

ip firewall mangle add chain=output action=mark-packet new-packet-mark=Proxy-Hit passthrough=no out-interface=Local dscp=4

ip firewall mangle add chain=prerouting action=mark-packet new-packet-mark=Test-Up passthrough=no src-address=192.168.0.0/24 in-interface=Local

ip firewall mangle add chain=forward action=mark-connection new-connection-mark=Test-Conn passthrough=yes src-address=192.168.0.0/24

ip firewall mangle add chain=forward action=mark-packet new-packet-mark=Test-Down passthrough=no in-interface=Astinet connection-mark=Test-Conn

ip firewall mangle add chain=output action=mark-packet new-packet-mark=Test-Down passthrough=no dst-address=192.168.0.0/24 out-interface=Local


Sesuikan ip yang dibutuhkan.

Special thanks to donipermono1982 (Kaskuser)

No comments: