Monday, September 6, 2010

Asterisk 1.6 Compilation and Installation on Debian 5 (lenny)

This guide refers to Asterisk version 1.6.0.6 but has been tested as well on older 1.6.x versions,
tested on the GNU/Linux Debian Lenny 5.0 release 1 distribution, installed from the “netinst” cd image version, available, for example, here
This guide shows how to install Debian 5.
Index
• Satisfying Asterisk dependencies
• Downloading and extracting Asterisk
• Pre-building configuration
• Building
• Installation
• Installing sample configuration files
• Init scripts for getting Asterisk to start at boot
• First execution of Asterisk
• Reboot and verify
Satisfying Asterisk dependencies
In order to successfully build Asterisk, the following dependencies need to be satisfied:
• gcc
• g++
• make
• libncurses5-dev
On Debian “Lenny“, running the following command, as root, will suffice:
apt-get install gcc g++ make libncurses5-dev
The other dependencies will be resolved automatically
Downloading and extracting Asterisk
• Download Asterisk asterisk-1.4.24.tar.gz using wget:
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.24.tar.gz
• Extract the archive with tar:
tar xzvf asterisk-1.4.24.tar.gz
a new folder named “asterisk-1.6.0.6″ will be created
• Change the current working directory to that folder, with cd:
cd asterisk-1.4.24
Pre-building configuration
Stay in the “asterisk-1.4.24″ folder, which holds the source code of Asterisk and run the script:
./configure
which will check the usability of the system libraries and create a ’Makefile’, based on your system.
The ’Makefile’ will later on be used by ’make’ to build Asterisk
If the ’configure’ script ran fine, you should read on the screen something like:
configure: OS type : linux-gnu
configure: Host CPU : i686
Building
Stay in the “asterisk-1.4.24″ folder, which now holds also the ’Makefile’ and run make:
make
consider that on an 800MHz AMD Athlon CPU system, the building of Asterisk takes around 7 minutes
however, rebuilding Asterisk from the same source tree will take much less because only the files affected from changes to the ’Makefile’ with the ./configure script will be rebuilt.
If the building ran fine, you should read on the screen:
+——— Asterisk Build Complete ———
+ Asterisk has successfully been built, and
+ can be installed by running:
+
+ make install
+——————————————-
Installation
Always staying in the “asterisk-1.6.0.6″ folder, write the command:
make install
which will finally install Asterisk.
You should then read something like:
+—- Asterisk Installation Complete ——-+



Installing sample configuration files
The sample configuration files which comes with Asterisk, will provide a good basic running setup to start customizing.
To install them, run the command:
make samples
Init scripts for getting Asterisk to start at boot
Having Asterisk to start at boot is as simple as running, in the “asterisk-1.6.0.6″ folder, the command:
make config
which will choose the right init files for your distribution, and copy them in /etc/asterisk
For your information, those files are located in the contrib/init.d/ folder
First execution of Asterisk
As the superuser root, from whatever folder you are in, run:
asterisk -vvvc
Asterisk will load it’s modules and it’s configuration, you should then read:
Asterisk Ready.
*CLI>
this is the command line interface of Asterisk, to logout run the command:
stop now
Reboot and verify
Reboot the system with the command:
reboot
after the reboot process, you can verify that Asterisk is running with the command:
asterisk -r
and logout from the command line interface with the command:
exit



======
apt-get install cvs
apt-get install subversion
svn checkout http://svn.digium.com/svn/asterisk-gui/branches/2.0
cd 2.0/
./configure
make
make install
make checkconfig
=>
* Checking if HTTP is enabled: FAILED
-- Please be sure you have 'enabled = yes'
-- in /etc/asterisk/http.conf

=>
* Checking if HTTP static support is enabled: FAILED
-- Please be sure you have 'enablestatic = yes'
-- in /etc/asterisk/http.conf

bindaddr=0.0.0.0

=>
* Checking if manager is enabled: FAILED
-- Please be sure you have 'enabled = yes'
-- in /etc/asterisk/manager.conf
 enabled = yes
webenabled = yes

* GUI should be available at http://192.168.2.18:8088/asterisk/static/config/index.html

* Note: If you have bindaddr=127.0.0.1 in /etc/asterisk/http.conf
you will only be able to visit it from the local machine.

Example: http://localhost:8088/asterisk/static/config/index.html

* The login and password should be an entry from /etc/asterisk/manager.conf
which has 'config' permission in read and write. For example:

[admin]
secret = gulfagate.com
read = system,call,log,verbose,command,agent,config
write = system,call,log,verbose,command,agent,config

Friday, August 27, 2010

Exchange 2010 System Requirements...

Top of Form

Description: http://i.technet.microsoft.com/Partner/Controls/OutlookHelpRelatedTopics/resources/progress.gifLoading...

No resources found.

This topic provides steps for installing the necessary Windows Server 2008 Service Pack 2 (SP2) or later or Windows Server 2008 R2 operating system prerequisites for all Microsoft Exchange Server 2010 server roles. It also includes the steps for installing the Windows Vista and Windows 7 operating system prerequisites for the Exchange Management Tools.

Description: http://i.msdn.microsoft.com/Global/Images/clear.gif Prerequisites

  • Make sure that the functional level of your forest is at least Windows Server 2003, and that the Schema Master is running Windows Server 2003 with Service Pack 1 or later. For more information about the Windows functional level, see Managing Domains and Forests.
  • The full installation option of Windows Server 2008 with Service Pack 2 or later or Windows Server 2008 R2 must be used for all servers running Exchange 2010 server roles or management tools.
  • For all server roles other than the Edge Transport server role, you must first join the computer to the appropriate internal Active Directory forest and domain.

Description: Bb691354.note(en-us,EXCHG.140).gifNote:

If you're installing the Mailbox server role and you intend the server to be a member of a database availability group (DAG), you must be running the Enterprise Edition of Windows Server 2008 or Windows Server 2008 R2. The Standard Edition doesn't support the features needed for DAGs. You can't upgrade Windows when Exchange is installed on the server.

Description: http://i.msdn.microsoft.com/Global/Images/clear.gif What Do You Want to Do?

Description: http://i.msdn.microsoft.com/Global/Images/clear.gif Install the Windows Server 2008 SP2 operating system prerequisites

  1. Install Microsoft .NET Framework 3.5 Service Pack 1 (SP1). For details, see Microsoft .NET Framework 3.5 SP1.
  2. Install the Microsoft .NET Framework 3.5 Family Update for Windows Vista x64, and Windows Server 2008 x64 updates. For details, see Microsoft .NET Framework 3.5 Family Update for Windows Vista x64, and Windows Server 2008 x64. See also Microsoft Knowledge Base article 959209, An update for the .NET Framework 3.5 Service Pack 1 is available.
  3. Install Windows Remote Management (WinRM) 2.0 and Windows PowerShell V2 (Windows6.0-KB968930.msu). For details, see Install Windows Management Framework.
  4. On servers that will host the Hub Transport or Mailbox server role, install the Microsoft Filter Pack. For details, see 2007 Office System Converter: Microsoft Filter Pack.
  5. Open an elevated command prompt, navigate to the Scripts folder on the Exchange 2010 installation media and use one of the following commands to install the necessary operating system components:
    1. For a server that will have the typical installation of Client Access, Hub Transport, and the Mailbox role:

2. sc config NetTcpPortSharing start= auto

ServerManagerCmd -ip Exchange-Typical.xml -Restart

    1. For a server that will host the Client Access, Hub Transport, Mailbox, and Unified Messaging server roles:

4. sc config NetTcpPortSharing start= auto

5. ServerManagerCmd -i Desktop-Experience

ServerManagerCmd -ip Exchange-Typical.xml -Restart

    1. For a server that will host the Client Access and Hub Transport server roles:

7. sc config NetTcpPortSharing start= auto

ServerManagerCmd -ip Exchange-Typical.xml -Restart

    1. For a server that will host the Hub Transport and Mailbox server roles:

ServerManagerCmd -ip Exchange-Typical.xml -Restart

    1. For a server that will host the Client Access and Mailbox server roles:

10.sc config NetTcpPortSharing start= auto

ServerManagerCmd -ip Exchange-Typical.xml -Restart

    1. For a server that will host only the Client Access role:

12.sc config NetTcpPortSharing start= auto

ServerManagerCmd -ip Exchange-CAS.xml -Restart

    1. For a server that will host only the Hub Transport role:

ServerManagerCmd -ip Exchange-Hub.xml -Restart

    1. For a server that will host only the Mailbox role:

ServerManagerCmd -ip Exchange-MBX.xml -Restart

    1. For a server that will host only the Unified Messaging role:

ServerManagerCmd -ip Exchange-UM.xml -Restart

    1. For a server that will host the Edge Transport role:

ServerManagerCmd -ip Exchange-Edge.xml -Restart

After installing the above prerequisites and before installing Exchange 2010, we recommend that you install any critical or recommended updates from Microsoft Update.

Description: http://i.msdn.microsoft.com/Global/Images/clear.gif Install the Windows Server 2008 R2 operating system prerequisites

  1. On servers that will host the Hub Transport or Mailbox server role, install the Microsoft Filter Pack. For details, see 2007 Office System Converter: Microsoft Filter Pack.
  2. On the Start Menu, navigate to All Programs, then Accessories, then Windows PowerShell. Open an elevated Windows PowerShell console, and run the following command:

Import-Module ServerManager

  1. Use the Add-WindowsFeature cmdlet to install the necessary operating system components:
    1. For a server that will have the typical installation of Client Access, Hub Transport, and the Mailbox role:

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

    1. For a server that will host the Client Access, Hub Transport, Mailbox, and Unified Messaging server roles:

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy,Desktop-Experience -Restart

    1. For a server that will host the Client Access and Hub Transport server roles:

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

    1. For a server that will host the Hub Transport and Mailbox server roles:

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server -Restart

    1. For a server that will host the Client Access and Mailbox server roles:

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

    1. For a server that will host only the Client Access role:

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

    1. For a server that will host the Hub Transport or the Mailbox role:

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server -Restart

    1. For a server that will host only the Unified Messaging role:

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Desktop-Experience -Restart

    1. For a server that will host the Edge Transport role:

Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS -Restart

  1. On servers that will have the Client Access Server role installed, after the system has restarted, log on as an administrator, open an elevated Windows PowerShell console, and configure the Net.Tcp Port Sharing Service for Automatic startup by running the following command:

Set-Service NetTcpPortSharing -StartupType Automatic

After installing the above prerequisites and before installing Exchange 2010, we recommend that you install any critical or recommended updates from Microsoft Update.

Description: http://i.msdn.microsoft.com/Global/Images/clear.gif Install the Windows Vista SP2 operating system prerequisites for the Exchange management tools

  1. Install Microsoft .NET Framework 3.5 Service Pack 1 (SP1). For details, see Microsoft .NET Framework 3.5 SP1.
  2. Install the Microsoft .NET Framework 3.5 Family Update for Windows Vista x64, and Windows Server 2008 x64 updates. For details, see Microsoft .NET Framework 3.5 Family Update for Windows Vista x64, and Windows Server 2008 x64. See also Knowledge Base article 959209, An update for the .NET Framework 3.5 Service Pack 1 is available.
  3. Install Windows Remote Management (WinRM) 2.0 and Windows PowerShell V2 (Windows6.0-KB968930.msu). For details, see Install Windows Management Framework.
  4. Install the necessary operating system components:
    1. Open the Windows Control Panel, and then open the Programs and Features applet.
    2. In the Tasks area, click Turn Windows features on or off.
    3. Expand Internet Information Services, expand Web Management Tools, and then expand IIS 6 Management Compatibility.
    4. Select the checkbox for IIS 6 Management Console and then click OK.

Description: http://i.msdn.microsoft.com/Global/Images/clear.gif Install the Windows 7 operating system prerequisites for the Exchange management tools

  1. Install the necessary operating system components:
    1. Open the Windows Control Panel, and then open the Programs and Features applet.
    2. In the Tasks area, click Turn Windows features on or off.
    3. Select Microsoft .NET Framework 3.5.1.
    4. Expand Internet Information Services, expand Web Management Tools, and then expand IIS 6 Management Compatibility.
    5. Select the check box for IIS 6 Management Console and then click OK.

Tuesday, July 20, 2010

VBS script Copy from source folder to destination by date "last 1 day", remove from source after copy is performed!

All files in C:\Temp\ that are < 1 older than day will be copied to C:\Temp\1\.
in this case i consider C:\Temp\1\ a temporal transition folder should be freed after copy is done.

From_folder = "C:\Temp\"
To_Folder="C:\Temp\1\"

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

Dim folder, file
Dim parts, file_date
Set folder = fso.GetFolder(From_folder)
For Each file in folder.Files
If DateDiff("d", file.DateCreated, Now()) < 1 Then
'MsgBox file.DateCreated
fso.CopyFile From_folder & file.name, To_Folder & file.name
fso.DeleteFile From_folder & file.name, true
End If
next

Tuesday, June 8, 2010

My Exchange PowerShell Comands



Remove disconnected mailboxes
Get-MailboxStatistics -database “GULFSIP-SRV1\"Mailbox Database"” | where {$_.disconnectdate -ne $null} | foreach {Remove-mailbox -database $_.database -storemailboxidentity $_.mailboxguid}



List by size Mailboxes:
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount





BULK IMPORT
Import-csv Big-List-of-users.csv | %{get-mailbox $_.emailAddress | set-mailbox -HiddenFromAddressListsEnabled $true/$false}

Import-Csv contacts.csv | ForEach { New-MailContact -Name $_.displayName -Firstname $_.Firstname -Lastname $_.Lastname -ExternalEmailAddress $_.Emailaddress -OrganizationalUnit "MyDomain.com/Contacts" }

CREATE CERTIFICATION :
New-ExchangeCertificate -GenerateRequest -SubjectName "c=KW, o=GULFGATE, cn=gulfgate.com" -DomainName gulfgate.com, webmail.gulfgate.com -PrivateKeyExportable $true -Path E:\Backup\Configurations\Exchange2007\certrequest2.txt
===========
Thumbprint Services Subject
---------- -------- -------
A8A645B773E790010E8A60AD12117CD086C5F9B9 ..... CN=gulfgate.com, O=GULF...
===========
Import-ExchangeCertificate -path "C:\webmail.DOMAIN.com.crt"

Enable-ExchangeCertificate -Thumbprint A8A645B774E720010E8A60AD12117CD086C5F9B9 -Services:"SMTP, IIS"
CREATING SEND CONECTOR:new-SendConnector -Name 'Send connector to Internet' -Usage 'Internet' -AddressSpaces 'smtp:*;1' -DNSRoutingEnabled $true -UseExternalDNSServersEnabled $false -SourceTransportServers 'gulfsip-01'

DYNAMIC GROUP:
new-DynamicDistributionGroup -Name 'KNPC' -IncludedRecipients 'AllRecipients' -OrganizationalUnit 'gulfsip.kw/Gulf/Gate/KNPC' -Alias 'KNPC' -RecipientContainer 'gulfsip.kw/Gulf/Gate/KNPC'


ENABLE/DISABLE IMAP/POP
==================================================================
Set-CASMailbox -Identity 'Esraa@gulf.com' -PopEnabled $false
Set-CASMailbox -Identity 'Esraa@gulf.com' -IMAPEnabled $false
==================================================================

BULK CONTACT INSERT:
New-MailContact -ExternalEmailAddress 'SMTP:moustafa@gulf.com' -Name 'Mostafa' -OrganizationalUnit 'gulfsip.kw/Gulf/ExternalContacts/GulfSip' -FirstName 'Mostafa' -LastName 'Magdy'

HIDE ALL USERS FROM ADDRESS LIST:
get-mailcontact * | set-mailcontact -hiddenfromaddresslistsenabled $true -ErrorAction SilentlyContinue -ErrorVariable +hidecontactserr;

INSTALL ANTI SPAM AGENT:
[PS] C:\Program Files\Microsoft\Exchange Server\Scripts>.\install-AntispamAgents.ps1

KNOW SEND CONNECTOR DETAILS:Get-SendConnector |fl
Get-EventLogLevel
Set-EventLogLevel -Identity MSExchangeTransport\SmtpSend -Level expert

MAILBOX QUOTA:
http://www.simple-talk.com/sysadmin/powershell/managing-exchange-2007-mailbox-quotas-with-windows-powershell/
Set-Mailbox amir -IssueWarningQuota 3000MB -ProhibitSendQuota 3000MB –UseDatabaseQuotaDefaults $false
Get-MailboxStatistics "ayman@gulf.com" | fl TotalItemSize
Set-Mailbox "ayman@gulf.coM" -IssueWarningQuota 2700MB -ProhibitSendQuota 3000MB –UseDatabaseQuotaDefaults $false

NEW USER:


IF ALREADY EXISTS:

Enable-Mailbox -Identity 'gulf.kw/Users/amany' -Alias 'amany' -Database 'GULFSIP-01\First Storage Group\Mailbox Database'
basma@gulf.com Eng. B
dsadd user CN=Basma,CN=users,DC=gulfsip,DC=kw -samid "Basma" -display "Basma" -pwd BBakry -email basma@gulf.com
Enable-Mailbox -Identity 'gulf.kw/Users/basma' -Alias 'basma' -Database 'GULFSIP-01\First Storage Group\Mailbox Database'

SET SEND SIZE LIMIT:
Get-SendConnector | select gulfsip-01

Get-ReceiveConnector | select gulfsip-01


Set-SendConnector -identity "Send connector to Internet" -MaxMessageSize 30MB

Set-ReceiveConnector -identity "Send connector to Internet" -MaxMessageSize 30MB




Organizational Limits
====================
Set-TransportConfig -MaxReceiveSize 30MB

Set-TransportConfig -MaxSendSize 30MB

Set-ReceiveConnector -identity "Client GULFSIP-01" -MaxMessageSize 30MB

Set-ReceiveConnector -identity "Default GULFSIP-01" -MaxMessageSize 30MB
get-mailbox | set-mailbox -maxsendsize 30MB



OWA TIME OUT:
set-ItemProperty ‘HKLM:\SYSTEM\CurrentControlSet\Services\MSExchangeOWA’ -name TrustedClientTimeout -value 30 -type dword

---------------------------------------------------------------------------
Add a mailbox/contact/mailuser
(e.g. John Doe) to a group (e.g. AllStudents) is:
Add-DistributionGroupMember -Identity AllStudents -Member 'John Doe'
Remove a mailbox/contact/mailuser (e.g. John Doe) from a group (e.g. AllStudents) is:
Remove-DistributionGroupMember -Identity AllStudents -Member 'John Doe



*******************
Trouble Shooting
*******************
Exchange 2010 , Event ID 2501
The site monitor API was unable to verify the site name for this Exchange computer - Call=DsGetSiteNameW Error code=800703e5. Make sure that Exchange server is correctly registered on the DNS server.
---->

Run:
[PS] C:\Windows\system32>nltest /dsgetsite
Getting DC name failed: Status = 1919 0x77f ERROR_NO_SITENAME
[PS] C:\Windows\system32>nltest /server:ServerName /dsgetsite
Getting DC name failed: Status = 1722 0x6ba RPC_S_SERVER_UNAVAILABLE
if you got the above errors , then follow the below:
 
  1. Open RegEdit
  2. Browse to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters
  3. Create a REG_SZ entry with the name SiteName
  4. Set the Value to the site name of the site the Schema Masters in
  5. Restart Netlogon service
  6. Restart MSExchangeADTopology , it will restart all dependent services 
  7. Have Fun :)
 [PS] C:\Windows\system32>nltest /server:HC-01 /dsgetsite
Default-First-Site-Name
The command completed successfully
[PS] C:\Windows\system32>nltest /dsgetsite
Default-First-Site-Name
The command completed successfully
[PS] C:\Windows\system32>

Monday, June 7, 2010

Dsquery / Dsget Active directory

dsquery user -name "Ahmad Sabry El Gendi" | dsget user -title -tel -samid -Email

Sunday, March 21, 2010

156 Useful Run Commands for windows XP

To Access… Run Command
Accessibility Controls access.cpl
Accessibility Wizard accwiz
Add Hardware Wizard hdwwiz.cpl
Add/Remove Programs appwiz.cpl
Administrative Tools control admintools
Adobe Acrobat (if installed) acrobat
Adobe Designer (if installed) formdesigner
Adobe Distiller (if installed) acrodist
Adobe ImageReady (if installed) imageready
Adobe Photoshop (if installed) photoshop
Automatic Updates wuaucpl.cpl
Bluetooth Transfer Wizard fsquirt
Calculator calc
Certificate Manager certmgr.msc
Character Map charmap
Check Disk Utility chkdsk
Clipboard Viewer clipbrd
Command Prompt cmd
Component Services dcomcnfg
Computer Management compmgmt.msc
Control Panel control
Date and Time Properties timedate.cpl
DDE Shares ddeshare
Device Manager devmgmt.msc
Direct X Control Panel (if installed)* directx.cpl
Direct X Troubleshooter dxdiag
Disk Cleanup Utility cleanmgr
Disk Defragment dfrg.msc
Disk Management diskmgmt.msc
Disk Partition Manager diskpart
Display Properties control desktop
Display Properties desk.cpl
Display Properties (w/Appearance Tab Preselected) control color
Dr. Watson System Troubleshooting Utility drwtsn32
Driver Verifier Utility verifier
Event Viewer eventvwr.msc
Files and Settings Transfer Tool migwiz
File Signature Verification Tool sigverif
Findfast findfast.cpl
Firefox (if installed) firefox
Folders Properties folders
Fonts control fonts
Fonts Folder fonts
Free Cell Card Game freecell
Game Controllers joy.cpl
Group Policy Editor (XP Prof) gpedit.msc
Hearts Card Game mshearts
Help and Support helpctr
HyperTerminal hypertrm
Iexpress Wizard iexpress
Indexing Service ciadv.msc
Internet Connection Wizard icwconn1
Internet Explorer iexplore
Internet Properties inetcpl.cpl
Internet Setup Wizard inetwiz
IP Configuration (Display Connection Configuration) ipconfig /all
IP Configuration (Display DNS Cache Contents) ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) ipconfig /flushdns
IP Configuration (Release All Connections) ipconfig /release
IP Configuration (Renew All Connections) ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS) ipconfig /registerdns
IP Configuration (Display DHCP Class ID) ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) ipconfig /setclassid
Java Control Panel (if installed) jpicpl32.cpl
Java Control Panel (if installed) javaws
Keyboard Properties control keyboard
Local Security Settings secpol.msc
Local Users and Groups lusrmgr.msc
Logs You Out Of Windows logoff
Malicious Software Removal Tool mrt
Microsoft Access (if installed) msaccess
Microsoft Chat winchat
Microsoft Excel (if installed) excel
Microsoft Frontpage (if installed) frontpg
Microsoft Movie Maker moviemk
Microsoft Paint mspaint
Microsoft Powerpoint (if installed) powerpnt
Microsoft Word (if installed) winword
Microsoft Syncronization Tool mobsync
Minesweeper Game winmine
Mouse Properties control mouse
Mouse Properties main.cpl
Nero (if installed) nero
Netmeeting conf
Network Connections control netconnections
Network Connections ncpa.cpl
Network Setup Wizard netsetup.cpl
Notepad notepad
Nview Desktop Manager (if installed) nvtuicpl.cpl
Object Packager packager
ODBC Data Source Administrator odbccp32.cpl
On Screen Keyboard osk
Opens AC3 Filter (if installed) ac3filter.cpl
Outlook Express msimn
Paint pbrush
Password Properties password.cpl
Performance Monitor perfmon.msc
Performance Monitor perfmon
Phone and Modem Options telephon.cpl
Phone Dialer dialer
Pinball Game pinball
Power Configuration powercfg.cpl
Printers and Faxes control printers
Printers Folder printers
Private Character Editor eudcedit
Quicktime (If Installed) QuickTime.cpl
Quicktime Player (if installed) quicktimeplayer
Real Player (if installed) realplay
Regional Settings intl.cpl
Registry Editor regedit
Registry Editor regedit32
Remote Access Phonebook rasphone
Remote Desktop mstsc
Removable Storage ntmsmgr.msc
Removable Storage Operator Requests ntmsoprq.msc
Resultant Set of Policy (XP Prof) rsop.msc
Scanners and Cameras sticpl.cpl
Scheduled Tasks control schedtasks
Security Center wscui.cpl
Services services.msc
Shared Folders fsmgmt.msc
Shuts Down Windows shutdown
Sounds and Audio mmsys.cpl
Spider Solitare Card Game spider
SQL Client Configuration cliconfg
System Configuration Editor sysedit
System Configuration Utility msconfig
System File Checker Utility (Scan Immediately) sfc /scannow
System File Checker Utility (Scan Once At The Next Boot) sfc /scanonce
System File Checker Utility (Scan On Every Boot) sfc /scanboot
System File Checker Utility (Return Scan Setting To Default) sfc /revert
System File Checker Utility (Purge File Cache) sfc /purgecache
System File Checker Utility (Sets Cache Size to size x) sfc /cachesize=x
System Information msinfo32
System Properties sysdm.cpl
Task Manager taskmgr
TCP Tester tcptest
Telnet Client telnet
Tweak UI (if installed) tweakui
User Account Management nusrmgr.cpl
Utility Manager utilman
Windows Address Book wab
Windows Address Book Import Utility wabmig
Windows Backup Utility (if installed) ntbackup
Windows Explorer explorer
Windows Firewall firewall.cpl
Windows Magnifier magnify
Windows Management Infrastructure wmimgmt.msc
Windows Media Player wmplayer
Windows Messenger msmsgs
Windows Picture Import Wizard (need camera connected) wiaacmgr
Windows System Security Tool syskey
Windows Update Launches wupdmgr
Windows Version (to show which version of windows) winver
Windows XP Tour Wizard tourstart
Wordpad write

Tuesday, February 16, 2010

Delete Scheduled files every 2 weeks in linux Centos

find /var/spool/asterisk/monitor/ -mtime +12 -type f -exec rm -rf {} \;

Saturday, February 13, 2010

Debian isn't showing all my ram! Debian can't read all RAM x32 on x64 machine

But there's a problem; you ordered your system with 4 GB of RAM but you are only able to see 2. Well this may just be an issue with the default Debian kernel.
Section 1: Checking available RAM

1. First thing's first, how much RAM does your system believe that it has available?

toystory:~# free -m
total used free shared buffers cached
Mem: 1012 44 968 0 3 22
-/+ buffers/cache: 18 994
Swap: 94 0 94

2. You can also check the server physically to see what sort of RAM is actually installed if you have lshw installed. Let's install it and take a look:

toystory:~# apt-get install lshw
. . . installation of package should go okay here . . .
toystory:~# lshw -C memory

As with any command you will receive a fair amount of information that you were not necessarily looking for. The section that you are interested in will look something like this:

*-bank:0
description: DIMM Synchronous 333 MHz (3.0 ns)
product: PartNum0
vendor: Manufacturer0
physical id: 0
serial: SerNum0
slot: DIMM0
size: 1GB
width: 64 bits
clock: 333MHz (3.0ns)
*-bank:1
description: DIMM Synchronous 333 MHz (3.0 ns)
product: PartNum1
vendor: Manufacturer1
physical id: 1
serial: SerNum1
slot: DIMM1
size: 1GB
width: 64 bits
clock: 333MHz (3.0ns)
*-bank:2
description: DIMM Synchronous 333 MHz (3.0 ns)
product: PartNum1
vendor: Manufacturer1
physical id: 1
serial: SerNum2
slot: DIMM1
size: 1GB
width: 64 bits
clock: 333MHz (3.0ns)
*-bank:3
description: DIMM Synchronous 333 MHz (3.0 ns)
product: PartNum1
vendor: Manufacturer1
physical id: 1
serial: SerNum3
slot: DIMM1
size: 1GB
width: 64 bits
clock: 333MHz (3.0ns)

This should list the sticks of RAM that are actually installed to the system. Looks like 4 separate sticks of 1 GB RAM installed to me. Let's move on to solving this problem.
Section 2: The Bigmem Kernel
Due to some optimizations made at the kernel level of Linux there are a few different "maximum memory" specifications that are set to achieve maximum performance, but you are probably most concerned about getting to your RAM immediately, so let's get to that. The first thing that you need to do is install the "bigmem" kernel package if it is not already installed. Our default installations of Debian come with this installed so you should not need to do this, but just in case take the following steps.
1. Check to see if the kernel is already installed. If something like linux-image-2.6-686-bigmem shows up here, then skip down to Section 3 because you're all set

toystory:~# dpkg --get-selections | grep bigmem

2. Go ahead and install the package

toystory:~# apt-get install linux-image-2.6-686-bigmem

3. Check to make sure it's installed okay.

toystory:~# dpkg --get-selections | grep bigmem
linux-image-2.6-686-bigmem install
toystory:~#

That's all there is to the installation for our purposes. Custom kernel compilation is outside of the scope of this article.
Section 3: Configuring Grub
By default our installations of Debian use the grub bootloader. If you have not made any changes, a command like this will tell you what kernels you have configured within grub.

toystory:~# grep "Debian GNU" /boot/grub/menu.lst | nl -v0
0 title Debian GNU/Linux, kernel 2.6.18-5-k7
1 title Debian GNU/Linux, kernel 2.6.18-5-k7 (single-user mode)
2 title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem
3 title Debian GNU/Linux, kernel 2.6.18-5-686-bigmem (single-user mode)
4 title Debian GNU/Linux, kernel 2.6.18-4-k7
5 title Debian GNU/Linux, kernel 2.6.18-4-k7 (single-user mode)

We want to use our bigmem kernel (not in single user mode of course) so we'll need to update the "default" entry in grub's configuration file.
1. So what is the current default entry?

toystory:~# grep ^default /boot/grub/menu.lst
default 0

2. So open your favorite text editor and find the line that says "default #" and change it to the number that you found above. Here we are in vi:
3. Now all you have to do is reboot. So give it a go and reboot to see what happens!

Thursday, February 11, 2010

Install Brekeke Advanced SIP on linux Debian!

first add deb http://ftp.nl.debian.org/debian/ lenny main contrib non-free

to /etc/apt-sources.list

then follow up this simple steps:
1- wget http://mirror.cc.columbia.edu/pub/software/apache/tomcat/tomcat-5/v5.5.28/bin/apache-tomcat-5.5.28.tar.gz

2- apt-cache search java | grep jdk

3- apt-get install sun-java6-jdk

4- tar -xzvf apache-tomcat-6.0.24.tar.gz

5- mkdir /usr/local/tomcat5.5

6- gulfsip:/home/downs# mv apache-tomcat-5.5.28 /usr/local/

7- gulfsip:/usr/local/tomcat5.5# mv apache-tomcat-5.5.28/ tomcat5.5

8- export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.12
export PATH=/usr/lib/jvm/java-6-sun-1.6.0.12/bin:$PATH

9- Start tomcat /usr/local/tomcat5.5/bin/./startup.sh

10- copy the proxy.war file into: /usr/local/tomcat5.5/webapps

11- Make sure Tomcat is running: http://X.X.X.X:8080/

12- run the SIP server: http://X.X.X.X:8080/proxy

Wednesday, February 10, 2010

ConfigServer Security & Firewall notes!!

My question was:
what if I did place my server IP: 10.54.6.170 in the csf.allow

and I want it as the ONLY server to access
10.54.6.170 for port 22
How I can restrict other IPs to access this 22 ports other than 10.54.6.170 ?


=======> ANSWER <
=======


Checking over the csf.allow file, I see it provides examples of what I think is very important to secure your server:

# The trust rules can be made in advanced format with 4 options
# (proto:flow:port:ip);
# 1) protocol: [packet protocol tcp/udp]
# 2) flow in/out: [packet direction, inbound or outbound]
# 3) s/d=port: [packet source or destination port]
# 4) s/d=ip(/xx) [packet source or destination address, masking supported]
#
# Syntax:
# proto:flow:[s/d]=port:[s/d]=ip(/mask)
# s - source , d - destination , flow - packet flow in/out
#
# Examples:
# inbound to destination port 22 from 192.168.2.1
# tcp:in:d=22:s=192.168.2.1
#
# outbound to destination port 23 to destination host 192.168.2.1
# out:d=23:d=192.168.2.1
#
# inbound to destination port 3306 from 192.168.5.0/24
# d=3306:s=192.168.5.0/24

here was my simple rule:
d=22:s=10.54.6.170/28
and I did restart /etc/nit.d/csf --restart