Friday, December 14, 2007
cara membuat Repository Sendiri
mo bkin repo buat jaringan lokal ya.... , paling gampang pake cd debiannya aja copy semua cd debianmu ke HD.trus arahkan source.list-mu ke tempat penyimpanan tadi... misal semua cdnya kamu copy ke /home/cd1 untuk cd1,maka di source.list-mu kamu tambahin deb file:///home/cd1 sarge main terusin ampe semua cd yang tercopy...pake web server kan?? ya tinggal atur2 aja konfigurasinya biar /home-mu bisa tampil di browser...trus di client-nya,source.list-nya tambahin deb http://ipyang_nyediain_repo/cd1 sarge main... mungkin bisa memban
blokir situs xxx
Mikrotik Sebagai Router,Firewall, Web Proxy dan Bandwith Limiter.
Mikrotik merupakan sebuah software yang berlisence yang menggunakan kernel linux. Untuk menginstal software tsb sangat lah gampang, booting dari cd room pilihlah service yang yang kita butuhkan dengan menekan tanda silang (x) lalu tekan “i “ untuk menginstall.SELESAI
I. Mikrotik Sebagai Router.
Untuk awalan konfigurasi ip kita sebagai berikut :
IP 10.168.16.10/28 —à Internet dengan gateway 10.168.16.1 dan IP : 192.168.10.1/24 —-à LAN.
Perintah diatas untuk merubah nama interface. Default nama interface yang di berikan adalah Eth0 dan Eth1.
Lalu berikut ini perintah untuk memberi IP
Berikan gateway dari router tsb dgn perintah :
Setelah itu kita NAT kan ip LAN yaitu 192.168.10.1/24 dengan perintah sbb :
add chain=srcnat out-interface=Internet src-address=192.168.10.0/24 action=masquerade comment=”" disabled=no
lalu:
Selesai sudah computer anda menjadi sebuah router sengan system operasi Mikrotik.
Untuk pengujian cobalah computer anda yang lain dengan konfigurasi ip yang di sesuaikan dengan IP LAN dengan gateway ip LAN routernya.
II. Firewall di Mikrotik
Apabila mesin anda hanya dapat di aksess hanya dari ip yang anda ingin kan, itu dapat di atur di perintah firewall filter nya.
Berikut cth firewall yang saya berikan :
Sebelumnya definisikan ip yang anda inginkan untuk di permitkan dengan perintah
add chain=forward connection-state=established action=accept comment=”allow \
established connections” disabled=no
add chain=forward connection-state=related action=accept comment=”allow \
related connections” disabled=no
add chain=virus protocol=udp dst-port=135-139 action=drop comment=”Drop \
Messenger Worm” disabled=no
add chain=forward connection-state=invalid action=drop comment=”drop invalid \
connections” disabled=no
add chain=virus protocol=tcp dst-port=135-139 action=drop comment=”Drop \
Blaster Worm” disabled=no
add chain=virus protocol=tcp dst-port=1433-1434 action=drop comment=”Worm” \
disabled=no
add chain=virus protocol=tcp dst-port=445 action=drop comment=”Drop Blaster \
Worm” disabled=no
add chain=virus protocol=udp dst-port=445 action=drop comment=”Drop Blaster \
Worm” disabled=no
add chain=virus protocol=tcp dst-port=593 action=drop comment=”________” \
disabled=no
add chain=virus protocol=tcp dst-port=1024-1030 action=drop comment=”________” \
disabled=no
add chain=virus protocol=tcp dst-port=1080 action=drop comment=”Drop MyDoom” \
disabled=no
add chain=virus protocol=tcp dst-port=1214 action=drop comment=”________” \
disabled=no
add chain=virus protocol=tcp dst-port=1363 action=drop comment=”ndm requester” \
disabled=no
add chain=virus protocol=tcp dst-port=1364 action=drop comment=”ndm server” \
disabled=no
add chain=virus protocol=tcp dst-port=1368 action=drop comment=”screen cast” \
disabled=no
add chain=virus protocol=tcp dst-port=1373 action=drop comment=”hromgrafx” \
disabled=no
add chain=virus protocol=tcp dst-port=1377 action=drop comment=”cichlid” \
disabled=no
add chain=virus protocol=tcp dst-port=2745 action=drop comment=”Bagle Virus” \
disabled=no
add chain=virus protocol=tcp dst-port=2283 action=drop comment=”Drop Dumaru.Y” \
disabled=no
add chain=virus protocol=tcp dst-port=2535 action=drop comment=”Drop Beagle” \
disabled=no
add chain=virus protocol=tcp dst-port=2745 action=drop comment=”Drop \
Beagle.C-K” disabled=no
add chain=virus protocol=tcp dst-port=3127 action=drop comment=”Drop MyDoom” \
disabled=no
add chain=virus protocol=tcp dst-port=3410 action=drop comment=”Drop Backdoor \
OptixPro” disabled=no
add chain=virus protocol=tcp dst-port=4444 action=drop comment=”Worm” \
disabled=no
add chain=virus protocol=udp dst-port=4444 action=drop comment=”Worm” \
disabled=no
add chain=virus protocol=tcp dst-port=5554 action=drop comment=”Drop Sasser” \
disabled=no
add chain=virus protocol=tcp dst-port=8866 action=drop comment=”Drop Beagle.B” \
disabled=no
add chain=virus protocol=tcp dst-port=9898 action=drop comment=”Drop \
Dabber.A-B” disabled=no
add chain=virus protocol=tcp dst-port=10000 action=drop comment=”Drop \
Dumaru.Y, sebaiknya di didisable karena juga sering digunakan utk vpn atau \
webmin” disabled=yes
add chain=virus protocol=tcp dst-port=10080 action=drop comment=”Drop \
MyDoom.B” disabled=no
add chain=virus protocol=tcp dst-port=12345 action=drop comment=”Drop NetBus” \
disabled=no
add chain=virus protocol=tcp dst-port=17300 action=drop comment=”Drop Kuang2″ \
disabled=no
add chain=virus protocol=tcp dst-port=27374 action=drop comment=”Drop \
SubSeven” disabled=no
add chain=virus protocol=tcp dst-port=65506 action=drop comment=”Drop PhatBot, \
Agobot, Gaobot” disabled=no
add chain=forward action=jump jump-target=virus comment=”jump to the virus \
chain” disabled=no
add chain=input connection-state=established action=accept comment=”Accept \
established connections” disabled=no
add chain=input connection-state=related action=accept comment=”Accept related \
connections” disabled=no
add chain=input connection-state=invalid action=drop comment=”Drop invalid \
connections” disabled=no
add chain=input protocol=udp action=accept comment=”UDP” disabled=no
add chain=input protocol=icmp limit=50/5s,2 action=accept comment=”Allow \
limited pings” disabled=no
add chain=input protocol=icmp action=drop comment=”Drop excess pings” \
disabled=no
add chain=input protocol=tcp dst-port=21 src-address-list=ournetwork \
action=accept comment=”FTP” disabled=no
add chain=input protocol=tcp dst-port=22 src-address-list=ournetwork \
action=accept comment=”SSH for secure shell” disabled=no
add chain=input protocol=tcp dst-port=23 src-address-list=ournetwork \
action=accept comment=”Telnet” disabled=no
add chain=input protocol=tcp dst-port=80 src-address-list=ournetwork \
action=accept comment=”Web” disabled=no
add chain=input protocol=tcp dst-port=8291 src-address-list=ournetwork \
action=accept comment=”winbox” disabled=no
add chain=input protocol=tcp dst-port=1723 action=accept comment=”pptp-server” \
disabled=no
add chain=input src-address-list=ournetwork action=accept comment=”From \
Datautama network” disabled=no
add chain=input action=log log-prefix=”DROP INPUT” comment=”Log everything \
else” disabled=no
add chain=input action=drop comment=”Drop everything else” disabled=no
III. Mikrotik sebagai Mesin Web proxy
Setelah firewall di mesin anda berjalan dengan baik maka selanjutnya kita juga bisa gunakan mesin ada tsb sebagai mesin web proxy.Yang perlu saya informasikan yaitu computer yang di butuh kan untuk menjadi mesin web proxy minimal Pentium III dengan RAM minimal 128M.Semakin tinggi spesifikasi komputer anda semakin bagus.
Untuk konfigurasinya sebagai berikut :
/ ip web-proxy
set enabled=yes src-address=0.0.0.0 port=3128 hostname=”mesin.proxy.net” transparent-proxy=yes parent-proxy=0.0.0.0:0 \
cache-administrator=”admin@mesin.proxy.net” max-object-size=4096KiB cache-drive=system max-cache-size=unlimited \
max-ram-cache-size=unlimited
/ ip web-proxy access
add dst-port=23-25 action=deny comment=”block telnet & spam e-mail relaying” disabled=no
add dst-port=443-563 action=deny comment=”" disabled=no
add dst-port=21 action=deny comment=”" disabled=no
add dst-port=21 action=deny comment=”" disabled=no
add dst-port=1025-65535 action=deny comment=”" disabled=no
add dst-port=280,488,591,777 action=deny comment=”" disabled=no
add dst-port=81,82,10000 action=deny comment=”" disabled=no
add dst-port=8291 action=allow comment=”" disabled=no
add src-address=127.0.0.1/32 action=allow comment=”localhost” disabled=no
add src-address=10.168.16.0/28 action=allow comment=”" disabled=no
add src-address=192.168.10.0/24 action=allow comment=”local address” disabled=no
add action=deny comment=”" disabled=no
/ ip web-proxy cache
add url=”:cgi-bin \\?” action=deny comment=”don’t cache dynamic http pages” disabled=no
Setelah melakukan perintah diatas lalu kita harus mentransparankan ip local nya (LAN) agar ip di bawah nya (LAN) di redirect melalui mesin proxynya.Perintah untuk transparan proxynya sebagai berikut
add chain=dstnat in-interface=Local protocol=tcp dst-port=80 src-address-list=iplan dst-address-list=192.168.10.0/24 action=redirect \
to-ports=3128 comment=”" disabled=no
add chain=dstnat in-interface=Local protocol=tcp dst-port=8080 src-address-list=iplan dst-address-list=192.168.10.0/24 \
action=redirect to-ports=3128 comment=”" disabled=no
add chain=dstnat protocol=tcp dst-port=80 action=accept comment=”" disabled=no
add chain=dstnat protocol=tcp dst-port=8080 action=accept comment=”" disabled=no
Setelah itu mesin anda sudah selesai menjadi mesin Web Proxy.
IV. Mikrotik sebagai Bandwith Limiter
Setelah anda berhasil mesin anda menjadi Web proxy, anda juga dapat mengkonfigurasi kan mesin anda sebagai Bandwith Limiter.Ini berguna jika anda yang mempunyai sebuah warnet selalu mengeluhkan lambatnya access. Tidak sepenuh nya access anda yang lambat di sebabkan oleh jeleknya link access ISP tempat anda berlangganan.Bisa saja salah satu user anda sedang melakukan download yang besar atw pun user anda sedang browsing dengan image/gambar yang banyak seperti situs-situs porno sehingga BW yang anda miliki terkuras oleh salah satu user yang tamak sehingga dapat menggaggu user lainnya yang sangat membutuhkan.
Dengan cara ini anda dapat mengatur BW yang anda miliki dan memberi jatah kepada user yang tamak sehingga tidak menggaggu user lainnya yang lebih membutuhkan.
Konfigurasi ini di set untuk setiap computer dengan definisi setiap IP nya.
Untuk settingan awal kita harus mendefinisikan setiap paket dari setiap ip di ip mangle nya.Berikut konfigurasinya :
add chain=prerouting in-interface=Local protocol=!icmp src-address-list=192.168.10.2/32 action=mark-packet new-packet-mark=02-UP \
passthrough=no comment=”O1″ disabled=no
add chain=forward protocol=!icmp src-address-list=192.168.10.2/32 action=mark-connection new-connection-mark=02-MC passthrough=yes \
comment=”" disabled=no
add chain=forward in-interface=Internet protocol=!icmp connection-mark=02-MC src-address-list=192.168.10.2/32 action=mark-packet \
new-packet-mark=02-DOWN passthrough=no comment=”" disabled=no
add chain=output out-interface=Local protocol=!icmp dst-address-list=192.168.10.2/32 action=mark-packet new-packet-mark=02-DOWN \
passthrough=no comment=”" disabled=no
Konfigurasi diatas di set hanya untuk ip : 192.168.10.2, untuk set ip yang lainnya dapat anda ganti dan di tambahkan sesuai dengan jumlah ip yang aktif di user anda.
Setelah anda definisikan paket dan ip anda dengan perintah ip mangle di atas, lalu anda tinggal membuat konfigurasi Bandwith Limiternya dengan menggunakan queue tree.
Berikut perintahnya :
add name=”DOWNLOAD” parent=Local packet-mark=”" limit-at=800000 queue=default priority=8 max-limit=800000 burst-limit=0 \
burst-threshold=0 burst-time=0s disabled=no
add name=”02″ parent=DOWNLOAD packet-mark=02-DOWN limit-at=30000 queue=default priority=8 max-limit=80000 \
burst-limit=150000 burst-threshold=78000 burst-time=2m disabled=yes
Untuk perintah diatas saya definisikan dahulu paket download secara keseluruhan, ini berguna agar kita dapat melihat pemakaian total Bandwith dari seluruh user yang aktif.. Bandwith Total maksimal yang saya set adalah 800 Kbps.
Lalu kemudian saya tambahkan BW untuk paket ip 192.168.10.2 dengan parent=DOWNLOAD dan packet-mark=02-DOWN yang telah kita definisikan sebelumnya di ip mangle diatas.
Limit Bandwith (minimal bandwith yang di dapat) untuk user 192.168.10.2 saya set hanya 30Kbps dan untuk maksimal Bandwith nya saya set mencapai 80Kbps.
Untuk burst-limit itu berfungsi jika user kita masih sedikit kita bisa set lebih dari Maksimal yang kita berikan diatas 80Kbps disini saya set mencapai 150 Kbps.
Pencapaian BW pada 150 Kbps jika BW user nya sudah mencapai 78Kbps harus di bawah Bandwith Maksimal anda 80 Kbps.Perintah ini ada pada burst-threshold.Bandwirth yang di hasilkan 150 kbps tsb kita set dengan waktu hanya 2 menit dengan perintah burst-time=2m.
Selesai sudah mesin anda telah menjadi sebuah mesin router, firewall, web-proxy dan Bandwith Limiter yang dapat di lakukan oleh 1 komputer saja.Saya sarankan agar computer anda mempunyai spesifikasi minimum Pentium III dengan RAM minimal 128M.
Namun jika anda hanya membutuh kan sebagai router dan Bandwith Limiter dapat anda lakukan di computer Pentium II atw bahkan Pentium I dengan spesifikasi RAM di bawah 128M.
Jika anda mengalami kesulitan silahkan email ke mailbox@ilham-alain.org
Traffic Monitor with Mikrotik Tools
Traffic Monitor with Mikrotik Tools
Dalam Memantau aliran paket data yang melewati antarmuka router Mikrotik, dapat digunakan fasilitas Torch. Keterangan lebih lanjut, dapat dibaca pada Manual Mikrotik, yaitu Torch Tools
Kita dapat memantau aliran paket berdasarkan jenis protokolnya, alamat asal, alamat tujuan serta tipe port. Dengan adanya fasilitas ini yang telah disediakan pada Packet System, ketika kita menginstalasi Mikrotik RouterOS, maka memudahkan kita dalam administrasi router, dari fasilitas ini, kita bisa menebak apakah Aliran data di mesin kita sedang Normal atau tidak. Memantau terjadinya Flooding, memantau aktifitas Malware dan sebagainya.
Menggunakannya cukup mudah, biasanya agar lebih nyaman dalam Monitoring, silahkan diaktifkan melalui Winbox, untuk masuk ke Routernya. Lebih jelasnya bisa dilihat gambar dibawah ini.
Fasilitas Torch ini bisa digunakan melalui Winbox pada menu Tools - Torch. Silahkan Klik menu Torch tersebut, nanti akan ditampilkan jendela Torchnya.
Atau Bisa juga melalui IP - ARP. Pada jendela ARP List, silahkan dipilih IP Address, MAC address yang akan di Monitor. Klik kanan untuk masuk ke menu Torch.
Perhatikan, item-item yang terdapat di jendela Torch ini, pada Manual diatas telah diberikan secara jelas keterangan terhadap item-item tersebut. Klik tombol Start untuk mengaktifkan layanan Torch ini. Sekarang kita dapat bermonitoring ria terhadap aliran paket pada mesin routernya. Jika ada trafik yang mencurigakan silahkan diambil tindakan selanjutnya.
Pada List diatas, saya memantau Aliran trafik dari IP Address (Src Address) 192.168.0.13 yang melalui Interface LAN. Jika diperhatikan, pada bagian Src port terdapat port 514 (syslog) bertipe protokol UDP (17) menuju ke IP Address (Dst Address) 192.168.0.14, dan memang saya sedang menjalankan Syslog Daemon pada PC Windows XP secara Remote untuk menyimpan log router Mikrotiknya, pada PC yang memiliki IP Address 192.168.0.13, dengan router remotenya yang memiliki IP Address 192.168.0.14, aktif di port 514 (UDP). Kita bisa memilih Alamat sumber (Src Address) pada Client yang akan kita pantau, memilih Port, Alamat tujuan, serta Protokolnya
Sumber : http://primadonal.wordpress.coSetup DNS Mikrotik
Setup DNS Mikrotik
ALTERNATIVE PROCEDURE IF YOU WANT TO INPUT A FIXED IP/GATEWAY/DNS SERVER ADDRESS(instead of using DHCP on the ether1 port)
Caution:
Use care in selecting the DNS SERVER IP address in the setup below. You MUST select an actual DNS server or a router which provides DNS services. Some routers (such as the Hawking FR24) provide a "DNS RELAY" feature on the gateway address which redirects DNS service requests that are sent to the router Gateway Address to some downstream DNS Server. Such "dns relay" service is not always compatible with the Mikrotik system. Other routers (such as the NexLand 800 Turbo and many other router setups) do provide normal DNS Services on the gateway address. In many routers it may depend on user programming.
The Mikrotik router will NOT resolve DNS properly for the Hotspot unless the pointer to a DNS server source points to a "real" DNS Server or a router which actually provides DNS SERVICES on the Gateway address. The result of no DNS service will be that your hotspot login screen will not be loaded when "any URL" is transmitted to the ether2 (Hotspot) port via your browser. This problem can be very confusing to diagnose.
You can test what DNS address you should setup in the Mikrotik unit by running an ip configuration test on a Windows equipped computer connected to your router that you also intend your Mikrotik to use for internet access. Proceed as follows:
b) In your windows computer, in network settings, select tcp/ip properties, and select "obtain an IP address automatically" and "obtain DNS server address automatically". Click OK and exit and reboot if necessary to activate the new settings. Then execute Setup>Run>
then enter <winipcfg>, click OK, (windows 95/98), or <ipconfig>, (or perhaps wntipcfg), click OK, (windows XP/NT/2000), In Windows , you may have to download the winipcfg.exe (or similar) module from the resources folder on the install disk to get this to work. You will get a display such as the image below when you get the ip configuration display and click
Note in this example, the DNS SERVER reported is 192.168.168.1 which IS the same as the Default Gateway and the downstream router (not Mikrotik) IP address. THIS IS NOT ALWAYS SO! The DNS server found by the DHCP operation of your windows computer may be in an entirely different range from the default gateway IP address. Thus, if you use a fixed IP address/Gateway/DNS Server selection, your Mikrotik router DNS Server setup MUST use the DNS Server found by a computer with DHCP Client operating as above. You cannot assume it is the same as your router's default gateway address.
Once you have the downstream router's Gateway address and DNS Server address defined, select an IP address for your Mikrotik unit and proceed as follows. (Here, we are assuming that your Mikrotik System's IP address and mask is 128.1.1.120/255.255.255.0, Gateway of the downstream router is 128.1.1.1 and that the DNS Server's IP address is 207.69.188.186. Make any changes you deem necessary.)
29a)
(Note: The address 128.1.1.120 (below) represents the PUBLIC INTERNET side IP address of the Mikrotik Router. Change to your own suitable address as may be required.)
29b) [admin@MikroTik] ip> address add address=128.1.1.120/24 comment="TechNet LAN to Internet" interface=ether1
29c) [admin@MikroTik] ip> route add gateway=128.1.1.1
(The following test will locate your
29d) [admin@MikroTik] ip> /ip dns set primary-dns=128.1.1.1 (Change to YOUR ISPs DNS servers. Or- This may be the gateway IP address of a LAN router (as this actually is) which has DNS services. You may be able to change to YOUR ISP's recommended DNS server IP address if permitted by your router and operation will likely be faster.)
29e) [admin@MikroTik] ip> /ip dns set secondary-dns=207.69.188.186 (Add a secondary DNS server if your ISP has one. This example is one of earthlink's DNS servers.)
IF you wish to install a DNS Cache in your Hotspot router so DNS requests will be handled out of the local cache instead of going to the router (or external ISP) each time, enter the following line.
29f) [admin@MikroTik] ip> /ip dns-cache set primary-server=128.1.1.1 (This sets up the dns-cache to access from the LOCAL ROUTER’s DNS server. You may wish to change the above two IP addresses to your ISP’s DNS IP address if permitted by your router. You can also use the
/ip dns-cache set secondary-server=xxx.xxx.xxx.xxx
to set up a secondary DNS-CACHE server if you wish. )
29g) [admin@MikroTik] ip> dns print
resolve-mode: remote-dns
primary-dns: 128.1.1.1 (This should be your primary DNS server IP address.)
secondary-dns: 207.69.188.186 (You should setup a secondary-dns server if you have one.)
and then:
29h) [admin@MikroTik] ip> dns-cache print
enabled: no (You get to enable it later when you setup the hotspot.)
primary-server: 128.1.1.1 (This should be your primary DNS server IP address.)
secondary-dns: 0.0.0.0 (You should setup a secondary-dns server (in step #19) if you have one.)
running: no (It will start running if you enable "use DNS CACHE" when you setup the hotspot.)
usage: 0%
entries: 0
There are lot many ways to limit bandwidth for day and Night
There are lot many ways to limit bandwidth for day and Night, but personally I found this is the easiest way, Here it is.
I have used Simple Queue, Script and Scheduler.
Suppose we have one network 192.168.1.0/24 and want to limit Bandwidth for day and Night Time.
Network 192.168.1.0/24
Bandwidth = 06:00am – 18:00pm – 1Mbps.
Bandwidth = 18:00pm – 06:00am – 2Mbps.
Create two simple queues for the same network with different Bandwidth Limit.
/queue simple
#name=”Day” target-addresses=192.168.1.0/24 dst-address=0.0.0.0/0
interface=parent=none direction=both priority=8
queue=default-small/default-small limit-at=512k/512k
max-limit=1M/1M total-queue=default-small
#name=”Night” target-addresses=192.168.1.0/24 dst-address=0.0.0.0/0
interface=parent=none direction=both priority=8
queue=default-small/default-small limit-at=1M/1M
max-limit=2M/2M total-queue=default-small
Now, write scripts
/system script
#name=”Day” source=/queue simple enable Day; /queue simple disable Night
#name=”Night” source=/queue simple enable Night; /queue simple disable Day
Finally, Schedule it
/system scheduler
#name=”Day” on-event=Day start-date=oct/13/2007 start-time=06:00:00 interval=1d
#name=”Night” on-event=Night start-date=oct/13/2007 start-time=18:00:00 interval=1d
Block Web Sites” & “How to Stop Downloading
From MikroTik Wiki
This example will explain you “How to Block Web Sites” & “How to Stop Downloading”. I have use Web-Proxy test Package.
First, Configure Proxy.
/ip proxy
enabled: yes
src-address: 0.0.0.0
port: 8080
parent-proxy: 0.0.0.0:0
cache-drive: system
cache-administrator: "ASHISH PATEL"
max-disk-cache-size: none
max-ram-cache-size: none
cache-only-on-disk: no
maximal-client-connections: 1000
maximal-server-connections: 1000
max-object-size: 512KiB
max-fresh-time: 3d
Now, Make it Transparent
/ip firewall nat
chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080
Make sure that your proxy is NOT a Open Proxy
/ip firewall filter
chain=input in-interface=src-address=0.0.0.0/0 protocol=tcp dst-port=8080 action=drop
Now for Blocking Websites
/ip proxy access
dst-host=www.vansol27.com action=deny
It will block website http://www.vansol27.com, We can always block the same for different networks by giving src-address. It will block for particular source address.
We can also stop downloading files like.mp3, .exe, .dat, .avi,…etc.
/ip proxy access
path=*.exe action=deny
path=*.mp3 action=deny
path=*.zip action=deny
path=*.rar action=deny.
Try with this also
/ip proxy access
dst-host=:mail action=deny
This will block all the websites contain word “mail” in url.
Example: It will block www.hotmail.com, mail.yahoo.com, www.rediffmail.com
ref:http://wiki.mikrotik.comFilter MAC di Mikrotik dan Linux
Berhubung ada beberapa rekan yang bertanya via Japri, maka saya mencoba untuk membagi sedikit pengalaman, tentang topik di atas. Paparan berikut ini, juga hasil percobaan sendiri melalui Referensi yang di peroleh ketika Googling. Saya tidak menuliskan siapa sumber aslinya, karena saya lupa dimana ketemu Linksnya. Kalau ada yang merasa, paparan dibawah ini, hasil pemikirannya, dengan senang hati, saya akan menuliskan nama anda.
Di Mikrotik
Setingan memakai interface GUI via Winbox.
Tambahkan IP Client dan Mac Address di ‘/ip arp’, biasanya, di menu ip arp tersebut telah ada Interface, mac address dan ip address client secara dinamis, tinggal di Statis kan saja. Di Winbox klik kanan, ambil Make Statik.
Setelah IP address dan Mac Address client tersebut di statiskan, sekarang ke menu Interface. Pada Terminal ‘/interface’.
Pada submenu Interface List, Klik aja Interface yang ada disitu. Perhatikan di bagian ARP. Ambil option, reply-only, atau arp=reply-only.
Untuk mainin di Firewall silahkan telaah script berikut.
/ ip firewall filter
add chain=forward action=drop src-address=x.x.x.x \
src-mac-address=!yy:yy:yy:yy:yy:yy comment=”" disabled=no
/ ip firewall filter
add chain=forward action=drop src-address=!x.x.x.x \
src-mac-address=yy:yy:yy:yy:yy:yy comment=”" disabled=no
Di Linux dengan IP Tables
Sumber asli http://mujie.blog.palangkaraya.net/
Skrip berikut di tulis via Bash di Linux, yang sudah mendukung untuk banyak Client (Mac dan IP Address).
Berikut langkah-langkahnya :
1. Buat file bernama rc.iplock didalam directory /etc/rc.d/ dengan isi sebagai berikut:
#!/bin/bash
# Bash script Lock IP Address dan MAC Address
iptables=”/sbin/iptables” #path ke iptables
files=”/etc/rc.d/list.txt” #path ke list IP Address dan MAC Address
device=”eth1″ #ethernet devices ke client
lockall=”yes” #yes|no ,yes jika mendaftarkan semua IP & MAC Address
#jika tidak, tulis no.
#yes untuk metode pertama, no untuk metode kedua
if [ $lockall = "yes" ]; then
$iptables -I PREROUTING -t nat -i $device -j DROP
cat $files | while read ip_address mac_address; do
$iptables -I PREROUTING -t nat -i $devices -s $ip_address
-m mac –mac-source $mac_address -j ACCEPT
$iptables -I FORWARD -i $device -s ! $ip_address
-m mac –mac-source $mac_address -j DROP
$iptables -I PREROUTING -t nat -s ! $ip_address
-m mac –mac-source $mac_address -j DROP
done
elif [ $lockall = “no” ]; then
$iptables -I PREROUTING -t nat -i $device -j ACCEPT
cat $files | while read ip_address mac_address; do
$iptables -I FORWARD -i $device -s ! $ip_address
-m mac –mac-source $mac_address -j DROP
$iptables -I PREROUTING -t nat -s ! $ip_address
-m mac –mac-source $mac_address -j DROP
done
fi
echo “Locking IP Address and Mac Address…”
#end script
2. Buat file bernama list.txt didalam directory /etc/rc.d/ dengan format penulisan sebagai berikut :
Peringatan!! Jangan tambahkan baris apapun atau kalimat apapun selain format diatas!
Contoh isi file /etc/rc.d/list.txt untuk 3 client:
192.168.1.5 00:89:CD:64:01:EF
192.168.1.20 00:90:DD:14:11:CF
192.168.1.14 00:40:EE:21:26:GE
3. Set file rc.iplock agar dapat di eksekusi :
chmod +x /etc/rc.d/rc.iplock
4. Tambahkan didalam file /etc/rc.d/rc.local agar dapat di eksekusi pada saat start up :
/etc/rc.d/rc.iplock
5. Jalankan :
/etc/rc.d/rc.iplock
6. Selesai!
————————-
a) add the -s a.b.c.d -m mac –mac aa:bb:cc:dd:ee:ff to each rule which you
only want to match a specific machine
or
b) put all your rules into a user-defined chain, and then jump to that chain
only for packets which match the required IP/MAC combination:
iptables -N myrules
iptables -A myrules -p tcp –dport 21 -j ACCEPT
iptables -A myrules -p tcp –dport 23 -j ACCEPT
etc
iptables -A INPUT -s a.b.c.d -m mac –mac aa:bb:cc:dd:ee:ff -j myrules
With this design you can also easily allow more than one machine to connect if
you wish, by adding another INPUT rule:
iptables -A INPUT -s w.x.y.z -m mac –mac uu:vv:ww:xx:yy:zz -j myrules
Selamat mencoba,
Thursday, December 13, 2007
Intalasi Mikrotik
1. Intallasi
Booting melalui CD-ROM
Atur di BIOS agar, supaya boot lewat CD-ROM, kemudian tunggu beberapa
saat di monitor akan muncul proses Instalasi.
????????????????????????-
ISOLINUX 2.08 2003-12-12 Copyrigth (C) 1994-2003 H. Peter Anvin
Loading linux??????
Loading initrd.rgz????.
Ready
Uncompressing Linux? Ok, booting the kernel
????????????????????????
Memilih paket software
Setelah proses booting akan muncul menu pilihan software yang
mau di install, pilih sesuai kebutuhan yang akan direncanakan.
Paket yang tersedia di Mikrotik
advanced-tools-2.9.27.npk
arlan-2.9.27.npk
dhcp-2.9.27.npk
gps-2.9.27.npk
hotspot-2.9.27.npk
hotspot-fix-2.9.27.npk
isdn-2.9.27.npk
lcd-2.9.27.npk
ntp-2.9.27.npk
ppp-2.9.27.npk
radiolan-2.9.27.npk
routerboard-2.9.27.npk
routing-2.9.27.npk
routing-test-2.9.27.npk
rstp-bridge-test-2.9.27.npk
security-2.9.27.npk
synchronous-2.9.27.npk
system-2.9.27.npk
telephony-2.9.27.npk
ups-2.9.27.npk
user-manager-2.9.27.npk
web-proxy-2.9.27.npk
webproxy-test-2.9.27.npk
wireless-2.9.27.npk
wireless-legacy-2.9.27.npk
?????????????????????????
Welcome to Mikrotik Router Software Installation
Move around menu using ?p? and ?n? or arrow keys, select with ?spacebar?.
Select all with ?a?, minimum with ?m?. Press ?i? to install locally or ?r? to
install remote router or ?q? to cancel and reboot.
[X] system [ ] lcd [ ] telephony
[ ] ppp [ ] ntp [ ] ups
[ ] dhcp [ ] radiolan [ ] user-manager
[X] andvanced-tools [ ] routerboard [X] web-proxy
[ ] arlan [ ] routing [ ] webproxy-test
[ ] gps [ ] routing-test [ ] wireless
[ ] hotspot [ ] rstp-bridge-test [ ] wireless-legacy
[ ] hotspot [X] security
[ ] isdn [ ] synchronous
?????????????????????????
Umumnya Paket Mikrotik untuk Warnet, Kantor atau SOHO adalah :
a. SYSTEM : Paket ini merupakan paket dasar, berisi Kernel dari
Mikrotik
b. DHCP : Paket yang berisi fasilitas sebagai DHCP Server, DHCP
client, pastikan memilih paket ini jika Anda menginginkan
agar Client diberikan IP address otomatis dari DHCP Server
c. SECURITY : Paket ini berisikan fasilitas yang mengutamakan Keamanan
jaringan, seperti Remote Mesin dengan SSH, Remote via MAC
Address
d. WEB-PROXY : Jika Anda memilih paket ini, maka Mikrotik Box anda telah
dapat menjalan service sebagai Web proxy yang akan menyimpan
cache agar traffik ke Internet dapat di reduksi serta browsing
untuk Web dapat dipercepat.
e. ADVANCED TOOLS : Paket yang berisi Tool didalam melakukan Admnistrasi jaringan,
seperti Bandwidth meter, Scanning, Nslookup, dan lain sebagainya.
Instalasi Paket
ketik ?i? setelah selesai memilih software, lalu akan muncul menu
pilihan seperti ini :
- Do you want to keep old configuration ? [y/n] ketik Y
- continue ? [y/n] ketik Y
Setelah itu proses installasi system dimulai, disini kita tidak
perlu membuat partisi hardsik karena secara otomatis mikrotik akan
membuat partisi sendiri.
?????????????????????????-
wireless-legacy (depens on system):
Provides support for Cisco Aironet cards and for PrismlI and Atheros wireless
station and AP.
Do you want to keep old configuraion? [y/n]:y
Warning: all data on the disk will be erased!
Continue? [y/n]:y
Creating partition???.
Formatting disk?????????????
Installing system-2.9.27 [################## ]
?????????????????????????
Proses installasi
?????????????????????????
Continue? [y/n]:y
Creating partition???????..
Formatting disk?????????.
Installed system-2.9.27
Installed advanced-tools-2.9.27
Installed dhcp-2.9.27
Installed security-2.9.27
installed web-proxy-2.9.27
Software installed.
Press ENTER to reboot
??????????????????????????
2. Konfigurasi
Setelah selesai restart, maka akan muncul form login
Mikrotik login = admin
Password = (kosong, enter saja)
Setelah muncul tampilan awal, masukkan beberapa perintah untuk menset IP Address,Gateway,NAT,DNS
IP Address yang pertama
[admin@Mikrotikl] > ip address add address=192.168.1.2
netmask=255.255.255.0 interface=Ether0 comment=?IP ke Internet?
IP Address yang kedua
[admin@Mikrotikl] > ip address add address=192.168.0.30
netmask=255.255.255.224 interface=Ether1 comment = ?IP ke LAN?
Perintah mengecek IP address
[admin@Mikrotik] >ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 ;;; IP Address ke Internet
192.168.0.30/27 192.168.0.0 192.168.0.31 ether0
1 ;;; IP Address ke LAN
192.168.1.2/24 192.168.0.0 192.168.1.255 ether1
[admin@Mikrotik]>
Setelah itu menset Gateway,Bentuk Perintah Konfigurasi gateway
ip route add gateway={ip gateway}
Memberikan default Gateway, diasumsikan gateway untuk koneksi internet adalah 192.168.1.1
[admin@Mikrotik] > /ip route add gateway=192.168.1.1
Melihat Tabel routing pada Mikrotik Routers
[admin@Mikrotik] > ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf
# DST-ADDRESS PREFSRC G GATEWAY DISTANCE INTERFACE
0 ADC 192.168.0.0/24 192.168.0.30 Local
1 ADC 192.168.0.0/27 192.168.1.2 Public
2 A S 0.0.0.0/0 r 192.168.1.1 Public
[admin@Mikrotik]>
Tes Ping ke Gateway untuk memastikan konfigurasi sudah benar
[admin@Mikrotik] > ping 192.168.1.1
192.168.1.1 64 byte ping: ttl=64 time<1 ms
192.168.1.1 64 byte ping: ttl=64 time<1 ms
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0/0.0/0 ms
[admin@Mikrotik]>
Mensetting NAT (Network Address Translation),Bentuk Perintah Konfigurasi
ip firewall nat add chain=srcnat action=masquerade out-inteface={ethernet yang langsung terhubung ke Internet atau Public}
[admin@Mikrotik] > ip firewall nat add chain=scrnat out-interface=ether0 action=masquerade
[admin@Mikrotik]>
Melihat konfigurasi Masquerading
[admin@Mikrotik] ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat out-interface=Public action=masquerade
[admin@Mikrotik]>
Bentuk Perintah Konfigurasi DNS
ip dns set primary-dns={dns utama} secondary-dns={dns ke dua}
Setup DNS pada Mikrotik Routers, misalkan DNS dengan Ip Addressnya Primary = 202.134.0.155, Secondary = 202.134.2.5
[admin@Mikrotik] > ip dns set primary-dns=202.134.0.155 allow-remoterequests=no
[admin@Mikrotik] > ip dns set secondary-dns=202.134.2.5 allow-remoterequests=no
Melihat konfigurasi DNS
[admin@Mikrotik] > ip dns print
primary-dns: 202.134.0.155
secondary-dns: 202.134.2.5
allow-remote-requests: no
cache-size: 2048KiB
cache-max-ttl: 1w
cache-used: 16KiB
[admin@mikrotik]>
Tes untuk akses domain, misalnya dengan ping nama domain
[admin@Mikrotik] > ping yahoo.com
216.109.112.135 64 byte ping: ttl=48 time=250 ms
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 571/571.0/571 ms
[admin@Mikrotik]>
3. Melimit Kecepatan Akses Client
Bentuk perintah konfigurasi:
queue simple add name={ nama }
target-addresses={ ip address yang dituju }
interface={ interface yang digunakan untuk melewati data }
max-limit={ out/in }
Dibawah ini terdapat konfigurasi Trafik shaping atau bandwidth management dengan metode Simple Queue. Diasumsikan Client ada sebanyak 5 client, dan masing-masing client diberi jatah bandwidth minimum sebanyak 8kbps, dan maksimum 48kbps. Sedangkan Bandwidth totalnya sebanyak 192kbps. Untuk upstream tidak diberi rule, berarti masing-masing client dapat menggunakan bandwidth uptream secara maksimum. Perhatikan perintah priority, range priority di Mikrotik sebanyak delapan. Berarti dari 1 sampai 8, priority 1 adalah priority tertinggi, sedangkan priority 8 merupakan priority terendah.
Berikut Contoh kongirufasinya.
???????????????????????????
/ queue simple
add name=?trafikshaping? target-addresses=192.168.0.0/27 dst-address=0.0.0.0/0
interface=all parent=none priority=1 queue=default/default
limit-at=0/64000 max-limit=0/192000 total-queue=default disabled=no
add name=?01″ target-addresses=192.168.0.1/32 dst-address=0.0.0.0/0
interface=all parent=trafikshaping priority=1 queue=default/default
limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no
add name=?02″ target-addresses=192.168.0.2/32 dst-address=0.0.0.0/0
interface=all parent=trafikshaping priority=1 queue=default/default
limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no
add name=?03″ target-addresses=192.168.0.3/32 dst-address=0.0.0.0/0
interface=all parent=trafikshaping priority=1 queue=default/default
limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no
add name=?04″ target-addresses=192.168.0.4/32 dst-address=0.0.0.0/0
interface=all parent=trafikshaping priority=1 queue=default/default
limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no
add name=?10″ target-addresses=192.168.0.25/32 dst-address=0.0.0.0/0
interface=all parent=trafikshaping priority=1 queue=default/default
limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no
add name=?05″ target-addresses=192.168.0.5/32 dst-address=0.0.0.0/0
interface=all parent=trafikshaping priority=1 queue=default/default
limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no
Saturday, November 24, 2007
wvdial debian
SERVER
peralatan yang dibutuhkan:
1. komputer dengan linux debian
2. modem external
Pada server kita membutuhkan beberapa package yakni mgetty dan ppp, lakukan pengecekan apa kedua package tersebut sudah terinstall apa belum, jika belum terinstall maka lakukan proses penginstallan dengan perintah :
apt-get install ppp mgetty
setelah kedua package tersebut telah terinstall maka perlu dibuat suatu user pengguna dial up, lakukan dengan perintah :
adduser pppuser2
kemudian isikan password baru untuk user baru (pppuser2)
setelah user dan password telah selesai, lakukan pengeditan file /etc/passwd, pastikan pada ada baris untuk user pppuser2, kemudian edit pada baris tersebut menjadi seperti dibawah ini :
pppuser2:x:1003:1002:,,,:/home/pppuser2:/usr/sbin/pppd
untuk 1003:1002 pada baris tersebut adalah UID jadi tiap komputer berbeda-beda. Yang dirubah adalah :/bin/bash menjadi :/usr/sbin/pppd.
Kemudian edit file /etc/group pada baris dip tambahkan anggota user baru pppuser2, dengan melakukan perintah :
vim /etc/group
dip:x:30:pppuser2
untuk berikutnya kita akan melakukan konfigurasi pada mgetty
edit /etc/mgetty/dialin.config isikan no telepon yang diijinkan untuk menghubungi
edit /etc/mgetty/login.config isi dengan :
/AutoPPP/ - a_ppp /usr/sbin/pppd noauth -chap +pap login -detach
Setelah setting mgetty selesai, kita set mgetty supaya aktif dengan cara edit file /etc/inittab dan tambahkan baris berikut :
T3:23:respawn:/sbin/mgetty ttyS0 -D /dev/ttyS0
dimana contoh diatas menggunakan serial port 1 (ttyS0) sebagai media koneksi server dengan modem. Jika anda gunakan serial port 2 -> ttyS1, dan jika menggunakan port usb perlu disesuaikan -> ttyUSB0 atau ttyUSB1.
untuk merestart settingan aplikasi mgetty jalankan
host:~#init q
lihat status, apa mgetty sudah jalan atau belum dengan cara :
host:~#ps -ax
mgetty dengan ttyS0 harus memiliki PID, yang menandakan bahwa mgetty siap menerima koneksi.
Setelah seluruh settingan aplikasi mgetty telah selesai kita set untuk aplikasi ppp
host:~#vim /etc/ppp/options
-detach
asyncmap 0
modem
crtscts
lock
proxyarp
require-pap
refuse-chap
Buat file baru /etc/ppp/options.ttyS0
yang akan dijalankan saat koneksi telah berjalan dan diterima pada port yang telah diset sesuai port yang digunakan, kemudian isikan :
192.168.2.1:192.168.2.3
defaultroute
dimana pada contoh diatas 192.168.2.1 adalah IP server dial in dan 192.168.2.3 adalah IP yang diberikan server kepada klien yang men-dialup nya.
Buka file /etc/ppp/pap-secrets
host:~#vim /etc/ppp/pap-secrets
# usename * password
pppuser2 * pass_pppuser2 *
untuk mengaktifkan agar pppuser2 dapat menggunakan aplikasi pppd yang tentu saja adalah otorisasi root maka perlu di set agar aplikasi pppd dapat diakses oleh user pppuser2 dengan mengetikkan
host:~#chmod 750 /usr/sbin/pppd
host:~#chmod u+s /usr/sbin/pppd
Server dial ini siap untuk diuji.
CLIENT
Pada server kita membutuhkan beberapa package yakni wvdial dan ppp, lakukan pengecekan apa kedua package tersebut sudah terinstall apa belum, bila belum diinstall lakukan proses installasi dengan perintah :
host:~# apt-get install ppp wvdial
Tancapkan modem anda ke komputer client, kemudian lakukan perintah :
host:~# wvdialconf /etc/wvdial.conf
Scanning your serial ports for a modem.
ttyS0<*1>: ATQ0 V1 E1 — failed with 2400 baud, next try: 4800 baud
ttyS0<*1>: ATQ0 V1 E1 — OK
ttyS0<*1>: ATQ0 V1 E1 Z — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — ERROR
ttyS0<*1>: Modem Identifier: ATI — 128K
ttyS0<*1>: Speed 9600: AT — OK
ttyS0<*1>: Speed 19200: AT — OK
ttyS0<*1>: Speed 38400: AT — OK
ttyS0<*1>: Speed 57600: AT — OK
ttyS0<*1>: Speed 115200: AT — OK
ttyS0<*1>: Max speed is 115200; that should be safe.
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
Found a modem on /dev/ttyS0.
/etc/wvdial.conf: Can’t read config file /etc/wvdial.conf:
No such file or directory
Modem configuration written to /etc/wvdial.conf.
ttyS0: Speed 115200; init “ATQ0 V1 E1 S0=0 &C1 &D2″
pada contoh diatas berarti modem anda tertancap pada ttyS0
edit file /etc/wvdial.conf
host:~# vim /etc/wvdial.conf
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
Init1 = ATZ
Modem = /dev/ttyS0
Baud = 115200
[Dialer dialku]
Username =
Password =
Phone =
lakukan percobaan dengan men-dial dial in server yang telah dibuat tadi dengan melakukan perintah :
host:~# wvdial
jika sudah lihat ifconfig anda yang baru
host:~# ifconfig
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.2.3 P-t-P:192.168.2.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:72 (72.0 b) TX bytes:78 (78.0 b)
jika sudah ada device ppp0 maka anda telah terhubung dengan dial in server.
untuk lebih efektifnya kita ubah wvdial yang kita gunakan menjadi sebuah chat replacement dengan cara sbb :
host:~# cd /etc/ppp/peers/
host:~# ls
provider wvdial wvdial-pipe
host:~# cp wvdial dod
edit file /etc/ppp/peers/dod
noauth
name wvdial
connect “/usr/bin/wvdial –chat dialku”
/dev/ttyS0
115200
modem
crtscts
defaultroute
usehostname
user pppuser2
noipdefault
logfd 6
untuk melakukan koneksi cukup dengan mengetikan
pon dod
sedangkan untuk memutuskan koneksi digunakan perintah
poff dod
route add defaultgw ppp0
Saturday, October 27, 2007
Web Server (RedHat 9)
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/etc/httpd" will be interpreted by the
# server as "/etc/httpd/logs/foo.log".
#
### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#
#
# Don't give away too much information about all the subcomponents
# we are running. Comment out this line if you don't mind remote sites
# finding out what major optional modules you are running
ServerTokens OS
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation
# (available at
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/httpd"
#
# ScoreBoardFile: File used to store internal server process information.
# If unspecified (the default), the scoreboard will be stored in an
# anonymous shared memory segment, and will be unavailable to third-party
# applications.
# If specified, ensure that no two invocations of Apache share the same
# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
#
#ScoreBoardFile run/httpd.scoreboard
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile run/httpd.pid
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 150
MaxRequestsPerChild 1000
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server process
# MaxRequestsPerChild: maximum number of connections per server process
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On
### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
#
# any
#
# All of these directives may appear inside
# in which case these default settings will be overridden for the
# virtual host being defined.
#
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
# . On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user www and use that user.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
#
User apache
Group apache
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
#ServerAdmin imron@smkn1-tuban.sch
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName webSever@smkn1-tuban.sch
#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/var/www/html"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
Options FollowSymLinks
AllowOverride None
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
#
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
#1 Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
#1 AllowOverride None
#
# Controls who can get stuff from this server.
#
# Order allow,deny
# Allow from all
#
#
# Disable autoindex for the root directory, and present a
# default Welcome page if no other index page is present.
#
Options -Indexes
ErrorDocument 403 /error/noindex.html
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
UserDir disable
#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
#UserDir public_html
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#
# Order allow,deny
# Allow from all
#
#
# Order deny,allow
# Deny from all
#
#
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.php index.html.var
#
# AccessFileName: The name of the file to look for in each directory
# for access control information. See also the AllowOverride directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
Order allow,deny
Deny from all
#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
TypesConfig /etc/mime.types
#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain
#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a
# container, they will be logged here. Contrariwise, if you *do*
# define per-
# logged therein and *not* in this file.
#
# CustomLog logs/access_log common
CustomLog logs/access_log combined
#
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent
#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access_log combined
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (error documents, FTP directory listings,
# mod_status and mod_info output etc., but not CGI generated documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of: On Off EMail
#
ServerSignature On
#
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/var/www/icons/"
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
#
# This should be changed to the ServerRoot/manual/. The alias provides
# the manual, even if you choose to move your DocumentRoot. You may comment
# this out if you do not care for the documentation.
#
Alias /manual "/var/www/manual"
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
#
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock
# for setting UNIX socket for communicating with cgid.
#
Scriptsock run/httpd.cgid
#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
AllowOverride None
Options None
Order allow,deny
Allow from all
#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example:
# Redirect permanent /foo http://www.example.com/bar
#
# Directives controlling the display of server-generated directory listings.
#
#
# FancyIndexing is whether you want fancy directory indexing or standard.
# VersionSort is whether files containing version numbers should be
# compared in the natural way, so that `apache-1.3.9.tar' is placed before
# `apache-1.3.12.tar'.
#
IndexOptions FancyIndexing VersionSort NameWidth=*
#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions. These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif
#
# AddDescription allows you to place a short description after a file in
# server-generated indexes. These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz
#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README.html
HeaderName HEADER.html
#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing. Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
#
# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
#
# DefaultLanguage and AddLanguage allows you to specify the language of
# a document. You can then use content negotiation to give a browser a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases
# the two character 'Language' abbreviation is not identical to
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Danish (da) - Dutch (nl) - English (en) - Estonian (et)
# French (fr) - German (de) - Greek-Modern (el)
# Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (kr)
# Portugese (pt) - Luxembourgeois* (ltz)
# Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
# Russian (ru) - Croatian (hr)
#
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .et
AddLanguage fr .fr
AddLanguage de .de
AddLanguage he .he
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddLanguage pl .po
AddLanguage kr .kr
AddLanguage pt .pt
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pt-br .pt-br
AddLanguage ltz .ltz
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage tw .tw
AddLanguage zh-tw .tw
AddLanguage hr .hr
#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv tw
#
# ForceLanguagePriority allows you to serve a result page rather than
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
# [in case no accepted languages matched the available variants]
#
ForceLanguagePriority Prefer Fallback
#
# Specify a default charset for all pages sent out. This is
# always a good idea and opens the door for future internationalisation
# of your web site, should you ever want it. Specifying it as
# a default does little harm; as the standard dictates that a page
# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
# are merely stating the obvious. There are also some security
# reasons in browsers, related to javascript and URL parsing
# which encourage you to always set a default char set.
#
AddDefaultCharset ISO-8859-1
#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets for
# the official list of charset names and their respective RFCs
#
AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5 .Big5 .big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866 .cp866
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8 .utf8
# The set below does not map to a specific (iso) standard
# but works on a fairly wide range of browsers. Note that
# capitalization actually matters (it should not, but it
# does for some browsers).
#
# See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets
# for a list of sorts. But browsers support few.
#
AddCharset GB2312 .gb2312 .gb
AddCharset utf-7 .utf7
AddCharset utf-8 .utf8
AddCharset big5 .big5 .b5
AddCharset EUC-TW .euc-tw
AddCharset EUC-JP .euc-jp
AddCharset EUC-KR .euc-kr
AddCharset shift_jis .sjis
#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
AddType application/x-tar .tgz
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis
#
# For server-parsed imagemap files:
#
AddHandler imap-file map
#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
# to be distributed in multiple languages.)
#
AddHandler type-map var
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddOutputFilter INCLUDES .shtml
#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#
#
# Putting this all together, we can Internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_
# our collection of by-error message multi-language collections. We use
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_
#
# Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /var/www/error/include/ files and
# copying them to /your/include/path/, even on a per-VirtualHost basis.
#
Alias /error/ "/var/www/error/"
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
ErrorDocument 410 /error/HTTP_GONE.html.var
ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
#
# Allow server status reports, with the URL of http://servername/server-status
# Change the ".your-domain.com" to match your domain to enable.
#
#
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .your-domain.com
#
#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".your-domain.com" to match your domain to enable.
#
#
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .your-domain.com
#
#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
#
#ProxyRequests On
#
#
# Order deny,allow
# Deny from all
# Allow from .your-domain.com
#
#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off On Full Block
#
#ProxyVia On
#
# To enable the cache as well, edit and uncomment the following lines:
# (no cacheing without CacheRoot)
#
#CacheRoot "/etc/httpd/proxy"
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1
#NoCache a-domain.com another-domain.edu joes.garage-sale.com
#
# End of proxy directives.
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:*
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
DocumentRoot /var/www/html/schomapv2
ServerName schomap.smkn1-tuban.sch
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificatekeyfile /etc/httpd/conf/ssl.key/server.key
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
ServerAdmin imron@smkn1-tuban.sch
DocumentRoot /var/www/html/schomap06
ServerName schomap06.smkn1-tuban.sch
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
ServerAdmin imron@smkn1-tuban.sch
DocumentRoot /var/www/html/squirrelmail-1.4.10a
ServerName mail.smkn1-tuban.sch
Friday, October 26, 2007
Tips Keamanan Access Point
Saat ini banyak orang yang mulai memasang jaringan komputer nirkabel di rumah mereka (wireless home network) yang mana bisa segera digunakan oleh mereka untuk terhubung ke internet. Contohnya si Agung, karyawan salah satu perusahaan TI di Surabaya telah berlangganan akses internet ADSL melalui Telkom Speedy. Agung membeli modem ADSL yang dilengkapi pula dengan fasilitas wireless atau Wi-Fi. Dia membeli model itu karena dia memiliki dua buah komputer di rumahnya, sebuah laptop dan desktop PC. Semuanya telah dilengkapi dengan Wi-Fi card dan dia menginginkan semuanya terhubung ke internet melalui access point yang dia buat sendiri. Selain itu Agung juga memiliki sebuah PDA yang mana terkadang dia perlu akses ke internet dari PDA nya ketika dia di rumah. Tepatlah jika ia membangun access point di rumahnya sendiri.Tetapi masalah selalu saja muncul. Sudah amankah jaringan nirkabel atau access point yang dia buat? Jangan-jangan di sebelah rumah ada hacker yang mengintip data Anda atau juga malah ikut menikmati akses internet dengan gratis. Untuk itu melalui tulisan kali ini akan disajikan beberapa tips yang berhubungan dengan jaringan nirkabel di rumah Anda.
- Ganti Password Administrator default (bila perlu ganti pula usernamenya)
Jantung dari jaringan Wi-Fi di rumah Anda adalah access point atau router. Untuk melakukan set up dari peralatan access point ini, maka vendor dari access point device akan memberikan suatu interface yang berbasis web, dimana untuk masuk ke dalam interface ini maka Anda harus mengisikan username dan password. Sementara itu, pada beberapa kasus, peralatan access point tersebut di set oleh vendor dengan suatu username dan password tertentu yang mudah ditebak oleh pengguna. Untuk itu Anda harus mengganti password default dari access point Anda. Bahkan bila perlu Anda juga ubah username yang ada. - Aktifkan enkripsi
Semua peralatan Wi-Fi pasti mendukung beberapa bentuk dari keamanan data. Intinya enkripsi akan mengacak data yang dikirim pada jaringan nirkabel sehingga tidak mudah dibaca oleh pihak lain. Peralatan Wi-Fi saat ini sudah menyediakan pilihan teknologi security yang bisa Anda gunakan sesuai dengan kebutuhan. Pastikan semua peralatan dalam jaringan nirkabel Anda juga menggunakan setting security yang sama seperti yang digunakan pada access point. - Ganti SSID default
Access point atau router menggunakan suatu nama jaringan yang disebut dengan SSID. Vendor biasanya memberi nama produk access point mereka dengan suatu default SSID. Sebagai contoh, SSID yang dirilis oleh Linksys biasanya adalah “linksys”. Kenyataannya memang apabila seseorang mengetahui sebuah SSID maka ia belum tentu bisa membobol jaringan tersebut, tetapi paling tidak ini adalah suatu awal baginya. Di mata seorang hacker, apabila melihat suatu SSID yang masih default, maka itu indikasi bahwa access point tersebut tidak dikonfigurasi dengan baik dan ada kemungkinan untuk dibobol. Ganti SSID default Anda segera setelah Anda menset-up access point. - Aktifkan MAC Address filtering
Setiap peralatan Wi-Fi pastilah memiliki suatu identifikasi yang unik yang dinamakan “physical address” atau MAC address. Access point atau router akan mencatat setiap MAC address dari peranti yang terhubung kepadanya. Anda bisa set bahwa hanya peranti dengan MAC address tertentu saja yang boleh mengakses ke dalam jaringan nirkabel Anda. Misalnya PDA Anda memiliki MAC address tertentu, kemudian Anda masukkan MAC address PDA Anda ke dalam filter MAC address pada access point Anda. Jadi yang bisa terhubung ke jaringan sementara ini hanyalah dari PDA Anda. Tapi Anda juga tetap hati-hati, karena hacker bisa saja membuat MAC address tipuan untuk mengakali filtering ini. - Matikan broadcast dari SSID
Dalam jaringan Wi-Fi, maka access point atau router biasanya akan membroadcast SSID secara reguler. Fitur ini memang sengaja didesain bagi hotspot area yang mana klien Wi-Fi pada area tersebut bisa saja datang dan pergi dengan cepat. Dalam kondisi di rumah Anda yang mana SSID nya pasti sudah Anda ketahui sendiri, maka fitur ini tidak perlu diaktifkan karena bisa mengundang tetangga sebelah untuk mengetahui SSID Anda atau juga mencegah orang lain menumpang jaringan internet Anda dengan gratis. Anda bisa nonaktifkan fasilitas broadcast SSID ini demi keamanan jaringan Anda. - Berikan alamat IP statis kepada peranti Wi-Fi
Saat ini cenderung orang memanfaatkan DHCP untuk memberikan alamat IP secara otomatis kepada klien yang ingin terhubung ke jaringan nirkabel. Ini memang cara yang cepat dan mudah bagi jaringan Anda, tetapi ingat bahwa ini juga cara mudah bagi hacker untuk mendapatkan alamat IP yang valid pada jaringan nirkabel Anda. Anda bisa mematikan fitur DHCP pada acces point dan set suatu rentang alamat IP yang sudah fix dan set pula peranti Wi-Fi Anda yang ingin terkoneksi ke access point dengan rentang alamat-alamat IP yang fix tadi. - Pikirkan lokasi access point atau router yang aman
Sinyal Wi-Fi secara normal bisa menjangkau sampai keluar rumah Anda. Sinyal yang bocor sampai keluar rumah sangat berisiko tinggi untuk timbulnya eksplotasi terhadap jaringan nirkabel Anda. Anda harus meletakkan peralatan access point Anda pada daerah sekitar ruang tengah dari rumah Anda. Jangan sekali-kali meletakkan access point atau router di dekat jendela, karena akan semakin meningkatkan jangkauan sinyal Wi-Fi Anda ke luar rumah. - Matikan saja jaringan nirkabel jika sedang tidak digunakan
Aturan keamanan yang paling ampuh adalah dengan mematikan peralatan jaringan atau access point ketika sedang tidak digunakan. Misalnya saja, jangan sekali-kali meninggalkan rumah dengan Wi-Fi yang menyala, walaupun itu untuk keperluan download data. Access point yang menyala tanpa ada yang memantau sangat berisiko tinggi terhadap eksploitasi.