Tampilkan postingan dengan label howto. Tampilkan semua postingan
Tampilkan postingan dengan label howto. Tampilkan semua postingan

HOWTO Send Mail to GMail by Postfix on Ubuntu Server 10 10

Rabu, 19 Maret 2014

You cannot send any mail to GMail from you mail server, unless you set GMail server as your SMTP server.



Step 0 :



Install the Ubuntu Server 10.10 and select Mail Server when install.



Step 1 :



sudo nano /etc/postfix/transport



Append the following line.



*     smtp:[smtp.gmail.com]:587



Step 2 :



sudo nano /etc/postfix/sasl/sasl_passwd



Append the following line.



[smtp.gmail.com]:587     samiux@gmail.com:password



Step 3 :



sudo nano /etc/postfix/main.cf



Add or make the change of the following lines.



relayhost = [smtp.gmail.com]:587

smtp_sasl_auth_enable = yes

smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd

smtp_sasl_security_options = noanonymous

smtp_tls_CAfile = /etc/postfix/cacert.pem

smtp_use_tls = yes

mynetworks = 192.168.0.0/24 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128




Step 4 :



cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem



Step 5 :



sudo postmap /etc/postfix/transport

sudo postmap /etc/postfix/sasl/sasl_passwd




Step 6 :



sudo /etc/init.d/postfix restart



Thats all! See you.
Read More..

HOWTO nVidia CUDA 4 0 RC on Ubuntu 10 10 Server

Rabu, 12 Maret 2014

If you have nVidia display card that have several CUDAs on it, you will interested in this tutorial. This time, I would like to show you how to install CUDA 4.0 RC on Ubuntu 10.10 Server.



You will experience a faster server after the installation of CUDA 4.0.



This HOWTO does not require to install X.



Step 1 :



Add the CUDA 4.0 PPA.

sudo add-apt-repository ppa:aaron-haviland/cuda-4.0



Step 2 :



sudo apt-get update

sudo apt-get upgrade




64-bit :

sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler libnpp4 nvidia-cuda-doc nvidia-current-modaliases libcudart4 libcublas4 libcufft4 libcusparse4 libcurand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev nvidia-kernel-common opencl-headers



32-bit :

sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler lib32npp4 nvidia-cuda-doc nvidia-current-modaliases lib32cudart4 lib32cublas4 lib32cufft4 lib32cusparse4 lib32curand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev nvidia-kernel-common opencl-headers



Step 3 :



sudo nano /etc/init.d/nvidia_cuda



Append the following lines.



============= Copy from here ================

#!/bin/bash



PATH=/sbin:/bin:/usr/bin:$PATH



/sbin/modprobe nvidia



if [ "$?" -eq 0 ]; then



   # Count the number of NVIDIA controllers found.

   N3D=`/usr/bin/lspci | grep -i NVIDIA | grep "3D controller" | wc -l`

   NVGA=`/usr/bin/lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l`



   N=`expr $N3D + $NVGA - 1`

   for i in `seq 0 $N`; do

      /bin/mknod -m 666 /dev/nvidia$i c 195 $i;

   done



   /bin/mknod -m 666 /dev/nvidiactl c 195 255



else

   exit 1

fi




=========== Copy to here =================



Step 4 :



sudo chmod +x /etc/init.d/nvidia_cuda

sudo update-rc.d nvidia_cuda defaults



Step 5 :



Reboot your system.



Remarks



I do not have nVidia display cards server in hand at the moment, I am not sure the captioned startup script working properly or not.



Thats all! See you.
Read More..

HOWTO Encrypt Decrypt BackTrack 5 R2 with Passphrase

Rabu, 05 Maret 2014

Credit to : Infosec Ramblings and Hak5.org



Step 1 :



The hard drive partitioning is as the following :



/dev/sda1 for /boot

/dev/sda5 for /



Assume the hard drive is band new.



fdisk /dev/sda

n

p

1

+4G

n

e

2

n

l

p

w




* where +4G is set to 4GB for the /dev/sda1 as /boot. You can set it to +1024M or smaller.



Step 2 :



cryptsetup -y -c aes-xts-plain -s 512 luksFormat /dev/sda5

cryptsetup luksOpen /dev/sda5 haktop




* where haktop is the device label



Step 3 :



mkfs.ext2 /dev/sda1

mkfs.ext4 /dev/mapper/haktop




Step 4 :



Install BackTrack 5 R2 as is. However, select custom partitioning. Do not format the partitions. Select /dev/mapper/haktop as ext4 and / while select /dev/sda1 as ext2 and /boot.



Make sure the bootloader is installed at /dev/sda.



Step 5 :



Once the installation is completed, select "Continue testing" and do not reboot the system.



mkdir /mnt/haktop



mount /dev/mapper/haktop /mnt/haktop/

mount /dev/sda1 /mnt/haktop/boot



chroot /mnt/haktop/



mount -t proc proc /proc

mount -t sysfs sys /sys/




Step 6 :



Get the UUID of sda5 by opening another terminal :



blkid /dev/sda5



Copy down the UUID of the /dev/sda5.



nano /etc/crypttab



haktop /dev/disk/by-uuid/<UUID Key> none luks



Step 7 :



nano /usr/share/initramfs-tools/scripts/local-top/cryptroot



Locate the following :



# Try to get a satisfactory password $crypttries times

   count=0

   while [ $crypttries -le 0 ] || [ $count -lt $crypttries ]; do




Change to :



count=0

echo "Unlocking the disk $cryptsource ($crypttarget)"

while [ $crypttries -le 0 ] || [ $count -lt $crypttries ]; do




Locate the following :



if [ -z "$cryptkeyscript" ]; then

   cryptkey="Unlocking the disk $cryptsource ($crypttarget)
Enter passphrase: "

if [ -x /bin/plymouth ] && plymouth --ping; then




Change to :



if [ -z "$cryptkeyscript" ]; then

   cryptkey="Enter passphrase: "

if [ -x /bin/plymouth ] && plymouth --ping; then




Step 7a :



update-initramfs -u



fix-splash



Now, reboot the system. The bootup will halt at the wallpaper of BackTrack 5. Just press F8 and deleted the prompted "****" and then enter your passphrase to boot the system.



Or, you can just key in the passphrase when the bootup process is stopped at the wallpaper.



Step 8 : (Optional)



If you do not want to press F8, you can delete the "splash" from the following line.



nano /boot/grub/grub.cfg



Locate the following :



linux /vmliunx-3.2.6 root=/dev/mapper/haktop ro text splash vga=791



To make it look likes :



linux /vmliunx-3.2.6 root=/dev/mapper/haktop ro text vga=791



Then, you will be prompted for entering your passphrase on every boot up.



Step 9 :



After the system is boot up, it is required to create swap file.



dd if=/dev/zero of=/swapfile1 bs=1M count=8192



* Where count=8192 is 8GB



mkswap /swapfile1

chown root:root /swapfile1

chmod 0600 /swapfile1



swapon /swapfile1



nano /etc/fstab



/swapfile1 swap swap defaults 0 0




Then reboot the system.



See Also : HOWTO : Encrypt/Decrypt BackTrack 5 R2 with USB stick





Thats all! See you.
Read More..

HOWTO Linux Malware Detect on Ubuntu 12 04 LTS 64 bit

Selasa, 04 Maret 2014

What is Linux Malware Detect?



Linux Malware Detect (LMD) is a malware scanner for Linux released under the GNU GPLv2 license, that is designed around the threats faced in shared hosted environments. It uses threat data from network edge intrusion detection systems to extract malware that is actively being used in attacks and generates signatures for detection. In addition, threat data is also derived from user submissions with the LMD checkout feature and from malware community resources. The signatures that LMD uses are MD5 file hashes and HEX pattern matches, they are also easily exported to any number of detection tools such as ClamAV.



The driving force behind LMD is that there is currently limited availability of open source/restriction free tools for Linux systems that focus on malware detection and more important that get it right. Many of the AV products that perform malware detection on Linux have a very poor track record of detecting threats, especially those targeted at shared hosted environments.



The threat landscape in shared hosted environments is unique from that of the standard AV products detection suite in that they are detecting primarily OS level trojans, rootkits and traditional file-infecting viruses but missing the ever increasing variety of malware on the user account level which serves as an attack platform.



Shared Hosting Environments Only?



Although LMD is designed for Red Hat based system on shared hosting environments with Apache, it can run on Debian or Ubuntu server and desktop editions without any problem. Running Hiawatha is no problem too.



Installation



Step 1 :



sudo apt-get install libc6-i386



wget http://www.rfxn.com/downloads/maldetect-current.tar.gz

tar -xvzf maldetect-current.tar.gz

cd maldetect-*

sudo ./install.sh




Step 2 :



sudo maldet -d -u



Step 3 :



sudo nano /usr/local/maldetect/conf.maldet



change the value of the following variables :



email_alert=1

email_addr="samiux@samiux.com"


* change to your email address



quar_hits=1

maxfilesize="10240k"

string_length_scan="1"



clamav_scan=0


* if ClamAV is not installed.



clamav_scan=1

* if ClamAV is installed.



Step 4 :



sudo nano /etc/rc.local



Append one of the following lines in front of "exit 0" :



/usr/local/maldetect/maldet -m /tmp,/run/shm,/var

* if you are running server edition



/usr/local/maldetect/maldet -m /tmp,/run/shm,/home

* if you are running desktop edition



Step 5 :



sudo maldet -m /tmp,/run/shm,/var

* if you are running server edition



sudo maldet -m /tmp,/run/shm,/home

* if you are running desktop edition



Step 6 :



Make sure the LMD is running properly :



sudo ps aux | grep maldet

sudo ps aux | grep inotify




How it works?



The signature will be updated on daily basis. LMD is monitoring the directories that you entered at Step 4 or 5. Once the malware is detected, you will be informed by email if you set it at Step 3. The detected malware will be quarantine and deleted too.



If you are running Apache, you may consider to install mod_security and mod_evasive in order to enhance the security of the web server. If you installed them, you need to set "public_scan=1".



You may also consider to install ClamAV when it is necessary.



Remarks



Please note that any signature based scanner or defense can be bypassed.



Thats all. See you!



Read More..

HOWTO Ubuntu 9 10 on Gigabyte TouchNote T1028X

Minggu, 02 Maret 2014

Hardware configuration



Intel Atom N280 1.6GHz CPU

2GB DDR2 677HMz RAM

250GB 2.5" Hard Drive (Changed to Intel X25-M 80GB SSD)

10.1" Touch screen

PC Express card slot

3 x USB 2.0

All-in-one card reader

Carrying bag



This tablet netbook is in good desgin and quality. It is purchased on 2009-DEC-11 at $4,700-HK with USB mouse and screen protector as gifts. However, the screen protector is a little bit larger than the screen. I also added a Hauwei EM770 3.75G HSDPA modem and changed the hard drive to Intel X25-M 80GB SSD. The total cost is increased to $7,260-HK. Although the price is more or less reached the mid-range notebook level, it is worth to buy. By the way, it is a little bit heavy when holding it with one hand using touch screen feature.



Make sure to update your BIOS to "FC" version as it will activate the Wifi by default. The machine comes with "FB" version of BIOS.



The machine almost works perfectly on Ubuntu 9.10 including HSDPA modem but except touch screen feature. We need to do something to make it work.



Installation of Ubuntu 9.10



Make sure to press F6 on the startup menu and choose "expert mode" and followed by "Esc". Otherwise, your mouse will not work after the boot up.



Append the following line at the end of the command displayed on the screen.



elevator=noop i8042.noloop=1



Install Ubuntu 9.10 as usual. After the first boot up your mouse cannot work. Just follow the steps below to make it work again.



Press Ctrl+Alt+F2. At the command prompt, enter your username and password.



sudo nano /boot/grub/grub.cfg



Locate "linux" tag and append the following at the end of the line.



elevator=noop i8042.noloop=1



Save and reboot your system.



** Note : you need to add the line on every kernel updated.



Configure touch screen



sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade




sudo apt-get install xserver-xorg-input-evtouch gnome-randr-applet



sudo nano /etc/hal/fdi/policy/evtouch.fdi



Append the following lines.





<?xml version="1.0" encoding="UTF-8" ?>

<deviceinfo version="0.2">

<device>

<match key="info.product" contains="eGalax Inc. USB TouchController">

<merge key="input.x11_driver" type="string">evtouch</merge>

<merge key="input.x11_options.ReportingMode" type="string">Raw</merge>

<merge key="input.x11_options.Emulate3Buttons" type="string">false</merge>

<merge key="input.x11_options.Emulate3Timeout" type="string">1</merge>

<merge key="input.x11_options.SendCoreEvents" type="string">On</merge>

<merge key="input.x11_options.MinX" type="string">0</merge>

<merge key="input.x11_options.MinY" type="string">2</merge>

<merge key="input.x11_options.MaxX" type="string">4096</merge>

<merge key="input.x11_options.MaxY" type="string">4096</merge>

</match>

</device>

</deviceinfo>





Reboot your system.



After booting up, go to "System" - "Administration" - "Calibrate Screen" and follow the instruction on screen to calibrate the screen.



Screen Rotation



You can rotate your screen on demand by Gnome Randr Applet. However, it cannot rotate your screen automatically.



Make Firefox work better



Install "Grab and Drag" add-on.



"Grab and Drag" add-on demo on Youtube.



Thats all. See you!
Read More..

HOWTO nVidia CUDA Toolkit 4 0 on Ubuntu 11 04 Desktop

Sabtu, 01 Maret 2014

The CUDA Toolkit 4.0 is released on May 2011. If you have nVidia display card that have several CUDAs on it, you will interested in this tutorial. This time, I would like to show you how to install CUDA Toolkit 4.0 on Ubuntu 11.04 Desktop.



You will experience a more faster desktop after the installation of CUDA Toolkit 4.0. Meanwhile, if you installed SMPlayer, you can playback 1080p videos with the help of vdpau.



Step 1 :



Add the CUDA 4.0 PPA.

sudo add-apt-repository ppa:aaron-haviland/cuda-4.0



Thanks for the developer of CUDA 4.0 PPA - Aaron Haviland of his contribution to make CUDA Toolkit to be installed easily.



Step 2 :



sudo apt-get update

sudo apt-get upgrade




64-bit :

sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler libnpp4 nvidia-cuda-doc libcudart4 libcublas4 libcufft4 libcusparse4 libcurand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers



32-bit :

sudo apt-get install nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-compute-profiler lib32npp4 nvidia-cuda-doc lib32cudart4 lib32cublas4 lib32cufft4 lib32cusparse4 lib32curand4 nvidia-current nvidia-opencl-dev nvidia-current-dev nvidia-cuda-dev opencl-headers



Step 2a (Optional) :



If you do not have any nVidia driver installed before or you encounter any problem of booting up your system, you need to do the following command. Otherwise, this step is not required at all.



sudo nvidia-xconfig



**This step may not be required.



Step 3 :



Reboot your system.



Step 4 (Optional) :



To install SMPlayer.



sudo apt-get install smplayer smplayer-translations smplayer-themes



Then set it to use "vdpau" at "Output Driver" at "Preference".



Step 5 (Optional) :



Once installed the CUDA Toolkit and nVidia drivers, you can download the sample codes for testing.



sudo apt-get install freeglut3-dev libxi-dev libXmu-dev



wget http://developer.download.nvidia.com/compute/cuda/4_0/sdk/gpucomputingsdk_4.0.17_linux.run



sudo chmod +x gpucomputingsdk_4.0.17_linux.run

./gpucomputingsdk_4.0.17_linux.run




Accept the default settings.



cd NVIDIA_GPU_computing_SDK/C

make




** Please ignore the warning messages for unsupported gcc version. That is no harm at all.



Run the sample codes.



cd NVIDIA_GPU_computing_SDK/C/bin/linux/release

./deviceQuery

./nbody




Thats all! See you.
Read More..