Calendar

September 2010
S M T W T F S
« Jul    
 1234
567891011
12131415161718
19202122232425
2627282930  

Web proxy in freeBSD with Squid

หาที่อยู่ Ports ก่อนครับ
>whereis squid
/usr/ports/www/squid
เข้าไปที่ Ports เพื่อติดตั้ง
>cd /usr/ports/www/squid
>make all
>make install
แก้ไข config ของ squid
> vi /usr/local/etc/squid/squid.conf
หาบรรทัดต่าง ๆ ต่อไปนี้

OpenSSH Security with Fake banner in FreeBSD

โดยปกติแล้วเจ้าเซอเวอร์ของเรามันจะโชว์เวอร์ชันของ ssh โดยจะบอกทั้งเวอร์ชั่น ระบบปฏิบัติการ ทำให้เป็นเป้าหมายของเหล่า hacker สามารถค้นหาและสามารถเล่นงานได้โดยง่าย
การทำ fake banner เป็นการเปลี่ยนรายละเอียนของโปรแกรมหรือเซอร์วิส เพื่อให้แสดงข้อมูลอย่างที่เราต้องการ ในตัวอย่างนี้ผมจะทำการเปลี่ยน banner ของ service OpenSSH ที่ลงในระบบปฏิบัตการ FreeBSD
โดยค่าปกติของ SSH Banner เป็นค่า SSH-2.0-OpenSSH_4.5p1
โดยเราจะเปลี่ยนให้เป็นค่า SSH-2.0-JiramotService
โดยทำการเข้าไปแก้ไฟล์ซอร์ส versioh.h ของ OpenSSH โดยใน FreeBSD จะอยู่ที่
/usr/scr/crypto/openssh/
จากนั้นแก้ให้เป็น
#define SSH_VERSION (ssh_version_get())
#define SSH_RELEASE [...]

Apache Security with Fake Banner

เพื่อเป็นการป้องการกันโจมที apache server โดยการทำ Fake banner ของ apache service
/etc/httpd/conf/httpd.conf            ; redhat distro
ServerTokens Full,OS,Minor,Minimal,Major,Prod
ServerTokens Setting
ProductOnly Server: Apache
Major Server: Apache/2
Minor Server: Apache/2.0
Minimal Server: Apache/2.0.55
OS Server: Apache/2.0.55 (Debian)
Full (or not specified) default Server: Apache/2.0.55 (Debian) PHP/5.1.2-1+b1 mod_ssl/2.0.55 OpenSSL/0.9.8b
ถ้าจะแก้ไข header :  กรณีที่ต้องการเปลี่ยน banner ไปเลย

/usr/include/httpd/httpd.h            ; apache v.1
/usr/include/httpd/ap_release.h    ; apache v.2
44 #define AP_SERVER_BASEPRODUCT “Apache”
45
46 #define AP_SERVER_MAJORVERSION_NUMBER 2
47 #define AP_SERVER_MINORVERSION_NUMBER 2
48 [...]

Monitor server with munin

Monitoring FreeBSD with Munin
Munin is a monitoring tool available in the FreeBSD ports. It tracks the vital signs of your servers and charts everything on graphs by day, week, month and year. It makes it easy to see when your server gets spikes of traffic and how well it handles them. It can also show [...]

Compile Glassfish on FreeBSD (JDK 1.5)

1) Install and add all those require and avaliable utilities software tools.
i) For installation of JDK:
Since Sun does not have official JDK 1.5 on FreeBSD platform. Therefore, we either have to build our own jdk from the source(note 1), or with the help from FreeBSD’s java user group, there is a port version of jdk [...]