Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

Tuesday, July 29, 2014

HOWTO Streaming music from Ubuntu 10 04 to Android smartphone

Streaming mp3 or ogg audio files from Ubuntu desktop or server to Android is very easy. It just requires several steps to make it work.



You can share your music to other computers or Android devices via intranet or internet no matter the musics are sharing from Desktop or Server.



(I) Prerequisite



(a) Hardware

(1) One computer or server which is installed Ubuntu Desktop or Server 10.04

(2) One Google Nexus One or any Android smartphone 1.5 or higher

(3) Internet connection equipments (if any), such as router



(b) Software

(1) Install DAAP Media Player from the Android Market on your Android smartphone



(II) Server Side



Step 1 :



Install the Firefly on your Desktop or Server.



sudo apt-get update

sudo apt-get upgrade

sudo apt-get install mt-daapd




Step 2 :



Follows the instructions below and then copy or upload the audio files to the below mentioned directory.



sudo mkdir /home/media

sudo mkdir /home/media/music




Step 2a :



After copied or uploaded the songs to the directory, execute the following commands.



sudo chmod -R 755 /home/media/music



*Whenever you copied or uploaded new songs to the directory, make sure you carry out Step 2a. Meanwhile, to conduct "Start Full Scan" at Firefly web page to read the new songs into the database/playlist.



Step 3 :



Open a browser (such as Firefox) and point to the address of the server that installed mt-daapd :



Desktop -

http://localhost:3689



or



Server -

http://server_ip:3689



e.g. http://192.168.1.100:3689



Login with the username "admin" and password "mt-daapd".



Go to "configuration" and click "show advanced config".



Go to "Transcoding" section. Add the media extension to "Never Transcode" at the bottom of the page and then save.



For example, .ogg, .mp3



Step 4 (Optional) :



Go to "Server" section. Change the password of "Admin password" or add "Music password" if you want to have to enter password before listening to the music.



Changes "Compress" to "Yes".



Then save it.



Step 5 :



Go to "Server status" and click "Start Full Scan" button and you will see the figure of "Songs" is updated. Make sure you have uploaded or copied the mp3 or ogg files to the directory that mentioned above.



(III) Client Side



If you installed mt-daapd on the desktop computer, open Rhythmbox (or Banshee) and you will see the Firefly at the "Share" section. You can play the music now. You can also play the music within the same network on other computers.



If you installed mt-daapd on the server computer, open Rhythmbox (or Banshee) on the any desktop computers within the same network and play the music as mentioned above.



For Android, make sure you have installed DAAP Media Player from the Market. Open the application, you will connect to the mt-daapd server if you are connected via wifi.



Press "Menu" and select "Preference" to enable "SD Card as Cache" and "Streaming music".



You can select any music to play and press "Menu" to choose from "Stop", "Repeat" and "Shuffle".



(IV) Router



You may required to forword the port 3689 on your router if you want to stream your music via internet.



Enjoy your music on the road!



Thats all! See you.
Read More..

Friday, May 23, 2014

HOWTO Third Party Modules for Drupal 6

The following list is my currently using third party modules of Drupal 6.2. I would like to share with you all.



Download the following modules with the following url and put them at sites/all/modules/contribute/.



http://www.drupal.org/project/????



Where ???? is the following titles



e.g. http://www.drupal.org/project/acl





acl



# The following are for Google Adsense

adsense

adsense_injector



advanced_forum

advanced_forum_more_styles

advanced_help

advuser

author_pane

backup_migrate

bookmark_us

browscap

cck

composite

content_access

ctools

date

db_maintenance

emfield

fb

fckeditor

filefield

formblock

getid3

google_analytics

htmlmail

i18n

imageapi

imagecache

imagefield

jquery_ui

lang_dropdown

languageicons

lightbox2

login_security

media_youtube

mimemail

mobile_tools

mollom

mp3player



# The following are for online shop

nap

node_access_rebuild_bonus



options_element

panels

pathauto

phone

phpmailer

print

private

privatemsg

rules

security_review

select_or_other

signup

simpletest

sina_open

sitedoc

skinr

tablefield

theme_editor

token



# The following are for online shop

ubercart

uberpos

uc_addresses

uc_alipay

uc_coupon

uc_node_access

uc_node_checkout

uc_product_triggers

uc_views



user_delete

user_register_notify

views

views_bulk_operations

webform

webform_validation

wurfl



# The following are themes for mobile_tools

fusion

fusion_mobile





By the way, if you want to tune the Drupal 6, MySQL and PHP5 as well as Hiawatha, please refer to Performance tuning and Installation of Hiawatha and Drupal.



Thats all! See you.
Read More..

Sunday, May 18, 2014

HOWTO SmoothSec 3 2 beta as Intrusion Detection System IDS

I am going to tell you how to build an affortable Intrusion Detection System (IDS) at home or SOHO or small business. For building an Intrusion Prevention System (IPS), I will write another article about it later.



Hardware



Motherboard - Intel Desktop Board D510MO

RAM - 4GB DDR2 (2 x 2GB)

Hard Drive - 320GB

Network Card 0 - Onboard Gigabit

Network Card 1 - TP-Link TG-3269 Gigabit PCI Network Adapter (with low profile)

Network Card 2 - D-Link DUB-E100 USB 2.0 Fast Ethernet Adapter (up to 200MB)



Software



Operating System - SmoothSec 3.2 beta (64-bit). The beta version is no longer exist. Please go to official site for the Version 3.2. The beta and official version are same. The official site is at here.



Setup



Internet -- Router -- SmoothSec -- Switch -- Personal Computers



Network Card 0 and 1 will be bridged up while Network Card 2 will be a management interface.



Step 1 :



First of all, SmoothSec (Network Card 2) is connected to the Switch while Network Card 0 and 1 do not connect to the router. It is because you need to connect to the internet for the installation.



Step 2 :



Install SmoothSec as usual. When you prompt for install non-free network interface firmware, just ignore it. After installed, the box will be reboot.



Login as "root" with password "toor".



Step 3 (Bug Fix):



Suricata



nano /etc/suricata/suricata.yaml



Locate "- fast:" and change "enabled: no" to "enabled: yes".



Locate "- drop:" and change "enabled: no" to "enabled: yes".



Locate "HOME_NET: [192.168.1.0/24]" and change to "HOME_NET: [192.168.0.0/24]".



*or your network subnet.



Time Zone for Snorby



If your time zone is not UTC, you should run the following command :



dpkg-reconfigure tzdata



Set the time zone for "UTC" at "None of the above"; otherwise, the Snorby will reported wrong timestamp.



nano /var/www/snorby/config/snorby_config.yml



Make sure "production:" and "timezone_search: false".



Make sure "time_zone: UTC" is commented.



Set your time zone at the Snorby web interface when it is available after Step 5.



Email feature of Snorby



apt-get install postfix libxrender-dev libfontconfig1



Configure the Postfix properly according to your network at "/etc/postfix/main.cf".



nano /var/www/snorby/config/initializers/mail_config.rb



Uncomment the lines just below "# Sendmail Example:".



Step 4 :



Connect Network Card 0 to router and Network Card 1 to Switch.



Normally, Network Card 0 will be eth0, Network Card 1 will be eth1 and Network Card 2 will be eth2.



nano /etc/network/interfaces



Comment all about eth2 entries.



Append the following :



auto eth2

iface eth2 inet static

   address 192.168.0.120

   netmask 255.255.255.0

   gateway 192.168.0.1




* where the "address" is your SmoothSec IP address and "gateway" is the IP address of your router.



nano /etc/init.d/bridge



Change "net1=eth1" to "net1=eth0"

Change "net2=eth2" to "net2=eth1"

Change "brctl addif $br eth1" to "brctl addif $br eth0"

Change "brctl addif $br eth2" to "brctl addif $br eth1"



update-rc.d bridge defaults



Step 5:



Run the script "smoothsec.first.setup" in the terminal.



Type "br0" when asking for monitor network interface.



Select "Snort" or "Suricata" as IDS Engine. I choose "Suricata".



Then reboot.



Once boot up, go to one of the Personal Computers and browse "https://192.168.0.120". Then set the time zone and your report email address accordingly.



Step 6:



To update SmoothSec, you need to do the following commands (you can make a script to do so). The rules will be updated automatically in the early morning every day.



apt-get update

apt-get dist-upgrade

apt-get --purge autoclean

apt-get --purge autoremove

# update SmoothSec

cd /root/updates/

git pull origin master

# update Snorby

cd /var/www/snorby

git pull origin master

rake snorby:update

cd ~

# update pigsty

npm update -g pigsty

npm update -g pigsty-mysql

# update Suricata rules

smoothsec.suricata.rules.update



Known Issue



Nil.



You should remember that your box is in UTC time zone.



Debug the mailing feature



Do not run the following commands unless you really need to.



cd /var/www/snorby



bundle exec rails c production

Snorby::Jobs::SensorCacheJob.new(true).perform

Snorby::Jobs::DailyCacheJob.new(true).perform
(This command is invalid for Snorby version 2.6.2)



Reference



Snorby GitHub

Suricata

SmoothSec

Pigsty

SmoothSec WiKi - for installation



Thats all! See you.



Read More..