Rabu, 30 Maret 2011

16 Port Switch TL-SG1016D - TP-LINK Gigabit


* 16 10/100/1000M RJ45 ports.
* Supports MAC address self-learning and auto MDI/MDIX.
* Standard 19-inch rack-mountable steel case.

* All ports support Full/half duplex transfer mode for 10Mbps/100Mbps and Full duplex transfer mode for 1000Mbps
* Supports Auto-MDI/MDIX function
* Supports IEEE 802.3X flow control for full-duplex mode and back pressure flow control for half-duplex mode
* Store and forward Switching scheme

harga jual Rp.704.602,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

8 Port Switch TL-SG1008D - TP-LINK Gigabit


TL-SG1008D 8-port Unmanaged Gigabit Desktop Switch TL-SG1008D
* 8-port 10/100/1000M Gigabit Ethernet Desktop Switch
* Supports MAC address self-learning and auto MDI/MDIX

* Supports IEEE 802.3x flow control for Full Duplex mode and backpressure for Half Duplex mode
* Non-blocking switching architecture that forwards and filters packets at full wire-speed for maximum throughput
* Supports MAC address auto-learning and auto-aging
* LED indicators for monitoring power, link, activity
* Plastic case, desktop or wall-mounting design
* External power adapter supply

harga jual Rp.290.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

24 Port Switch TL-SF1016D - TP-LINK


16-port Switch TL-SF1016D - TP-LINK

* 24 10/100M RJ45 ports.
* Supports MAC address self-learning and auto MDI/MDIX.
* Standard 19-inch rack-mountable steel case.

* Supports IEEE 802.3x flow control for Full Duplex mode and backpressure for half-duplex mode
* Supports MAC address auto-learning and auto-aging
* LED indicators for monitoring power, link, activity, 100Mbps
* Standard 19-inch rack-mountable steel case
* Internal universal power supply


http://www.tp-link.com/products/productDetails.asp?pmodel=TL-SF1024

harga jual Rp.363.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

Kamis, 24 Maret 2011

16-port Switch TL-SF1016D - TP-LINK


* 16-port 10/100M Fast Ethernet Desktop Switch
* Supports MAC address self-learning and auto MDI/MDIX.

Forwarding Rate

10BASE-T: 14880pps/port
100BASE-TX: 148800pps/port
Ports

16 10/100Mbps Auto-Negotiation RJ45 ports (Auto MDI/MDIX)


harga jual Rp.158.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

link : http://www.tp-link.com/products/productDetails.asp?pmodel=TL-SF1016D

8 Port Switch TL-SF1008D - TP-LINK


* 8-port 10/100M Fast Ethernet Desktop Switch
* Supports MAC address self-learning and auto MDI/MDIX.

Ports

8 10/100Mbps Auto-Negotiation RJ45 ports (Auto MDI/MDIX)
Forwarding Rate

10BASE-T: 14880pps/port
100BASE-TX: 148800pps/port

harga jual Rp.75.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

link : http://www.tp-link.com/products/productDetails.asp?pmodel=TL-SF1008D

Rabu, 23 Maret 2011

5-port Unmanaged 10/100M Desktop Switch


* Supports IEEE 802.3x flow control for Full Duplex mode and backpressure for half-duplex mode
* Supports MAC address auto-learning and auto-aging
* LED indicators for monitoring power, link, activity
* Plastic case, desktop or wall-mounting design
* External Power Adapter supply
* 5-port 10/100M Fast Ethernet Desktop Switch.
* Supports MAC address self-learning and auto MDI/MDIX.

Forwarding Rate :
10BASE-T: 14880pps/port
100BASE-TX: 148800pps/port

harga jual Rp.58.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

link : http://www.tp-link.com/products/productDetails.asp?class=&content=spe&pmodel=TL-SF1005D

Lan Card TP-Link 10/100 Mbps


Perangkat Card internal dipasang di slot PCI pada PC dan menghubungkan ke jaringan lokal maupun global melalui media kabel UTP. Mengusung teknologi NIC Fast Ethernet yang dapat mentransfer data sampai dengan kecepatan 100Mpbs (Half Duplex) dan up 200Mpbs (Full Duplex).

harga jual Rp.28.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

SMC SMCEZ1016DT SWITCH 16 PORT


# Interfaces/Ports Number of Ports: 16
# Fast Ethernet Port: Yes
# Interfaces/Ports: 16 x RJ-45 10/100Base-TX LAN
# Network & Communication Flow Control: IEEE 802.3x (Full-duplex)
# Switching Method: Store-and-forward
# Layer Support: 2
# Address Table: 2K MAC Address


harga jual Rp.358.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

swicth 8 port SMC FS8-8-PORT


# General Information Manufacturer: SMC Networks, INC
# Product Type: Ethernet Switch
# Miscellaneous Certifications & Standards: IEEE 802.3 10BASE-T IEEE 802.3u 100BASE-TX IEEE 802.3x flow control support EMC/SAFETY COMPLIANCES: CE Mark Class B EMISSIONS: FCC Class B, CISPR Class B, EN 61000-3-2/3 IMMUNITY: EN 61000-4-2/3/4/5/6/8/11 SAFETY: CSA/NRTL (CSA60950-1 & UL60950-1) TUV/GS (EN60950-1)
# Network & Communication Flow Control: IEEE 802.3x (Full-duplex)
# Switching Method: Store-and-forward
# Layer Support: 2
# Address Table: 2K MAC Address

# Interfaces/Ports Number of Ports: 8
# Fast Ethernet Port: Yes
# Interfaces/Ports: 8 x RJ-45 10/100Base-TX LAN


harga jual Rp.148.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

Switch D-Link 24 port 10/100 Mbps, unmanaged


Features :

* 24 10/100BASE-TX Ethernet Ports
* Auto MDI/MDIX for Each Port
* Full/Half-Duplex Support for Each Port
* Brackets Provided for


harga jual Rp.583.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

DLINK Switch DES-1016D 16 port 10/100 Mbps


The D-Link DES-1016D unmanaged switch with 16 x 10/100BASE-T ports is the ... The DES-1016D has 16 plug-and-play ports, the switch is a perfect choice for a small office and home network.

harga jual Rp.378.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

switch 5 Port d-link des 1005D


5-port UTP, 10/100Mbps , Auto-sensing, Unmanaged, d-link des-1016d 5 port fast ethernet desktop switch
specifications : product features * 16 x nway 10/100base-tx fast ethernet ports * full and half duplex support for each port * all ports

harga jual Rp.137.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

LAN CARD DLINK GIGABIT ETHERNET 10/100/100 Mbps


D-Link DGE-530T / 528T Ethernet 1port UTP 10/100/1000, 32 Bit, Gigabit
Transfer Data Makin Cepat. D-Link 10/100 PCI Lan Card. D-Link DGE 528 TX Gigabit LAN Card. Lan Card D-Link 10/100/1000 MBPS untuk slot PCI .

harga jual Rp.183.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

Lan Card D-Link 10/100 Mbps


spesifikasi :
IEEE 802.3 Ethernet and IEEE 802.3u Fast Ethernet Compliant, 32-bit Bus Master PCI Specification 2.2 Compliant, Support IEEE 802.3x Flow Control, Support Half and Full Duplex, Easy Install and Use, Diagnostic LEDs for Easy Troubleshooting

harga jual Rp.58.000,-
hubungi / send sms : 085722848109
COD : DKI Jakarta

Senin, 21 Maret 2011

radio link YS1100U



Radio Link murahhhhhh BU
Kondisi Barang : Baru
Harga : Rp. 350.000
Lokasi Seller : DKI Jakarta

Description :
1 . lagi
RADIO LINK
Spoiler for radiolink:


1. Products Main Features
· High data rate. Low power consumption and low cost;
· Carrier frequency: 433MHz or ISM others optional;
· Interface: RS-232/ RS-485/ TTL optional;
· Multi-channels: 16 channels, expandable for 32 channels;
· Adjustable Baud rate: 1200/2400/4800/9600/19200/38400bps, 115kbps;
· Transparent data transmission: What has been received is exactly what has been transmitted,
suitable for any standard or non-standard user protocols;
· Interface format: 8N1/8E1/801 user-defined, or customization for other format interface;
· Modulation: GFSK. Based on the Gaussian Frequency Shift Keying (GFSK) modulation, High antiinterference
and Low BER (Bit error Rate);
· Half duplex: Integration of receiver and transmitter,10ms auto change for receiving and sending;
· Widen Temperature: -35…+75 C (-31~167 F);
· Working humidity: 10%~90% relative humidity without condensation;
· Impedance:50Ω (SMA antenna port, multiple antenna options available);
2. Application areas
· Automatic meter reading(AMR);
· Wireless smart terminal: POS, PDA;
· Wireless electronic display screen, LED display;
· RS-485 wired multi-drop system changeover wireless system;
· Wireless remote control, Environment monitor, telemetry system;
· Check attendance system, Queue-management system and positioning in coal mine;
· Industrial automatic data collection, Wireless Data Acquisition, Wireless sensor, SCADA.
YS-1100U Модуль приемопередатчика. Инструкция по применению
3. Specifications
· RF power: <50mW/ 17dBm;
· Receiving current: <20mA;
· Transmitting current: <40mA;
· Power supply: DC 3.3-5 V;
· Receiving sensitivity:
- 108 dBm (@9600bps)
- 112 dBm (@ 1200bps);
· Size: 47mmx24mmx6mm (without antenna port );
· Range:
<300m (BER=10- 5 @9600bps, when antenna is 2m above ground in open area)
<500m (BER=10- 5 @ 1200bps, when antenna is 2m above ground in open area).

PM aja gan Atau telepon di 085722848109

PERANCANGAN DAN PEMBUATAN SISTEM KENDALI JARAK JAUH BERBASIS MIKROKONTROLER MENGGUNAKAN TEKNOLOGI RADIO LINK

TUGAS AKHIR




Oleh
INDRA MAULANA
NIM : 48909012




2010

ABSTRAK
PERANCANGAN DAN PEMBUATAN SISTEM KENDALI JARAK JAUH BERBASIS MIKROKONTROLER MENGGUNAKAN TEKNOLOGI RADIO LINK


Pemanfaatan teknologi yang berkembang dalam hal penyampaiam informasi dan komunikasi saat ini dapat dilakukan secara wireline maupun wireless. Pada tugas akhir ini dijelaskan perancangan perangkat keras pengiriman data dengan pemanfaatan teknologi radio link sehingga mempermudah pekerjaan manusia, teknologi ini sama dengan sistem komunikasi serial dengan sinyal dan teknik modulasi. Teknologi yang dipilih akan sangat menentukan kehandalan sistem komunikasi tersebut, sehingga data dapat dikirim dan diterima melalui antar muka system komunikasi serial. Rancang bangun alat ini terdiri dari sensor suhu LM 35DZ sebagai pendeteksi nilai suhu terukur, mikrokontroler ATMega16 untuk konversi data analog ke digital dan sebagai pemroses data, dan software UART sebagai penampil data keluaran kemonitor. Alat ini bekerja dengan menerima perintah dari master untuk menghidupkan led, mematikan led dan mengukur keluaran suhu dari sensor LM 35DZ dan ditampilkan pada PC menggunakan Maxim 232.

Untuk itu pengolahan awal perancangan perangkat keras dengan modulasi FSK-GFSK. Teknik modulasi awal dilakukan secara FSK kemudian dilanjutkan modulasi secara GFSK. Pada penerima hasil pengukuran ditampilkan pada layar monitor PC dengan menggunakan program antarmuka hyperterminal.

Kemudian hasilnya diproses pada mikrokontroler dengan sensor LM 35DZ yang mempunyai keluaran berupa suhu, keluarannya harus dikonversi dulu menggunakan ADC internal dari mikrokontroler ATMega16. Dan pengukuran suhu serta pemrosesan data ADC ini akan ditampilkan dalam keluaran pada PC.


PERANCANGAN DAN PEMBUATAN SISTEM KENDALI JARAK JAUH BERBASIS MIKROKONTROLER MENGGUNAKAN TEKNOLOGI RADIO LINK




Oleh :
Indra Maulana


Tugas Akhir ini telah diterima dan disahkan
sebagai persyaratan untuk memperoleh gelar
SARJANA SAINS TERAPAN
di
PROGRAM PENDIDIKAN ALIH JENJANG D4
TEKNIK KOMPUTER DAN JARINGAN
SEKOLAH TEKNIK ELEKTRO DAN INFORMATIKA
INSTITUT TEKNOLOGI BANDUNG



Bandung, ........................


Disetujui oleh :
Pembimbing I, Pembimbing II,


KATA PENGANTAR

Puji syukur penulis panjatkan ke hadirat Allah SWT, yang atas rahmat dan karunia Nya penulis dapat menyelesaikan tugas akhir ini. Shalawat dan salam tercurah kepada Rasulullah Muhammad SAW beserta keluarganya.

Selama melaksanakan tugas akhir ini, penulis mendapat bantuan dan dukungan dari berbagai pihak. Untuk itu, penulis ingin mengucapkan terima kasih kepada :
1. Bapak Dr. Kusprasapta Mutijarsa, selaku pembimbing I, yang telah memberikan bimbingan dan semangat dalam menyelesaikan ini.
2. Bapak Ir. Sumarsono, selaku pembimbing II, yang telah mencurahkan perhatian dan waktunya yang demikian banyak dalam penyelesaian tugas akhir ini.
3. Seamolec yang telah memberikan beasiswa sehingga penulis dapat menyelesaikan Pendidikan Alih Jenjang D4 Teknik Komputer dan Jaringan ini.
4. Ayah, Ibu dan adik-adik tercinta, beserta seluruh keluarga yang senantiasa memberikan semangat dan do’anya.
5. Seluruh staf dan karyawan Laboratorium LSS, yang telah memberikan banyak sekali bantuannya.
6. dan semua pihak yang membantu, yang tidak dapat penulis sebutkan satu persatu.

Penulis menyadari bahwa tugas akhir ini bukanlah tanpa kelemahan, untuk itu kritik dan saran sangat diharapkan.
Akhir kata, semoga tugas akhir ini dapat bermanfaat bagi para pembacanya.

Bandung, 13 Desember 2010


Indra Maulana
DAFTAR ISI

ABSTRAK i
LEMBAR PENGENSAHAN ii
KATA PENGANTAR iii
DAFTAR ISI iv
DAFTAR GAMBAR vi
DAFTAR TABEL vii
DAFTAR SINGKATAN DAN LAMBANG viii
DAFTAR LAMPIRAN ix
BAB I.PENDAHULUAN 1
I.1 LATAR BELAKANG MASALAH 1
I.2 TUJUAN 2
I.3 BATASAN MASALAH 2
I.4 METODOLOGI 2
I.5 SISTEMATIKA PENULISAN 3
BAB.II LANDASAN TEORI 4
II.1KOMUNIKASI DATA 4
II.1.1 KOMUNIKASI SERIAL 4
II.1.2 TRANSISTOR-TRANSISTOR LOGIC 7
II.2 KOMUNIKASI RADIO 7
II.2.1 KOMUNIKASI SERIAL KE RADIO FREKUENSI 8
II.2.2 MODUL RADIO FREKUENSI DATA TRANSIVER 8
II.3 PROTOKOL 9
II.4 TOPOLOGI JARINGAN 12
II.5 HALF DUPLEX 13
II.6 BIT ERROR RATE 14
II.7 MODULASI GFSK 15
II.8 MIKROKONTROLER 16
II.8.1 ARSITEKTUR AT-MEGA16 18

II.9 SENSOR SUHU 19
II.10 CATU DAYA 20
BAB III. PERANCANGAN SISTEM 21
III.1 DESKRIPSI DETAIL SISTEM 22
III.2 PERANGKAT KERAS 23
III.2.1 SPESIFIKASI PERANGKAT KERAS 23
III.2.1.1 SENSOR SUHU 23
III.2.1.2 MODUL RADIO LINK 23
III.2.1.3 MIKROKONTROLER 25
III.3 PERANGKAT LUNAK 25
III.3.1 UART 26
III.3.2 PEMBACA SENSOR SUHU 27
III.3.3 MAIN PROGRAM 27
III.4 SKEMA PERANCANGAN PERANGKAT KERAS 28
BAB IV. PENGUJIAN SISTEM 31
IV.1 PENGUJIAN 31
IV.1.1 PENGUJIAN BAUDRATE 32
IV.2 PENGUJIAN MODUL KENDALI SALVE 34
IV.2.1 PENGUJIAN CEK DATA VALID DIMODUL SLAVE 34
IV.2.2 PENGUJIAN TEMPERATUR 35
BAB V. KESIMPULAN DAN SARAN 38
V.1 KESIMPULAN 38
V.2 SARAN 38
DAFTAR PUSTAKA 49





DAFTAR GAMBAR

Halaman
Gambar 2.1 Konektor DB9 4
Gambar 2.2 Skema Rangkaian Serial 5
Gambar 2.3 Asynchronous Rs232 Serial Link 5
Gambar 2.4 Gelombang Rs232 dan TTL 7
Gambar 2.5 Gelombang Frekuensi Radio 8
Gambar 2.6 YS-1100 8
Gambar 2.7 Machine Model (single Link) 10
Gambar 2.8 Topologi Star 11
Gambar 2.9 Komunikasi half Duplex 12
Gambar 2.10 Modulasi FSK 15
Gambar 2.11 Diagram Blok AT-MEGA 16 18
Gambar 2.12 Bentuk Fisik LM 35DZ 19
Gambar 2.13 Skema Rangkaian Sensor Suhu LM 35DZ 19
Gambar 2.14 Skema Catu Daya 20
Gambar 3.1 Diagram Detail sistem 21
Gambar 3.2 Perancangan Sistem 22
Gambar 3.3 Modul YS-1100 23
Gambar 3.4 Bentuk Dari Segi Ukuran Model YS-1100 24
Gambar 3.5 RS232 Frame 25
Gambar 3.6 Flowchart Kirim Data Dari Master 29
Gambar 3.7 Flowchart Terima Data Dari Radio Link Pada Slave 30
Gambar 4.1 Blok Diagram Pengujian Master dan Slave 37
Gambar 4.2 Kurva Tegangan Output Sensor Suhu LM 35DZ 46

DAFTAR TABEL

Halaman
Tabel II.1 Pin DB9 5
Tabel II.2 Protokol Data Link 11
Tabel II.3 Parameter Pada AT-Mega 16 17
Tabel III.1 Pin YS-1100 32
Tabel IV.1 Hasil Pengujian Baud Rare kirim 1 Char 43
Tabel IV.2 Hasil Uji Baud Rate Kirim 3 Char 33
Tabel IV.3 Format data lampuon.bin pengirim dari master 34
Tabel IV 4 Data Perintah 35
Tabel IV 5 Hasil Pengujian Pengiriman Data 35
Tabel IV 6 Hasil Eksekusi Perintah di Modul Slave 35
Tabel IV 7 Hasil Konveersi suhu LM 35 DZ 36


DAFTAR SINGKATAN DAN LAMBANG

SINGKATAN Nama Halaman
USART Universal Asynchronous Receiver/Transmitter 1
DTE Data Terminal Equipment 4
DCE Data Communication Equipment 4
TTL Transistor-Transistor Logic 7
LOS Line Of Sight 7
IC Integrated Circuit 8
MCU Microcontroller Unit 8
DLSAP Data-Link Service Access Point 10
BER Bit Error Rate 13
Ram Random Access Memory 14
Rom Read Only Memory 14
RISC Reduced Instruction Set Computer 15
RF Radio Frequency 20
PC Personal Computer 20

DAFTAR LAMPIRAN

Halaman
LAMPIRAN A.1 Skema Sistem Minimum ATMega16 L-1
LAMPIRAN A.2 Tabel ASCII L-2
LAMPIRAN A.3 Protokol L-3
LAMPIRAN A.4 Source Code Program L-4




link download :

Download T.A radio link from Indowebster.com

Download T.A radio link from Indowebster.com

[url='http://indowebster.com/t.a_radio_link.html'][img]http://www.28indowebster.com/thumb_be8497c3ada7cb6a3ee4a7977044fd99.jpg[/img][/url]

Senin, 14 Maret 2011

membuat firewall diubuntu

Disain Koneksi :
Internet/ISP<====>Server<====> Switch |<====> Klien
Keterangan:
1. ISP dengan IP 192.168.1.1 netmask 255.255.255.0
2. Komputer server dengan OS Ubuntu sebagai Gerbang(Gateway) dengan 2 Ethernet Card
Ethernet Card:
- eth0 tersambung ke ISP
IP 192.168.1.2 netmask 255.255.255.0
IP Gerbang 192.168.1.1
DNS : 202.134.2.5 dan 202.134.0.155 (DNS Speedy)
eth1 tersambung ke swicth / LAN
IP 192.168.0.1 netmask 255.255.255.0
Gerbang : --
DNS : 202.134.2.5 dan 202.134.0.155
3. Pengaturan IP komputer klien mulai 192.168.0.2 s/d 192.168.0.254
netmask 255.255.255.0
gateway 192.168.0.1
DNS 192.168.0.1
Konfigurasi untuk Internet Sharing nya dengan Ubuntu sebagai server, isikan nilai seperti ketentuan
di atas dimana
- eth0 tersambung ke ISP, dengan IP
IP 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
DNS : 202.134.2.5 dan 202.134.0.155
- eth1 tersambung ke swicth/LAN dengan IP
IP 192.168.0.1
netmask 255.255.255.0
gateway
DNS : 202.134.2.5 dan 202.134.0.155
Edit file /etc/resolv.conf dan isikan
nameserver 202.134.2.5
nameserver 202.134.0.155
Lanjutkan dengan mengedit file /etc/network/interfaces, diisi seperti ini
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.20
gateway 192.168.1.1
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
Kemudian aktifkan ip_forward, dengan mengedit file /etc/sysctl.conf
net.ipv4.ip_forward = 1
atau dengan cara
echo 1 > /proc/sys/net/ipv4/ip_forward
Aktifkan NAT dengan iptables
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Restart network
/etc/init.d/networking restart
Pasang IPMASQ dan DNSMASQ untuk caching NS
apt-get install dnsmasq ipmasq
Untuk mengkonfigurasi IPMASQ
dpkg-reconfigure ipmasq
dan DNSMASQ
vim /etc/dnsmasq.conf
Jalankan DNSMASQ
/etc/init.d/dnsmasq start
Selesai…
NYANG LEBIH GAMPANG LAGI .....
Seperti yang telah dibahas sebelumnya, semua firewall di linux menggunakan modul netfilter pada
kernel dan iptables adalah perintah yang yang digunakan untuk mengkonfigurasi fungsi dari
firewall tersebut. Nah kalau kita Pusiiing dengan perintah-perintah diatas maka kita dapat
menggunakan ujung depan (front end) yang bersifat antar muka grafis.
Salah satunya Adalah FIRESTARTER
Instalasi :
Dari terminal atau dari Synaptic Package Manager
Contoh dari Terminal :
syafiudin@syafiudin-laptop:~$ sudo apt-get install firestarter
Hasil Instalasi dapat dilihat pada Aplications->Internet->Firestarter
Saat pertama dijalankan firestarter akan meminta kita untuk melakukan pengaturan sbb:
Setelah pengaturan maka firewall otomatis akan dijalankan, secara standar maka firestarter akan
melarang semua koneksi yang masuk, Anda harus membuat aturan agar koneksi yang masuk dapat
diterima pada Bagian Policy. Pengaturan tersebut dapat disesuaikan dengan kebutuhan kita, apakah
berdasarkan alamat IP, mau berdasarkan layanan jaringan yang tersedia.
Berikut contoh tampilan saat firewall aktif dan antar muka yang ada
Salah satu keistimewaan firestarter adalah adanya log dari koneksi yang diblokir sehingga kita
dapat melihat dari alamat ip mana saja yang mencoba akses ke komputer dan jaringan yang kita
kelola.
Selain itu juga banyak paket pengaturan firewall lainnya seperti
Guarddog Firewall
Fwbuilder Firewall
Atau paket berbasis web seperti e-box platform

link : subair.files.wordpress.com/2008/06/firewall-di-ubuntu.pdf

Minggu, 13 Maret 2011

Creating a Linux Mail Server



Creating a Linux Mail Server
(Postfix, Procmail, Fetchmail,
SpamBayes, Courier-imap, Mutt,
SquirrelMail)


What this Document is About

Software Used

Installing the Software

Postfix Configuration

Fetchmail Configuration

Spambayes and Procmail Configuration

Mutt Configuration

SquirrelMail Configuration

Courier Authentication

Pop-before-smtp Configuration

Additional Simple Procmail Recipes and Mailbox Config

Conclusion

Resources

Contributions




What this Document is About

This document covers how I have set up my Linux box to work as a Mail Server. The details will be specific to Arch Linux, but it will be be general enough for any *nix distribution if you have a knowledge of installing software packages, finding the location of configuration files, and starting/stoping services..

My goals in creating this mail system are to have all of my mail, from various email accounts, stored locally on my machine so I can access it anytime via SSH, the web, or imap. I wanted all of my mail delivered to my local user account and I wanted the spam to be sucked out and launched into space.

The backbone of the mail system is the Mail Transport Agent (MTA). It will handle receiving mail addressed directly to your machine, sending it to the correct users mail box, and sending mail out from the machine. I determined Postfix to be the best choice for my MTA and after some reading found Procmail for sorting mail, SpamBayes for detecting spam, and Fetchmail for grabbing mail from my pop mailboxes.

Bellow is a flow diagram for mail moving through the system:

The SpamAssassin and sa-learn can be ignored. I will describe how to use it with SpamBayes since I was not happy with Spam Assassin's performance and had made the diagram when I was still using it.


Software Used

  • Arch Linux
  • Postfix 2.1.5
      Secure, fast, easy to administer drop in replacement for Sendmail. (MTA) Provides smtp-server.
      (Requires sasl installed and support for sasl compiled into Postfix if sending mail through an intermediary as you may need to do if you have a domain name pointing to a dynamic IP address.)
  • Cyrus SASL 2.1.21
      SASL authentication daemon.
  • Procmail 3.22
      Highly configurable auto mail processing.
  • Fetchmail 6.25
      A remote-mail retrieval utility.
  • SpamBayes 1.1a1
      a Bayesian anti-spam filter, initially based on the work of Paul Graham. The major difference between this and other, similar projects is the emphasis on testing newer approaches to scoring messages.
  • Mutt 1.4.2.1
      A small but very powerful text-based mail client
  • Courier-imap 4.0.4
      IMAP / POP3 Server
  • Courier-authlib 0.57
      Authentication library for the courier mailserver.
  • SquirrelMail cvs 1.5.1
      For checking mail via the web.
      (requires imap-server, perl, and php)
  • Pop-before-smtp 1.38
      A simple daemon written in Perl, to allow email relay control based on successful POP or IMAP logins.

Installing the Software

    Installing Postfix

    A note for those with dynamic IP addresses: Before installing Postfix we must first consider if it will need to make use of Simple Authentication and Security Layer (SASL). If you have a dynamic IP address and are using a service like dyndns.org you will need to have Postfix send your mail through your ISP's mail server (with authentication) making use of SASL for the connection. This is because many domains that you will send email to will recognize your hostname as pointing to a dynamic IP address and send the mail back. Check if your distributions Postfix package was built with SASL support or if you are compiling Postfix from scratch add SASL with a ./configure option.

    If you've determined you do not need SASL support in postfix:

      $ pacman -Sy postfix

    If you do need SASL support we need to install cyrus-sasl and use the Arch Build System (abs) utility for building Postfix. Follow the instructions bellow or follow these Arch Wiki instructions: http://wiki.archlinux.org/index.php/PostFix_Howto_With_SASL

      $ pacman -Sy cyrus-sasl
      $ abs
      $ cd /var/abs
      $ mkdir -p local/postfix
      $ cp -v extra/daemons/postfix/* local/postfix

    Now edit /var/abs/local/postfix/PKGBUILD. Under the build() section change:

      make OPT="${CFLAGS}" || return 1

    to:

      make OPT="${CFLAGS}" \
      CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl/" \
      AUXLIBS="-L/usr/lib/sasl2 -lsasl2" || return 1

    Now run:

      $ makepkg
      $ pacman -A postfix-*.pkg.tar.gz

    I like to then copy the package into a directory under /var/lib/pacman so I have access to all of my abs built packages later:

      $ mkdir /var/lib/pacman/abs_built
      $ cp postfix-*.pkg.tar.gz /var/lib/pacman/abs_built

    Installing Fetchmail

      $ pacman -S fetchmail

    Installing Procmail

      $ pacman -S procmail

    Installing SpamBayes

    SpamBayes is not yet in the pacman repository. Download it, extract, and install (substitute version numbers with most current):

      $ wget http://dl.sourceforge.net/sourceforge\
      /spambayes/spambayes-1.1a1.tar.gz
      $ tar zxvf spambayes-1.1a1.tar.gz
      $ cd spambayes-1.1a1
      $ python setup.py install

    Installing Mutt

      $ pacman -S mutt

    Installing courier-imap and courier-authlib

    SquirrelMail as well as other mail clients (evolution, outlook, cell phone, etc.) will use this to connect to the mail box. Courier-imap also depends on courier-authlib, so this command will install that as well.

      $ pacman -S courier-imap

    Installing SquirrelMail

      $ pacman -S squirrelmail

    Installing pop-before-smtp

    You are going to want to consider using Postfix/TLS or pop-before-smtp if you are interested in users connected via IMAP being able to send mail (using your mail server as a SMTP relay). I recommend using Postfix/TLS but will not cover how to install/configure it in this document.

    Pop-before-smtp is not in pacman repositories. Substitute version numbers with the most current.

      $ wget http://dl.sourceforge.net/sourceforge/popbsmtp/pop-before-smtp-1.38.tar.gz
      $ tar zxvf pop-before-smtp-*.tar.gz
      $ cd pop-before-smtp-*

    Read the README in this directory and then read README.QUICKSTART in the contrib directory for where to copy the necessary files to.


Postfix Configuration

    main.cf

    Now change to the '/etc/postfix' directory and open up main.cf for editing.

    The domain name for my machine is through dyndns.org. Set your myhostname and my domain to something like this:

      myhostname = example.com mydomain = example.com

    Next we are going to want to set Postfix up for using qmail-style delivery with Maildir (where each email is stored in its own file). This is for courier-imap which SquirrelMail will be using to access the mail and will have other advantages. Don't forget the ending forward slash.

      home_mailbox = Maildir/

    Set it up so that incoming mail is sent through procmail and so we can alias names/users to mailboxes.

      mailbox_command = /usr/bin/procmail -a "$DOMAIN"

      alias_maps = hash:/etc/postfix/aliases

    If you have a dynamic IP or have trouble with mail being returned from large ISP's or mail systems you are going to have to take a few extra steps. We will set it up so that mail will go through a relay host. In this example I will use my ISP's (SBC) smtp server as an example. Make these additional changes to main.cf

      relayhost = [smtp.sbcglobal.yahoo.com]

      # authentication for sbc yahoo
      smtp_sasl_auth_enable = yes
      smtp_sasl_security_options = noanonymous
      smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

That wraps up our changes to main.cf. We just need to create the hash aliases databases that we defined above. Add these lines to the top of /etc/postfix/aliases (replacing hypexr with your user account of course):

    root: hypexr

    spam: hypexr
    ham: hypexr

Generate the database. From /etc/postfix dir:

    $ postalias aliases

Set up smtp server and authentication for SBC mail relay. sasl_passwd:

    smtp.sbc.mail.yahoo4.akadns.net    my_username@sbcglobal.net:my_passw

Note: Server name can change from time to time. There is a CNAME that points to this name but CNAMEs do not work here.

Generate the database:

    $ ./postmap sasl_passwd

Start the postfix server and we are done with postfix!!!!

    $ /etc/rc.d/postfix start

Having problems getting it to start? Check out the Postfix log file usually in /var/log/mail or /var/log/maillog.


Fetchmail Configuration

We are going to run our fetchmail daemon from user root. So create the file /root/.fetchmailrc:

    set postmaster "postmaster"
    set bouncemail
    set no spambounce
    set properties ""
    set daemon 60
    poll pop.example.com with proto POP3
    user 'user_name' there with password 'my_password' is 'local_user_to_deliver_to' here options flush
    poll pop.gmail.com with proto POP3 port 995
    user 'my_gmail_un@gmail.com' there with ssl with password 'my_password' is 'hypexr' here options keep

This tells fetchmail to check every minute for mail at pop.mypop.com and also at my gmail account. The flush option at the end of the mypop entry tells it to remove the mail after it is downloaded. I do not want the mail removed from my Gmail account so I use the keep option. Google also uses ssl, hence the "with ssl". Fetchmail comes with its configuration utility fetchmailconf which makes setting up your .fetchmailrc file easy.

I don't believe that Arch Linux has a rc script for fetchmail. The one that I made (/etc/rc.d/fetchmail) looks like this (stat_busy, stat_fail, stat_done are specific to Arch Linux. You could take these out):

    #!/bin/sh

    . /etc/rc.conf
    . /etc/rc.d/functions

    DAEMON_NAME="fetchmail"
    DAEMON_CONF="/root/.fetchmailrc"
    DAEMON_PATH="/usr/bin/fetchmail"

    PID=`pidof -o %PPID ${DAEMON_NAME}`

    case "$1" in
    start)
    stat_busy "Starting ${DAEMON_NAME}"
    [ -z "$PID" ] && ${DAEMON_PATH} -f ${DAEMON_CONF} -d 60 &> /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    add_daemon ${DAEMON_NAME}
    stat_done
    fi
    ;;
    stop)
    stat_busy "Stopping ${DAEMON_NAME}"
    [ ! -z "$PID" ] && kill "$PID" &> /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    rm_daemon ${DAEMON_NAME}
    stat_done
    fi
    ;;
    restart)
    # calling 'stop' and 'start' without the $0 fails...
    $0 stop
    sleep 3
    $0 start
    ;;
    *)
    echo "usage: $0 {start|stop|restart}"
    esac
    exit 0

And start the fetchmail daemon:

    $ /etc/rc.d/fetchmail start

Or if you don't want to create/modify an rc script you can start the fetchmail daemon like:

    $ /usr/bin/fetchmail -d 60

Spambayes and Procmail Configuration

We are going to be using Spambayes to train and determine if mail is spam and Procmail to sort the mail into folders when they enter our mail system. These two go together as far as Procmail is going to use Spambayes to help sort the mail.

I had used SpamAssassin for a year and had not been very happy with its performance. I have only been using Spambayes for a few weeks and have been pleasantly surprised by how well it has worked and how quickly it adapts. In fairness I had been training SpamAssassin on all of my spam, the spam it had caught and the spam it had missed as well. It was also an older version and I was not using all of the features. With that being said if you are curious give it a try. Many other excellent programs exist. A quick search on Google will turn them up.

When Spambayes is installed it is going to move several files that start with sb_ into your /usr/bin directory. We are going to be interested in sb_mboxtrain.py and sb_filter.py. The former trains the spam filter and the later classifies incoming spam. There are two methods I tried for the initial training:

  1. Since I already had thousand of spam and ham (non spam) messages saved up I first tried initially training on this older mail. The results were okay but it was miss sorting mail. These problems would have sorted them selves out with the continued training of the misclassified mail but it would have also took a little while because the database had already been trained so much.
  2. The second method I used was extremely effective. I started out with no training on initial messages. I simply let Spambayes work with no information. I then sent the spam and ham messages that ended up in the wrong mailbox to a designated folder. I then run the Spambayes training program on these miss classified messages.

The results from the second method have been amazing. Without even having to manually classify very many messages Spambayes has been performing at superior levels. Check out Spambayes Wiki for many other training methods. I will discuss easy methods of sorting miss classifications in the Mutt and Squirrel Mail sections.

    Spam System Initial Setup

    We are going to want Maildir folders to hold our regular mail, mail classified as spam, mail classified as unsure, missed spam, and missed ham.

    If the standard Maildir directory (~/Maildir) doesn't already exist lets create it with the necessary sub directories to make it a mail box. Run these commands from your user account who will be receiving the mail.

      $ mkdir ~/Maildir
      $ mkdir ~/Maildir/{new,cur,tmp}

    And now the other 4 directories that we are going to use for dealing with spam (Making the directories hidden is going to be done for integration with Squirrelmail):

      $ mkdir ~/Maildir/{.MissedSpam,.MissedHam,.CaughtSpam,.Unsure}
      $ mkdir ~/Maildir/.MissedSpam/{new,cur,tmp}
      $ mkdir ~/Maildir/.MissedHam/{new,cur,tmp}
      $ mkdir ~/Maildir/.CaughtSpam/{new,cur,tmp}
      $ mkdir ~/Maildir/.Unsure/{new,cur,tmp}

    The messages that we are going to be training as spam are going to be in ~/Maildir/.MissedSpam and ham will be in ~/Maildir/.MissedHam. Lets create the script and cron job that will take care of training the Spambayes db. Create a file ~/Maildir/train_spambayes and add this:

      #!/bin/sh
      # Script to copy mail missed spam and ham into correct folders
      # and run sb_mboxtrain.py to train spambayes
      # Training will be done only on missed spam and ham

      # Files we saved or bounced may be in the new directory
      # We want them in cur for training
      mv /home/hypexr/Maildir/.MissedSpam/new/* \
      /home/hypexr/Maildir/.MissedSpam/cur 2>/dev/null
      mv /home/hypexr/Maildir/.MissedHam/new/* \
      /home/hypexr/Maildir/.MissedHam/cur 2>/dev/null
      /usr/bin/sb_mboxtrain.py -d /home/hypexr/.hammie.db \
      -g /home/hypexr/Maildir/.MissedHam \
      -s /home/hypexr/Maildir/.MissedSpam

    Make the script executable:

      $ chmod +x ~/Maildir/train_spambayes

    Set up our database that will be consulted for new email and trained on new spam/ham:

      $ /usr/bin/sb_filter.py -d $HOME/.hammie.db -n

    You will want cron installed so that it can launch the script above, which trains Spambayes, every night at 3:21 am. Edit your cron jobs with the command crontab -e and add:

      21 3 * * * ~/Maildir/train_spambayes

    Procmail Configuration for Spambayes

    These are basic procmail recipes that will sort the spam from ham. From Spambayes on Unix or Linux. Add these lines to your mail recipient's ~/.procmailrc:

      SHELL=/bin/sh
      MAILDIR=$HOME/Maildir
      DEFAULT=$HOME/Maildir/
      CAUGHT_SPAM=$MAILDIR/CaughtSpam/
      UNSURE=$MAILDIR/Unsure/

      #Spambayes process
      :0fw:hamlock
      | /usr/bin/sb_filter.py -d /home/hypexr/.hammie.db

      :0
      * ^X-Spambayes-Classification: spam
      ${CAUGHT_SPAM}

      :0
      * ^X-Spambayes-Classification: unsure
      ${UNSURE}

      # Catches everything else.
      # Anything left over goes into the DEFAULT folder
      :0:
      ${DEFAULT}

    So incoming mail is not filtered through procmail's rules where Spambayes's sb_filter decides whether it is spam or ham. The mail is now sitting in the correct directories and ready to be accessed by whatever reader/front-end you would like. Next I going to describe setting up Mutt and SquirrelMail for viewing your mail. Mutt will be the most powerful option combining speed and sleekness but SquirrelMail will be able to match functionality.


Mutt Configuration

First we need to set the MAIL variable so that Mutt will know where to look for your mail. In your ~/.bashrc (create if does not exist) add the line:

    MAIL='~/Maildir'

Exit out of your shell and log back in so that the variable will be set or run export MAIL='~/Maildir'. On some systems mutt will not use $MAIL to determine the location of your mail box. When trying to start mutt if it reports a message that no mail directory exists you can try setting the MAILDIR variable or just create the directory that it wants to use and make it a valid Maildir: mkdir -p ~/.maildir/{cur,new,tmp} where .maildir is the folder that mutt wants to use. If you use a directory other than ~/Maildir remember to substitute that wherever I reference Maildir in this document.

Now for the fun part. Lets make everything look pretty and integrated in Mutt. If you start up Mutt right now you will see any mail that your system has received since you have completed the steps above. If no mail shows up in Mutt and there should be mail you need to first check if Spambayes has filtered it into your .Unsure or .CaughtSpam directories. Type 'c' to change directories and enter ~/Maildir/Unsure and check out the mail thats been classified as spam: 'c' ~/Maildir/CaughtSpam. If you still have not found the mail that you are expecting to have received make sure that you have configured Postfix, Fetchmail, and Procmail correctly. Also, try sending mail directly to your_user_accunt@example.com and see if it shows up in one of the directories above.

Now mail is flowing into your system and we can check how Spambayes has classified it by checking the different mail folders. The miss classified mail just needs to be moved into the correct folders for the training.
To manually move the misclassified spam mail:

  1. From you Maildir inbox tag each message that has arrived that is spam. Do this by pressing 't' and an asterisk will appear by the messages. After all of the messages have been tagged, press '; m' and enter ~/Maildir/MissedSpam and the spam messages in your inbox will be moved to the MissedSpam mailbox for training by spambayes.
  2. When looking at the mail that it has classified as spam in '~/Maildir/CaughtSpam', tag all of the messages it considered spam that were ham and press '; C' and enter ~/Maildir/MissedHam. Now tag them again and press '; m' and enter ~/Maildir to move them into your inbox, where they should have been placed in the first place.

Of course all of this manual stuff is a huge pain so lets automate all of it in .muttrc.

    .muttrc Configuration

    This .muttrc file is going to save you a quazillion.. thats right a quiazalliona hours in productivity in dealing with our current setup. Here it is:

      # Emacs is my editor of choice.  I have mostly read that people like
      # using emacs-client here and using an emacs server so that the
      # editing opens up in an existing emacs session but I prefer
      # loading up a fresh instance. The default editor is some 'vi'
      set editor="emacs"

      # Setting these macros is going to save us all of that time I was
      # talking about. Now instead of having to type all of those
      # characters to move the mail around we will can just tag the messages
      # and, for the instance of spam in your inbox, hit 'S'.

      # Move mail to correct directories
      macro index S ";s~/Maildir/.MissedSpam\r\r$\r"
      macro pager S ";s~/Maildir/.MissedSpam\r\r$\r"
      macro index H ";C~/Maildir/.MissedHam\r\r;s~/Maildir\r\r$\r"
      macro pager H ";C~/Maildir/.MissedHam\r\r;s~/Maildir\r\r$\r"
      macro index M ";s~/Maildir/\r"
      macro pager M ";s~/Maildir/\r"

      # This one lets me quickly move job search related emails to the
      # correct directory. Want to give me a job? :)
      macro index B ";s~/Maildir/.Job\r\r$\r"
      macro pager B ";s~/Maildir/.Job\r\r$\r

      # This is how we are going to move around to the different
      # mailboxes. Hitting 'alt-1' will take us to our inbox
      # 'alt-2' and we are looking at the mail Spambayes classified
      # as spam. etc.
      # The extra mailboxes I have in here are for mailing lists I am on.
      # I will show the procmail recipe that automatically puts
      # the mailing list mail into its correct mailbox further down.

      # Move to mailboxes quickly
      macro index 1 "c~/Maildir\r"
      macro pager 1 "c~/Maildir\r"
      macro index 2 "c~/Maildir/.CaughtSpam\r"
      macro pager 2 "c~/Maildir/.CaughtSpam\r"
      macro index 3 "c~/Maildir/.Unsure\r"
      macro pager 3 "c~/Maildir/.Unsure\r"
      macro index 4 "c~/Maildir/.Tur\r"
      macro pager 4 "c~/Maildir/.Tur\r"
      macro index 5 "c~/Maildir/.Sbayes\r"
      macro pager 5 "c~/Maildir/.Sbayes\r"
      macro index 6 "c~/Maildir/.Wikka\r"
      macro pager 6 "c~/Maildir/.Wikka\r"
      # Training Maildirs for Spam and Ham
      macro index 8 "c~/Maildir/.MissedSpam\r"
      macro pager 8 "c~/Maildir/.MissedSpam\r"
      macro index 9 "c~/Maildir/.MissedHam\r"
      macro pager 9 "c~/Maildir/.MissedHam\r"
      # Job E-mails
      macro index 0 "c~/Maildir/.Job\r"
      macro pager 0 "c~/Maildir/.Job\r"

      # Setting these colors makes it easy to tell which emails
      # Spambayes has missed.
      # Turn spam red and unsure green
      color index red default "~h '^X-Spambayes-Classification: spam'"
      color index green default "~h '^X-Spambayes-Classification: unsure'"
      # Turn gmail mail brightblue
      # (My regular expression is not correct here. I think that it
      # is looking anywhere in the header for my gmail address
      # instead of what I wanted.. Just in the 'To:'.
      # It still works for the most part)
      color index brightblue default "~h '(^)*my_name@gmail.com'

      # Lets set more colors to make things look beautiful. Judging by
      # my title for this section I must have had bad feelings towards
      # colors when I added this.
      #Color crap
      color index brightwhite default ~N # color for new messages
      color status black yellow
      color attachment brightyellow default # file attachments
      color search brightred default # search matches
      color quoted brightyellow default # quoted text in replies
      color quoted1 magenta default # quoted text in replies
      color body cyan default "((ftp|http|https)://|news:)[^ >)\"\t]+" # URLs
      color body cyan default "[-a-z_0-9.+]+@[-a-z_0-9.]+" # email

      # The rest of this stuff is pretty important for functionality and
      # readability.

      # Don't ask to move read message
      set move=no

      # My signature is in this file
      set signature="~/.signature"

      # Change mail to look like from scott@hypexr.org
      # Stick your email address here.
      my_hdr From: Scott Rippee

      # Header control h displays header when in pager
      # I want to only see the unignored by default
      ignore * # weed out all headers
      unignored date from: to cc subject organization # now show me these...

      # Thanks to many people whom have written the documents and posts that I
      # have gotten these settings from.

    New Mutt Commands

    Here are the most useful (as far as dealing with spam) commands that we can now use in mutt:

      t       Tag messages to be manipulated
      S Send message/s to spam training folder
      H Send message/s to ham training folder and to inbox
      alt-1 Change mailbox to Maildir/ (inbox)
      alt-2 Change mailbox to .CaughtSpam
      alt-3 Change mailbox to .Unsure
      alt-8 Change mailbox to .MissedSpam
      alt-9 Change mailbox to .MissedHam

    So for example, if a couple of spam messages show up in your inbox you can now tag them and hit 'S' (remember its uppercase s) and have them vanished into .MissedSpam for training.


SquirrelMail Configuration

To configure SquirrelMail go into your html_base_directory/squirrelmail/config and run ./conf.pl. Edit the options to fit your needs. If you want to test your config cruise over to http://localhost/squirrelmail/src/configtest.php.

Now go to http://localhost/squirrelmail/ and login using your user account. If you have any email in your in box you should see it after you log in. Now click on the Folders option that is along the top, select all of the mailbox folders that we created earlier (they are listed here because we prefixed them with a period), and click on subscribe. Hit refresh and the mailboxes should be listed in the side panel. Now you can use SquirrelMail for almost all of you mail needs including tagging messages and moving them to the correct folders for Spambayes training and checking on the mail that Spambayes has classified as spam and unsure. The only functionality from our mutt setup that can't be duplicated in SquirrelMail is copying missed ham into its training folder and then moving it into your inbox. This is due to the lack of copying ability. So you will have to go into the ham training folder to see some of the mail that should be in your inbox.

!!! IMPORTANT SECURITY NOTE!!! - Using SquirrelMail like this is not secure! Sending the plain text passwords that you use for your Unix account can be accessed by by a 3rd party, which would them access to your account. You should set up a secure server with SSL and have Courier-imap use passwords that differ from the users system password using Courier Authlib, which I will demonstrate in the next session. Excellent documents exist all over the net for setting up your web server with ssl.


Courier Authentication

Now is a good time to address a bit of essential security. As of now when a user connects via the SquirrelMail or IMAP interface the passwords are being sent in plain text and if these are sniffed that users system account is compromised. Without adding secure connections we can minimize the threat by using alternate passwords for imap connections. The snoop would then have access to your mail, but not be able to log in to the system.

Edit your authdaemonrc file. If your on Arch Linux this will be in /etc/authlib. Under authmodulelist I commented out:

    authmodulelist="authpam authpwd authuserdb authshadow ..."

And replaced it with:

    authmodulelist="authuserdb"

I believe that adding authuserdb to the front of the list may work, but I am only using this method of authentication so it is all I need in my list.

Lets create the user account entry:

    $ userdb "some_user_name" set home=/home/user_dir \
    mail=/home/user_dir/Maildir \
    uid=users_userid gid=users_groupid

    $ userdbpw | userdb "some_user_name" set systempw

You will now be prompted for this pseudo users new password. Next make sure that /etc/authlib/userdb has read/write/execute access for the owner. If not chmod 700 /usr/authlib/userdb. Now create the user database that courier is going to look to for authentication:

    $ makeuserdb

Again look to using Postfix/TLS for a tunneling the connection through a secure connection.


Pop-before-smtp Configuration

To successfully configure pop-before-smtp follow the straight forward instructions in contrib/README.QUICKINSTALL. When you are done and everything is working it is important to make sure that you have not some how made your mail server an open relay! This would cause your mail server to be flooded with traffic and be put on the open relay ban lists.

!!! IMPORTANT SECURITY NOTE!!! - I will not use the pop-before-smtp method because it involves sending a password over an insecure connection. Use Postfix through a SSL connection, Postfix/TLS, to accomplish this. Since your local machines are likely already allowed to use your Postfix as a mail relay the only time that you would be using this method is from a non-trusted server where you password can be sniffed. If you still choose to use this method make sure that you have changed the users courier password as described in Courier Authentication.


Additional Simple Procmail Recipes and Mailbox Config

If you are a member of any news letters/mailing lists you can have them automatically sorted to their own mailbox using Procmail. First create the new mail directory in your ~/Maildir directory. Lets call it .Sbayes and pretend that we are on the Spambayes mailing list. So exactly as before with the spam related mailboxes:

    mkdir -p ~/Maildir/.Sbayes/{cur,new,tmp}

Now add this new rule to your ~/.procmailrc:

    # spambayes-dev@python.org mailing list
    :0
    * ^X-BeenThere: spambayes@python.org
    ${MAILDIR}/.Sbayes/

In the .mutrc example above it shows an example of setting alt-5 as the macro to see your Spambayes emails.


A slightly different method can be used to send spam and ham for training. Adding the following lines will allow you to bounce spam messages to spam@localhost (localhost or your mail_domain.com) and ham messages to ham@localhost:

    # Mail has been bounced to spam@localhost
    :0
    * ^Resent-To:.*spam
    ${MAILDIR}/.MissedSpam

    # Mail has been bounced to ham@localhost
    :0
    * ^Resent-To:.*ham
    ${MAILDIR}/.MissedHam

If you want to bounce messages to the spam and ham addresses like this, you will need to make sure that the headers stay intact. Do not try using this or a similar technique for forwarding mails to an address because the email's headers would not be intact and this is a large part of the spam classification. This method works because above we specified spam and ham as aliases for hypexr in the Postfix aliases file.


Conclusion

For Arch Linux users, Add saslauthd authdaemond courier-imap postfix fetchmail to DAEMONS in your /etc/rc.conf file and they will be started automatically when your machine boots. If you are running a web server have the httpd service listed after the services we are adding.

/etc/rc.conf

    DAEMONS=(... saslauthd authdaemond postfix courier-imap fetchmail ...)

Enjoy your new mail system and centralized mailbox. If you are handling a large number of users for you email system this is just the tip of the iceberg and you are going to mostly be interested in virtual users, security, and a system wide spam classifier. There are many good documents on various setups to accomplish this, see the links section.

For an easier & quicker way than the above multi-step process, you can try an all-in-one Linux mail server solution. A great open source alternative is the Axigen Free Mail Server, a turnkey messaging solution for 100 email users. Give it a look.


Resources


Contributions

Thanks to Constantinos Laitsas for reworking the fetchmail rc file so that it will start as a daemon correctly

Thanks to Robert Schweikert for corrections to the train_spambayes script and the path to sb_filter.py

Thanks to Alex Satrapa for tips on example domain naming conventions

Thanks to Austin Duncan for tips on postfix configuration and mutts workings on other distros



Corrections, comments, questions e-mail scott@hypexr.org
Last Modified: July 30 2010.

Top of Page

http://www.hypexr.org/linux_mail_server.php

Sabtu, 12 Maret 2011

cara buat repository local (Repository ubuntu)

Artikel ini adalah tanggapan dari sahabat..yang menanyakan bagaimana cara membuat repository dari hardisk kita... buat temen-temen yang belum tau/lupa apa itu repository?? lihat disini, dan kalu pengen tau juga bagian-bagian apa aja yang ada didalam repository.. bisa lihat disini, ok lanjut.. penggunaan repository online sangatlah mudah, namun itu bagi teman-teman yang memiliki fasilitas internet, tapi bagaimana jika tidak?? untuk temen-temen yang mau tetep punya repo.. temen2 bisa buat repository offline.., mau tau caranya kan..?? nyok baca terus..

sebenernya ada dua cara.. cara pertama pake dvd, cara kedua pakai harddisk.. kali ini saya akan menjeleskan mengenai cara pembuatan repo menggunakan hardisk..
Untuk membuat repository lokal didalam http://repo.ugm.ac.id/ekstra/other/ hardisk pribadi, yang perlu dilakukan adalah sebagai berikut :

Buka terminal kemudian ketikkan vim script untuk membuat script download;
kemudian ketikkan baris program seperti dibawah lalu simpan, contoh namanya ubuntu-repo


#!/bin/sh
host=repo.ugm.ac.id root=ubuntu dist=hardy,hardy-updates,hardy-security
section=main,multiverse,universe,restricted arch=i386 dir=/media/disk/mirror-hardy debmirror
--progress -m --host=$host --root=$root --method=http --dist=$dist --section=$section --arch=$arch --nosource $dir --ignore-release-gpg --postcleanup

Selanjutnya berikan hak akses executable pada file script-repo tersebut;

$ chmod +x ubuntu-repo

Jalankan script-repo tersebut pada target partisi yang kita inginkan untuk menyimpan repository;

$ bash ubuntu-repo

Tunggu sampai selesai
Untuk menggunakan repository yang telah kita simpan didalam harddisk, edit file /etc/apt/source.list; Selanjutnya jalankan perintah berikut untuk mengupdate sistem anda;

$ sudo gedit /etc/apt/source.list

Kemudian masukkan baris seperti dibawah, sesuaikan path lokasinya dengan path pada hardisk anda;
deb file:///media/disk/mirror-hardy hardy main restricted multiverse universe
deb file:///media/disk/mirror-hardy hardy-security main restricted universe multiverse
deb file:///media/disk/mirror-hardy hardy-updates main restricted universe multiverse

selesai...
selamat mencoba..
Untuk versi ubuntu karmic atau lain.. ubah saja text berwarna hijau,.. (semoga membantu)
Dalam tutor beikutnya saya akan menjelaskan mengenai cara penggunaan repo melalui dvd..
**Jika Anda masih bingung hanya tinggalkan komentar dan saya akan mencoba menjelaskan lebih

SAMBA - Windows Linux file Sharing Notes

Some basic notes on using SAMBA on a home network with linux and windows machines, like my home network setup.

Running SAMBA on a Linux machine

To start, stop or restart samba,

/etc/init.d/smd start
/etc/init.d/smd stop
/etc/init.d/smd restart

All options for the SAMBA goes to /etc/samba/smb.conf This is my smb.conf

Notable changes I made are:

My linux machine is a gateway server with two ethernet interfaces eth0 and eth1. For security reasons I set up SAMBA to run only on the internal interface

interfaces = 192.168.0.1/24 127.0.0.1/24
bind interfaces only = Yes

Also set hosts allow to only allow internal and localhoist

hosts allow = 127. 192.168.0.
hosts deny = *

SAMBA authentification

For the file access permissions for the shares to work, you have to set up the SAMBA username/password by running smbpasswd program on the linux box.

Then on the Windows machine login with the username/password created above with smbpasswd. Otherwise the file sharing will not work.

SAMBA Linux to Windows Sharing

Set up the shares in /etc/samba/smb.conf as follows

[musak]
comment = music from linux boxen
path = /var/stuff/media/musak
read only = Yes

On the windows machine access it as \\192.168.0.1\musak where 192.168.0.1 is the IP address of the linux machine.

If you want to share CD/DVD drive

[dvd]
comment = dvd drive on linux boxen
writable = No
locking = No
path = /mnt/cdrom2

SAMBA Windows to Linux Sharing

First turn on file sharing. Go to Start->Setting->Control Panel and open "Network" and in the first tab called "Configuration" click on "File and Pring Sharing..." and om the Dialog Box that comes up check "I want to be able to give others access to my files"

Now go to the file explorer and right click on the folder you want to sgare, and from the menu that pops up slect "Sharing..." and from the "Manual Properties" Dialog Box that comes up select the second tab "Sharing" and select "Shared as" which will enable all the text boxes, fill in the "Share Name" "Comments" and selct "Read Only" "Full" or "Depends on Password" and enter a password. This is the password that will give access to this share. Also note the "Share Name", lets name it "MYSHARE".

Also find out the hostname of the Windows machine. Go to Start->Setting->Control Panel and Open "Network" and in the second tab "Identification" note the "Computer Name", This is the name to use from Linux to access shares on this machine. Let it be "MYWINBOX"

Now go to the Linux machine. Crete mount point for the share.

mkdir /mnt/winstuff
Mount the share named "MYSHARE" on Windows hos namedt "MYWINBOX"
smbmount \\MYWINBOX\MYSHARE /mnt/winstuff
This will prompt you for the password for the share, enter the password and after that if you go to /mnt/winstuff you can access all files on the Windows folder.

Jumat, 11 Maret 2011

Harga Jasa Pembuatan Website

Harga Jasa Pembuatan Website berdasarkan kapasitas hosting dan nama domain

"Perpanjangan tahunan" dibayar setelah setahun"

Fitur Website

Web 1

Web 2

Web 3

kapasitas Hosting/Bandwith

20mb / 2Gb

60mb / 4gb

100mb / 8gb

Email

50 email (7gb)

50 email (7gb)

50 email (7gb)

Domain co.cc

Rp.200.000

Rp.230.000

Rp.280.000

Domain com, net, biz dll

Rp.250.000

Rp.280.000

Rp.320.000

Perpanjangan web akhiran com, net, biz, dll

Rp.160.000

Rp.190.000

Rp.210.000

(dibayar setelah setahun)