Archive for May, 2007

big mistakes in friday

Thursday, May 31st, 2007

shit!!!!!!!!! this friday about 3.00-4.00 a.m. i made a big mistakes. heh??? danm!!!!!!!!! from the tittle, i think you will know, why i wrote this blog. not about networking again.

hmmmmmpppfffffffffff, friday 3.00-4.00 am, i reconfigured firewall in the server. (i think you’ve already know the server), configuring, configuring, and done. first, it’s work well…. then, my friend told me, ‘jalan tol down’………. hmmmmmm, ‘down’ simple word and can make me panic. shiiitt!!!!!!! where’s the error????? i trace the rule ……….. one two three…… waks, back to last two-three days ago, i used default block rule to my server. last two-three days ago, the server can be accessed from outside, but, ‘jalan tol’ couldnot connect.. hmmmmmmmmm, then finally i found the error (lot of people help me ). till friday 2.00 am, it worked well, nothing happen with the connection……… just some error with the forum, and IRC.  then, i reconfigured again the firewall… i just wanna back to the normal setting, default block. hmmmmm…… why use default block rule?? i think its more secure than default accept rule. more secure means not 100 % secure……. first, i re-run the firewall, worked well, but ‘jalan tol’ down…………. duengg!!!!!!!!!!!!!!!!!!!!!!

trace, trace, trace, trace!!!!!!!!!!!!!!!!!!!!!..dunno. still confused. trace again……. then i used firewall rules that i configured last. then, and that mistake started…  i wrote  "pfctl -F all", then enter……………………. wakkksss!!!!!!!!!!!!!!!! no one couldnot connect to my server…………panic, really panic…… what i’ve done to my server????!!!!!!!!!!!!!!!!!!!! web,irc down!!!!!!!!!!!!!!!!!!!!!!!!!!! lot of people couldnot connect with the server…………… really panic. what should i do?? i must wait till monday, just for reconfiguring firewall again… big mistake in friday.

i’am a stupid admin……….

mengatasi error di PF

Monday, May 28th, 2007

moga aja pada ga bosen kalo artikelnya tentang PF lagi. ini sebenernya cuman mo nambahin aja. Tenang aja, gw disini ga akan bahas gimana cara bikin rule firewall, seting parameter PF, ato NAT+RDR de-el-el.
tadi pagi, sekitar jam 3 pagi-an, gw setting PF lagi…….. hmmmmmmmmm tapi lagi lagi error lagi lagi error, padahal sintaks nya udah bener……. duh, gimana ini???? gw liat di settingan pf.conf default bawaan dari *BSD, ga banyak membantu. ternyata dalam PF, ada aturan-aturan yang harus kita patuhi ketika kita bikin firewall. waaaaaaaaaaaa, apa aja itu????

gini aturannya

#1. set variable
#2. options rule
#3. scrub rules
#4. nat,rdr,binat
#5. rules, block pass, antispoof

kalo ga match ma urutan itu, ga bakalan jalan.

ini contohnya (di /etc/pf.conf)
###################aturan 1, set variable#############
if="rl0"
dns="{10.14.203.7,202.154.1.2,202.134.0.155,202.134.2.5}"
ga_penting= "{137,138,139,81}"
#voip="{5060, 4569, 5036, 9999 >< 20001, 2727}"
irc="{6666,6667,6668}"
ob_state = "flags S/SA keep state"
ib_state = "flags S/SA keep state"

################end set variable####################

##############aturan 2, options rule###################
set block-policy drop
set state-policy if-bound

set loginterface $if
set fingerprints "/etc/pf.os"

##############end options rule######################

#######aturan 3, scrub rules##########################
scrub in on $if all random-id
scrub reassemble tcp

############ end scrub rules #######################

################ aturan 4  nat rules#################
nat on fxp0 proto {tcp,udp,icmp} from 10.14.x.x to any -> 21.1.3.5
##############end aturan 4 nat rules#################
########silakan baca tutorial sebelumnya tentang NAT#########

###############aturan 5, antispoof, block, pass rules########
antispoof for $if
pass quick on lo0 all
pass out quick on $if proto tcp from any to $dns port 53 $ob_state
pass out quick on $if proto udp from any to $dns port 53 keep state

#####dan seterusmnya, silakan baca di artikel sebelumnya#########
############end aturan 5, antispoof, block,pass, rules#########

heheee, tinggal di save, trus jalanin aja pake pfctl -f /etc/pf.conf, and gotcha!!!!!!!!!!!!!!!!!!!!!!!!! jalan :D :D :D :D

semoga pengalaman gw bermain main dengan PF bisa berguna bagi temen temen semua. oh iya, rule nya enggak lengkap, udah ada di artikel sebelumnya (males nulisnya lagi). tinggal baca aja di artikel sebelumnya.

hehehe……………. sekian dan tingkyuuu dah baca artikel gw

Muticast Networks

Wednesday, May 16th, 2007

waks, apaan tuh multicast networks?? pasti dah sering denger dong apa itu unicast, multicast. ga ada salahnya kalo gw ngebahas lagi. apa sih multicast itu???

unicast : one-to-one retransmision, satu sender satu receiver. untuk arsitektur semacam itu, jaringan unicast akan lebih efisien, namun jika sender harus melayani banyak request, maka jaringan unicast sangatlah tidak efisien.

multicast : one-to-many transmision, satu sender multiple receiver. Multicast lebih efisien daripada broadcast. multicast  cocok digunakan untuk mengirimkan data yang sama ke multiple host, seperti streaming. multicast digunakan untuk network discovery seperti MDNS (multicast DNS), OSPF (yang gw tau cuman itu  :( :( :( )

Tadi disebutkan di atas, bahwa multicast lebih efisien dibanging dengan broadcast. mengapa itu bisa terjadi ??? Begini : agar dapat secara dinamis mengetahui lokasi dari suatu host, switch akan selalu me-listen frame yang datang (incoming frame) dan menyimpannya ke dalam suatu address tabel. Ketika sebuuah frame di terima oleh switch port, maka switch akan memeriksa source MAC address. Jika MAC address tadi tidak ada di dalam address table, maka MAC address, switch port dan VLAN akan di simpan di dalam address table yang terdapat di switch tadi. Switch akan lebih mudah mempelajari addres location berdasarkan incoming packet.
Dalam incoming frame, juga terdapat destination MAC address. Seperti yang dijelasin di atas, switch akan mengecek address table apakah ditemukan switch port dan VLAN yang cocok untuk address tujuan. Jika ditemukan, maka frame tersebut akan segera di forward ke address tujuan. Jika address tidak ditemukan di dalam address table, maka switch akan memflood incoming frame ke semua port switch yang telah di assign oleh source VLAN. Hal semacam ini dinamakan unkown unicast flooding dimana alamat unicast tujuan tidak diketahui.

Dalam Switch yang tidak support IGMP Snooping, multicast traffic diperlakukan seperti broadcast traffic, di flooding. Jadi, mengapa unknown multicast traffic di flloding berdasarkan aturan forwarding yang terdapat di layer 2?? karena dalam Multicast traffic terdapat :
source : Unicast MAC
destination : multicast MAC
Multicast MAC address tidak akan dapat pernah muncul sebagai sebuah Source, jadi dalam bridge table tidak akan pernah menggabungkan Multicast MAC address dengan port yang pas (spesifik). Sebagai akibatnya, MAC Addrees Multicast akan selalu di flood