Securing Trixbox

By , November 28, 2009 12:10 AM

How to Secure Trixbox with fail2ban

For usiness purposes Fail2Ban is an excellent solution for protecting at the SIP application layer.

It is worth reading how to set up Fail2Ban for Trixbox

http://www.voip-info.org/wiki/view/Fail2Ban+%28with+iptables%29+And+Asterisk

wget http://downloads.sourceforge.net/project/fail2ban/fail2ban-stable/fail2ban-0.8.4/fail2ban-0.8.4.tar.bz2 -jxf fail2ban*


How to Secure Trixbox by changing passwords

1)FOP, Default password is again : passw0rd

2) mysql default passwords is “passw0rd”

3) FreePBX web interface has the default user: maint with password ” password”

4) Trixbox main web Interface, access is wide open, meaning that anyone who knows your PBX IP address or sub domain, can access it. a) VoIP installers

Changing your default CentOS Password

passwd

You will be asked to enter your old password and to type in your new password twice.

Changing your default FreePBX Password

The default login and password for a newly installed FreePBX (formerly known as AMP) is:

Username: maint
Password: password

To change the default password at the CentOS command prompt type the following command.

passwd-maint

Changing your default FOP Password

edit /etc/amportal.conf

find FOPPASSWORD=passw0rd and change it for something reasonable

amportal restart

Changing your default MeetMe Password

passwd-meetme

It will ask you for your new password twice.

Changing your default System Mail Password

passwd admin

Changing your default MySQL Password

Edit /etc/amportal.conf and change AMPDBUSER=asteriskuser and AMPDBPASS=yourpassword.
Careful, the values at the top of that file are actually commented out (which is idiotic), the real values are at the very bottom of the file.

Edit /etc/asterisk/cdr_mysql.conf and change USER= asteriskuser and PASSWORD=yourpassword.

Edit /etc/astersik/ cbmysql.conf and change DBUSER= asteriskuser and DBPASS=yourpassword.

Lastly, login to the commandline on your TrixBox terminal as root and execute these commands:
amportal stop
mysqladmin -u
asteriskuser -p password yourpassword
[then enter your current password for root to confirm the change]
service mysqld restart
amportal start

mysql -u root -p
passw0rd

SET PASSWORD FOR asteriskuser@localhost=PASSWORD(‘newpass‘);

amp111

SUMMARY

DO NOT CHANGE DEFUALT PASSWORDS APART FROM MAINT AND FOP

IT IS JUST TOO HARD TO GET THE WHOLE TRIXBOX WORKING AGAIN!!!!!

PEOPLE WHO MADE TRIXBOX BIT SLOPPY IN THE PASSWORD SECURITY FRONT
WOULD NOT BE THAT HARD TO WRITE A SCRIPT THAT CHANGED ALL THE PASSWORDS
AND RELEVANT FILES

ReadyNAS NV+ Windows 7 wifi problems

By , November 21, 2009 1:58 PM

ReadyNAS NV+ Windows 7 wifi problems

Performance using wire connection from Win7 to nas around 14000kb/s
Performance using ftp wireless connection from Win7 to nas around 2000kb/s
Performance using wireless connection from Win7 to nas around 12kb/s
Performance using wireless connection from Win7 to WinXp share on other pc 2000kb/s

FIX ReadyNAS NV+ Windows 7 wifi problems
I finally fixed things by changing the MTU size to 1430 and turing of TCP Autotuning.

start, run, cmd
netsh interface ipv4 show subinterfaces
you will see default windows setting of 1500 on both the wireless and ethernet network cards
Need to set MTU of 1430 for best performance
ipconfig /all 
gives more info
note of the exact names of the network devices
netsh interface ipv4 set subinterface “Wireless Network Connection” mtu=1430 store=persistent

All DONE

Very Minimal CentOS Installation

By , November 15, 2009 11:47 PM

Very Minimal CentOS Installation – we use CENTos for our Moon Rover

Any attempt to install CentOS using text-mode or kick-start will result into 340+ packages and lots of useless services. The only way you can achieve a true minimal CentOS is through a manual install process and using graphics mode.

Please seek more guidance from this manual for topics not covered here.

Checkpoint 1: Start graphics installation by hitting enter on boot prompt.

Checkpoint 2: Pick Customize now during package group selection.

Checkpoint 3: De-select everything (Yes, I repeat it! Deselect everything including base).

If you follow the suggested process, you will get a True Minimal CentOS installation with only 148 packages installed (and very few system services).

OTHER VERSION

For my version of the minimal install I:

1. Boot to CD 1
2. Type in “linux text” to get the text installation setup
3. Proceed normally with the installation until it asks which packages to install
4. I deselect all of the packages and then click on the “customize package selection” check box
5. I then hold down the “-” key, which scrolls through all of the package options, and deselects them all for me
6. I finish the install and I am done

7. Then I do a “yum update” to get latest
8. Then I do a “yum install <package>” for what ever packages I need but didn’t get during installation.

All of this with only CentOS 5 CD 1.

OR ANOTHER

You can do a minimal install that just requires the first CD by performing the following two steps during the installation:

  • During the category/task selection, deselect all package categories, and choose the “Customize now” option at the bottom of screen.
  • During the customized package selection, deselect everything.

<!> There are reports that more than CD 1 is required in the following case:

  • If you use some software raid options (this will also require CD 2 and 5)
  • If you use encrypted filesystems

When the anaconda installer notes that additional disks will be required, but you desire a one CD install, the quick answer is one or more of the following approaches:

  • Trim back and do a minimal install. Then once the install is up and running, pull in more packages with yum, and add more options later.
  • Use the method: linux text ( Note: you cant do a minimal install using the Text mode, you *must* use the GUI mode if you are looking to install the minimal package set)

If you want to avoid using more than one CD, but want to install more than just the minimal set of packages, you could also consider doing a network installation. A network installation ISO (called boot.iso) is available from the 5/os/<arch>/images/ directory on CentOS mirrors.

CUSTOM DVD ISO OF CENTOS

http://lingxiang.tang.googlepages.com/createalesssizecentos5

http://www.centos.org/docs/5/html/Installation_Guide-en-US/ch-kickstart2.html

Copy Mysql Databases to another machine

By , November 12, 2009 10:56 PM

How to Backup MySql Databases to another machine.

Method 1 – Dump and reload

You can use mysqldump to create a simple backup of your database using the following syntax

a) Read Lock??????
b) Then dump all the databases by:

Single Databases
Dump only one database – Structure and Data
mysqldump -u [Username] -p [password] [databasename] > backupfile.sql

Dump only one database – Structure Only
mysqldump -u [Username] -p [password] –no-data [databasename] > structurebackup.sq   (remember to remove the []’s)

Multiple Databases
Dump only Select databases – Structure and Data
mysqldump -u [Username] -p [password] – -databases [databasename1] [databasename2] [databasename3] > multibackup.sql

Back up all the databases in the server- Structure and Data
mysqldump -u [Username] -p [password] – -all-databases> alldatabases.sql

Back up all the databases in the server- Structure Only
mysqldump -u [Username] -p [password] – -no-data –databases [databasename1] [databasename2] [databasename3]> allstructurebackup.sql

Ended up using

mysqldump – – all-databases > fulldb.dump

AND NOW only this shit works

mysqldump –all-databases -u root -p –all-databases>sqldumpp.sql

How to Restore your Mysql Database

Single Databases
mysql -u [Username] -p [password] [databasename] < databasefile.sql

Multiple Databases

Thomas Challenger Thomas Challenger