Caching Youtube

Puas rasanya, akhirnya bisa caching youtube (dan yang similar) :D.
Setelah sekian bulan “mangkrak” akhirnya jalan juga walau masih di mesin virtualbox.

Howto ini bukan untuk para pembenci youtube dan googlemap.
Tapi untuk youtube dan googlemap lovers.

bahan referensi yang jadi bacaan.
http://www.mail-archive.com/squid-users@squid-cache.org/msg54605.html
http://www.mail-archive.com/squid-users@squid-cache.org/msg51076.html
http://wiki.squid-cache.org/Features/StoreUrlRewrite
http://wiki.squid-cache.org/Features/StoreUrlRewrite/RewriteScript
Read more »

Cisco: konfig DHCP server

Request dari bos untuk setup dhcp di cisco, device yang dipakai cisco 1721

Kondisi yang diminta adalah dhcp untuk 10 komputer.
Jadi saya konfig untuk ip dhcp memakai ip 100 – 199.
Ip yang dibawah 100 nanti bisa dipergunakan untuk user yang tidak ingin memakai dhcp dan server (kalau ada).

ip dhcp excluded-address 192.168.0.1 192.168.0.99
ip dhcp excluded-address 192.168.0.200 192.168.0.255
!
ip dhcp pool 192.168.0.0/24
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.1
   dns-server 202.134.0.155 202.134.2.5
!

Read more »

Mikrotik: DHCP Pool usage

Diambil dari http://forum.mikrotik.com/viewtopic.php?f=9&t=19389

tested on 3.7

# WarnAt needs to be at what percentage you want to be warned you are running out of IP addresses.
:local WarnAt 10
#Name of DHCP Pool you want to monitor
:local DHCPPoolName dhcp_pool1
#Your Email to notify you when running out of available ip's
:local Email my@email.com
#Your mail server ip address
:local EmailServer 0.0.0.0

#Declare Variable
:local Total

:foreach i in=[/ip pool get $DHCPPoolName ranges] do={
#Get the DHCP pool range and put into a string.
:local range [:tostr $i]
#Get the Start address of the range
:local Start [:pick $range 0 [:find $range "-"]]
#Get the End address of the range
:local Stop [:pick $range ([:find $range "-"] + 1) 31]
#Calculate how many IP's are in the Pool by subtracting the end address and the start address and add one.
:local ip ($Stop - $Start +1 )
#Save the size of the pool to Total
:set Total ($ip + $Total)
}

#Get the name of the Server that is using the Pool
:local Server [/ip dhcp-server get [/ip dhcp-server find address-pool="$DHCPPoolName"] name]
#Get the number of IP address's used in the pool
:local Used [/ip dhcp-server lease print count-only where server=[/ip dhcp-server get [/ip dhcp-server find address-pool=$DHCPPoolName] name]]
#Subtract used from total to get available
:local Available ($Total - $Used)
#Calculate percentage IP's available
:local Perc (($Available * 100) / $Total)
#Setup e-mail
:local Subject ([/system identity get name] . " DHCP pool is at $Perc")
:local Body ("Out of $Total addresses you have $Available available")

#Send out Email when available ip's percentage is below or equal to warnat
:if ($Perc <= $WarnAt) do={
/tool e-mail send to=$Email subject=$Subject body=$Body server=$EmailServer
}
:log info $Body

Squid Delaypools

(migrasi dari geocities.com/adilinux)

Another useful squid feature is delay pools. Conceptually, delay pools are bandwidth limitations – “pools” of bandwidth that drain out as people browse the Web, and fill up at a rate you specify – this can be thought of as a leaky bucket that is continually being filled.
This is useful when bandwidth charges are expensive like in indonesia.
Delay pools provide a way to limit the bandwidth of certain requests based on any list of criteria. The idea came from a Western Australian university who wanted to restrict student traffic costs (without affecting staff traffic, and still getting cache and local peering hits at full speed).

To enable this, configure squid with the –enable-delay-pools option. There are 3 classes of delay pools – class 1 is a single aggregate bucket, class 2 is an aggregate bucket with an individual bucket for each host in the class C, and class 3 is an aggregate bucket, with a network bucket (for each class B) and an individual bucket for each host. Read more »