Skip to main content

Posts

Showing posts from March, 2010

Windows 2003 - Failed to copy, folder or file name is too long

Although this blog is about FreeBSD, but at my office we still maintain 2 server that installed with Windows Server 2003 which I believe it is outdated for now.. but the management still want to use it.. Couple years back, so of the staff created an index file, something like this : 1.0 data1 2.0 data2/2.1 data2_1/2.1.1 Data2 time date.xls This is a big problem when you tried to copied the entire folder to other folder (external hard disk). So I googling around the net and found this useful tools that can do the copied job using the command line Windows Server 2003 Resource Kit Tools   so what we can do to solve this problem is to open your cmd, and check if ROBOCOPY is installed in your batch. C:/ROBOCOPY /? Copy tools : C:/ROBOCOPY [SOURCE] [DESTINATION] Example : C:/ROBOCOPY "H:/YOUR FILE" "I:/YOUR 2ND FOLDER" /S Note : /S is to create subfolder  Yatttaaa~

FreeBSD - Custom Kernel

Our previous FreeBSD installation may lack of options like ALTQ for PF (Packet Filter) . So we have to compile our kernel to a new kernel with some option enable. Prepare yourself.. • Make sure you are on i386 architecture machine • Copy the original GENERIC kernel to a new one. • Bare in mind, you are not allowed to make any changes to the original kernel. Since we will use that for our 'work in hand' kernel if anything goes wrong. shell>cd /usr/src/sys/i386/conf shell>cp GENERIC MYKERNEL • Edit MYKERNEL using your prefered editor. Mine prefer nano :) shell>nano MYKERNEL • For this tutorial we will enable ALTQ for PF #options for pf (packet filter) ALTQ options ALTQ options ALTQ_CBQ options ALTQ_RED options ALTQ_RIO options ALTQ_HFSC options ALTQ_PRIQ options ALTQ_NOPCC #pf (packet filter) device pf device pflog device pfsync • Save and let's build them

BSDMag - Online Issue

New issue already out to download .

FreeBSD - SSHGuard

http://www.sshguard.net/ SSHGuard adalah salah satu tools yang ada di ports untuk melindungi ssh servis anda dari diserang secara bruteforce. Ia menggunakan sistem log dari syslog untuk mengesan IP yang gagal untuk login ke server. - Install dari ports proxy# /usr/ports/security/sshguard-pf proxy# make install clean - Konfigurasi PF shell> nano /etc/pf.conf #di bahagian table table " " persist #sila buang "", <> tak boleh :P #bahagian block rules block in quick on $ext_if proto tcp from to any port 22 label "ssh bruteforce" - Aktifkan rules pf yang baru shell> pfctl -ef /etc/pf.conf - Edit /etc/syslog.conf uncomment line yang berkenaan sshguard proxy# nano /etc/syslog.conf GNU nano 2.0.9 File: /etc/syslog.conf # $FreeBSD: src/etc/syslog.conf,v 1.28.20.1 2009/04/15 03:14:26 kensmith Exp $ # # Spaces ARE valid field separators in this file. However,

FreeBSD - DHCP Server

DHCP - adalah singkatan kepada "Dynamic Host Configuration Protocol". Servis ini adalah untuk memberikan IP kepada client di network kita. Dengan adanya servis DHCP ini, kita tidak perlulah menggunakan cara manual untuk menetapkan IP di setiap komputer yang terdapat di network kita. Bahan : - isc-dhcp30-server - Editor (nano,vi,vim,ee) - Secawan kopi Cara-Cara : - Install servis dhcp server seperti dibawah : shell> cd /usr/ports/net/isc-dhcp30-server shell> make config (disable chroot) shell> make install clean - Contoh file konfigurasi dhcpd.conf shell> ee /usr/local/etc/dhcpd.conf # dhcpd.conf # # Sample configuration file for ISC dhcpd # # option definitions common to all supported networks... # set kan domain,DNS server option domain-name "gateway.domain.local"; option domain-name-servers 192.168.2.1; option subnet-mask 255.255.255.0; default-lease-time 600; max-lease-time 7200; # If this DHCP server is

FAMPP - Installing PhpMyAdmin

Now we have already install apache,mysql and also PHP in our box.. so what next? I myself feel hard to manage my database using CLI :P and the solutions is using PhpMyAdmin lets begin.. as root #cd /usr/ports/databases/phpmy admin #make config #make install clean Once done the compiling session it will install to /usr/local/www/PhpMyAdmin next we have to configure the config.inc.php to make phpmyadmin can talk with mysql #cd /usr/local/www/phpmyadmin #cp config.sample.inc.php config.inc.php Now we will edit the file #ee config.inc.php /* set your secret password */ $cfg['blowfish_secret'] = 'password'; /* uncomment the following line and put your mysql login */ $cfg['Servers'][$i]['controluser'] = 'root'; $cfg['Servers'][$i]['controlpass'] = 'password'; Save! Then we have to configure httpd.conf to treat phpmyadmin as one of the aliases #ee /usr/local/etc/apache22/httpd.conf

FAMPP - Installing PHP 5

this time we will build from source and compile :) #cd /usr/ports/lang/php5 #make config *choose apache module *choose mysql module and others that suite for you #make install clean Now we will install other common module for web server such as : mysql database #cd /usr/ports/databases/php5- mysql #make install clean once done a message will appear : The following line has been added to your /usr/local/etc/php/extensions.ini configuration file to automatically load the installed extension: extension=mysql.so This will enable PHP to interact with mysql database Session #cd /usr/ports/www/php5-session #make install clean once done a message will appear : The following line has been added to your /usr/local/etc/php/extensions.ini configuration file to automatically load the installed extension: extension=session.so Graphic library #cd /usr/ports/graphics/php5-gd Once done a message will appear : The following line has been added to

FAMPP - Installing MySQL Server

simpler command :) #pkg_add -r mysql51-server from this command it will install mysql server and also mysql client for the server once done we can enable it on boot up by editing rc.conf #ee /etc/rc.conf add this following line mysql_enable="YES" After that we can start the service by this command : #sh /usr/local/etc/rc.d/mysql- server.sh start Then we have to configure our root login for mysql which is by default it is blank. By using a password for the root login it will be more safe to outsider :) #mysql -u root #SET PASSWORD FOR 'root'@'localhost' = PASSWORD('urpasswordhere'); once done try to login using root user #mysql -u root -p Enter password: If that appear then you have successfully configuring your mysql server :)

FAMPP - FreeBSD, Apache, MySQL, PHP, PhpMyAdmin

FAMPP adalah idea daripada (FreeBSD,Apache,MySQL,PHP,PhpMyAdmin) , Tutorial ini akan membangunkan basic web server bersama-sama FreeBSD 7.2 FreeBSD 7.2 : Install Apache2.2 Ada dua cara untuk install aplikasi di FreeBSD - ports - pre-compiled pakej kali ini kita akan gunakan cara yang mudah iaitu menggunakan pre-compiled pakej #pkg_add -r apache22 edit /etc/rc.conf to start apache at boot apache22_enable="YES" Reboot and try to start. #apachectl -k start if got error something like this : Syntax error on line 151 of /usr/local/etc/apache22/ht tpd.conf: DocumentRoot must be a directory Edit your httpd.conf and make sure your folder "data" is created in /usr/local/www/apache22/ Try to start again, #apachectl -k start if got warning something like this : [Mon Jan 01 08:31:17 2007] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter It is because some module are not loaded for filtering the pack

Radix Fried Chicken

 (Credit to www.radixfriedchicken.com.my) Hari ini setelah mengidam nak makan RFC (Radix Fried Chicken) di MyDin MITC Melaka, akhirnya tercapai jua bersama tunang :). Walaupun berkunjung pada waktu selepas kerja namun masih dapat menikmati kesedapan RFC ni. Pada sapa yang tak tahu apa tu RFC, RFC ialah singkatan daripada ayat Radix Fried Chicken. Ia adalah salah satu produk keluaran HPA . Menu yang diorder ialah - Spicy burger - Radix Delight A Yang nak usha harga sebelum beli tu boleh tengok di web rasmi RFC Komen : - 1st entry dalam market fast food boleh dikatakan berjaya. - Harga yang tidak terlalu mahal. - Menu yang pelbagai, terutama ada pilihan untuk kanak2 (ala2 McD dan KFC) - Pekerja yang sopan, dan mesra pelanggan. - 4 bintang untuk RFC!!

Modul OpenOffice Bahasa Melayu

Hari ini salah sorang rakan aku encik Psychox telah menyiapkan modul ringkas untuk aplikasi OpenOffice. Pada sapa yang tak tahu pasal OpenOffice ni boleh rujuk sini  . Dengan kata mudah OpenOffice (OOo) adalah mirip kepada aplikasi M$ Office yang biasa kita guna. Cuma bezanya aplikasi OOo ni adalah percuma dan opensource. Yang paling penting OOo versi 3 adalah compatible kalau kita ingin buka file dari format XP,2003,2007 dan seangkatan dengannya. Tak perlu install compatibility pack :) Boleh download modul OOo di sini

FreeBSD 7.2-RELEASE EOF

I just 'freebsd-update' on one of my firewall, and got this message FreeBSD 7.2-RELEASE-p4 is approaching its End-of-Life date. It is strongly recommended that you upgrade to a newer release within the next 2 month  and as per security.freebsd.org The new 7.3-RELEASE is still on RC-ing and when the release come out, for a better system we should upgrade to the new one :)

FreeBSD stability

Recently I just configured our office PC which is Pentium III with 667Mhz speed. Can it be install with Windows XP or Windows 7 maybe ? :) I installed with a FreeBSD 7.2 and updated to 7.2-p6 to become one of our greatest firewall (hope so) and running for about : $ uname -a;uptime;date FreeBSD firewall.sm.local 7.2-RELEASE-p6 FreeBSD 7.2-RELEASE-p6 #2: Tue Jan 26 08:46:49 MYT 2010     root@firewall.sm.local:/usr/obj/usr/src/sys/SMKERNEL  i386  2:58AM  up 33 days, 16:26, 1 user, load averages: 0.00, 0.00, 0.00 Fri Mar  5 02:58:02 MYT 2010 without any failure and need to be restart. For now the box act as our firewall and also our NAT for about 50 people in our office. Before this we are using Dir-300 which i don't it can perform well and customized with what I need to protect my network. my future needs is to install Ntop for network monitoring..