Monday 10 December 2012

DMASOFTLAB Radius Manager: Install + Backup + Restore [Short Reference Guide]

Post : DMASOFTLAB Radius Manager: Install + Backup + Restore [Short Reference Guide]
URL : http://aacable.wordpress.com/2012/11/30/dmasoftlab-radius-manager-install-backup-restore-short-reference-guide/
Posted : November 30, 2012 at 3:19 PM
Author : Syed Jahanzaib / Pinochio~:)
Categories : Uncategorized
http://aacable.files.wordpress.com/2011/10/ubuntu.png&h=116
http://aacable.files.wordpress.com/2011/11/dmalogo.jpeg&h=53
Following is a short reference guide for DMASOFTLAB Radius Manager
Part-  1)         Installation Of RM,
Part- 2)         Complete Backup,
Part- 3)         Restore RM Data to new Installation.
.
.
Part-1 # Installation of Radius Manager 4.x on Ubuntu 10.4
DMASOFTLAB Radius Manager 4.0 Short reference manual guide for UBUNTU 10.4
After you have installed Ubuntu, configure IP address and enable internet access on it.
Now open Terminal Window and issue the below command to install required Modules.
apt-get install mc wget rcconf make gcc mysql-server mysql-client libmysqlclient15-dev libperl-dev curl php5 php5-mysql php5-cli php5-curl php5-mcrypt php5-gd php5-snmp
wget http://www.dmasoftlab.com/cont/download/libltdl3_1.5.24-1ubuntu1_i386.deb
wget http://www.dmasoftlab.com/cont/download/libltdl3-dev_1.5.24-1ubuntu1_i386.deb
dpkg -i libltdl3_1.5.24-1ubuntu1_i386.deb
dpkg -i libltdl3-dev_1.5.24-1ubuntu1_i386.deb

IONCUBE Installation:
First Download ioncube library
wget http://www.dmasoftlab.com/cont/download/ioncube_loaders_lin_x86.tar.gz
Untar it in any temp folder for example /temp/ioncube
tar zxvf ioncube_loaders_lin_x86.tar.gz
Create new folder for ioncube in usr/local
mkdir /usr/local/ioncube
and copy the whole folder in /usr/local
Now Add the appropriate ionCube loader to your php.ini
For example
Add this line on top
zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.3.so
in following files.
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini
Installation procedure of FreeRadius
==============================
wget http://www.dmasoftlab.com/cont/download/freeradius-server-2.1.8-dmamod-3.tar.gz
tar zxvf freeradius-server-2.1.8-dmamod-3.tar.gz
cd freeradius-server-2.1.8-dmamod-3
./configure
make
make install
ldconfig
Now test RADIUS by issuing following command:
radiusd -X
You will see something like below . . .
http://aacable.files.wordpress.com/2012/11/radius-ready1.png&h=100
Set the correct ownership on FreeRadius configuration files
================================================
chown www-data /usr/local/etc/raddb
chown www-data /usr/local/etc/raddb/clients.conf
TIP:
Review and edit (if required) the MySQL credentials in /usr/local/etc/raddb/sql.conf
(Just in case you have mentioned different password/id for mysql)
Creating MySQL databases with MySQL command line tool
===============================================
mysql -u root -ppassword
CREATE DATABASE radius;
CREATE DATABASE conntrack;
CREATE USER 'radius'@'localhost' IDENTIFIED BY 'welcome2agp';
CREATE USER 'conntrack'@'localhost' IDENTIFIED BY welcome2agp';
GRANT ALL ON radius.* TO radius@localhost;
GRANT ALL ON conntrack.* TO conntrack@localhost;
exit
 Time to Install RADIUS MANAGER 4.0.4
=================================
Copy the radius manager radiusmanager-4.0.4.tgz (or your version) in any temp folder
now extract it using
tar zxvf radiusmanager-4.0.4.tgz
cd radiusmanager-4.0.4.tgz
chmod +x install.sh
Execute the installation Script . . .
./install.sh
Now the install script will ask few questions . . . Select answers as per your local design.
For example:
Select the Operating  System
2
(For Ubuntu)
Select Installation type:
1
(New Installation)
WWW root path:
Press Enter to select the Default , which is /var/www
Radius Database host:
Press Enter to select the Default , which is localhost
Radius Database username:
Press Enter to select the Default , which is radius
Radius Database password:
Press Enter to select the Default , which is radius123
CTS Database host:
Press Enter to select the Default , which is localhost
CTS database username:
Press Enter to select the Default , which is conntrack
CTS database password:
Press Enter to select the Default , which is conn123
Freeradius UNIX User:
Press Enter to select the Default , which is root
Httpd Unix User:
Press Enter to select the Default , which is www-data
Create rmpoller service:
Press Enter to select the Default , which is y (yes)
create rmconntrack service:
Press Enter to select the Default , which is y (yes)
Backup Radius database:
Press Enter to select the Default , which is y (yes)
Now it will ask if you want to start the installation
Press y and press ENTER to continue the installation.
and at the end you will INSTALLATION COMPLETE!
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/11/radius-installation-complete.png&h=776
Now copy the two license files (that you receive from DMASOFTLAB) in /var/www/radiusmanager
lic.txt
mode.txt
Now access the admin panel from your browser
http://yourip/radiusmanager/admin.php
> TIPS:
>
1# : If you see the following error while accessing admin.php
Could not connect to localhost
Make sure your passwords for radius and conntrack hosts are set correctly in
/etc/radiusmanager.cfg
/var/www/radiusmanager/config/system_cfg.php
2# : If you see blank page while accessing admin.php , following could be wrong.
1- Your license files are not valid or expired.
2- you have not installed ioncube library correctly.
To test if your license is valid, tail the /var/log/apache2/access.log and error.log , they will show you if your license have issues.
To test IONCUBE LIBRARY , Open Terminal and Type
php-v
& you should see something similar to below . . . (Focu on Last line that says with the ioncube php loader . . .)
root@zaib-desktop:~# php -v
PHP 5.3.2-1ubuntu4.18 with Suhosin-Patch (cli) (built: Sep 12 2012 19:33:42)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.
To be continued . . .
:)




















































































Howto change MAC address of VM hosted in VM-Workstation

Post : Howto change MAC address of VM hosted in VM-Workstation
URL : http://aacable.wordpress.com/2012/12/04/howto-change-mac-address-of-vm-hosted-in-vm-workstation/
Posted : December 4, 2012 at 9:02 AM
Author : Syed Jahanzaib / Pinochio~:)
Categories : General IT Related
http://aacable.files.wordpress.com/2012/06/vmware.jpg&h=84
http://aacable.files.wordpress.com/2012/12/ethernet_mac_address.jpg&h=112

Manually Assigning a MAC Address For VM
To make sure that the same MAC address is assigned to a given virtual machine every time, even if the virtual machine is moved, you can assign the address manually instead of allowing VMware Workstation to assign it automatically. To assign the same, unique MAC address to any virtual machine manually, use a text editor to remove three lines from the configuration file and add two lines. The configuration file has a .vmx extension at the end of the file name.
To change MAC address of any virtual machine running under VM Workstation, Follow the below . . .
1- Make sure that the target VM is turned off.
2- Browse to folder where your VM is available. For example
F:\VM-WARE-IMAGES\UBUNTU
3- Now open VMX file in NOTEPAD , the name would be something like machine_name.VMX
4- Remove the three lines from the configuration file that begin with:
    ethernet0.generatedAddress
    ethernet0.addressType
    ethernet0.generatedAddressOffset
[Note: Change the ethernet0 to match your's]
Now Add a new static MAC address line to the configuration file with help of the following entries:
ethernet0.addressType = "static"
ethernet0.address = "00:11:22:33:44:55"
5- Now Save the configuration file. & Start the VM

















Cisco 3750: Howto enable err-disabled ports

Post : Cisco 3750: Howto enable err-disabled ports
URL : http://aacable.wordpress.com/2012/12/07/cisco-3750-howto-enable-err-disabled-ports/
Posted : December 7, 2012 at 2:09 PM
Author : Syed Jahanzaib / Pinochio~:)
Tags : cisco 3750, howto enable ports on switch 3750, show interfaces status err-disabled
Categories : Cisco Related
Personnel Reference Guide:
http://aacable.files.wordpress.com/2012/12/3750.png&h=85
To enable err-disabled ports on Cisco 3750 switch series. Follow the below . . .
First make telnet connection with the switch
> telnet 10.0.0.1
(change the ip as required,)
Enter Password to continue.
To view Disabled Ports:
> show interfaces status err-disabled
e.g:
> NOC_SWITCH>show int status err-disabled
>
> Port      Name               Status                    Reason               Err-disabled Vlans
> Gi2/0/10                     err-disabled         link-flap
>
> NOC_SWITCH>
To Enable Port:
> enable
> config t
> int G2/0/10
> no switchport port-security
> shut
> no shut
> exit
Change the interface name to match your. In above example I had two 2750 models in stack mode. so its showing G2, you may get G1 if you have single switch.
















[New post] HyperV to VMware conversion

Post : HyperV to VMware conversion
URL : http://aacable.wordpress.com/2012/12/07/hyperv-to-vmware-conversion/
Posted : December 7, 2012 at 4:53 PM
Author : Syed Jahanzaib / Pinochio~:)
Tags : hyperv to vmware, hyperv to vmware conversion, vmware vcenter converter
Categories : VMware ESXi Related
http://aacable.files.wordpress.com/2012/02/virtualization-with-hyper-v.png http://cdn4.steadfast.net/images/vmware.jpg
Howto convert Hyper-V hosts to Vmware ESXi
First Download Vmware Vcenter convertetr 5.x from following location.
You must have vmware account to download the utlity, you can rgister it free.
> http://downloads.vmware.com/d/details/converter5/dHclYnRqZEBiZEAldw== (http://downloads.vmware.com/d/details/converter5/dHclYnRqZEBiZEAldw==)
After installation Done. Execute it. You may see following screen.
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/1-vmconverter.png&h=174
.
Now click on CONVERT MACHINE
In Source Type , Select HYPER-V
In Server, type your Hyper-V IP
In User Name/Password , type your Administrator ID and password
and click NEXT to continue . . .
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/2-convert-hyperv-machione.png&h=226
If you receive the following error
Unable to contact the specified host 'x.x.x.x' . The host might not be available on the network, there might be a network configuration problem, or the management services on this host are not responding
then disable the firewall on HYPERV Windows 2008 by using following command (at hyper v server command prompt)
> netsh firewall set opmode disable
Now it will ask you for the agent deployment,
click YES to continue.
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/3-agent.png&h=232
.
.
In next screen of  SOURCE SERVER , It will give you the list of machines hosted on source Hyper-V server.
Select your desired machine ,
and click NEXT to continue
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/4-select-source-vm-hyperv1.png&h=232
.
.
In Next Screen of  DESTINATION SYSTEM , select the destination VMWARE ESXi Server
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/5-select-destination-server.png&h=233 .
.
In the next screen of  DESTINATION VIRTUAL MACHINE , Click NEXT to continue (Or you can change the machine name label here)
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/6-select-name1.png&h=232 .
.
In the next screen of  DESTINATION LOCATION , Select the datastore location (the drive where you want upload the vm)
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/7-select-datastore1.png&h=232 .
.
In the next screen , it will show you all the options before finally start converting, review all the options and modify if any required. then Click NEXT , and then FINISH to start converting the machine
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/8-final.png&h=231
.
.
Finally it will start conversion of the hyper v machine into Vmware Esxi.
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/9-status.png&h=65 .
.




































[New post] Vritualization: 3 in 1 > Using Mikrotik + Squid Proxy + Radius on single machine to save resources :)

Post : Vritualization: 3 in 1 > Using Mikrotik + Squid Proxy + Radius on single machine to save resources :)
URL : http://aacable.wordpress.com/2012/12/10/vritualization-3-in-1-using-mikrotik-squid-proxy-radius-on-single-machine-to-save-resources/
Posted : December 10, 2012 at 1:12 PM
Author : Syed Jahanzaib / Pinochio~:)
Tags : mikrotik with ESXi, Vmware Virtual Switch, Vritualizing mikrotik
Categories : IBM Related, Mikrotik Related, Radius Manager, VMware ESXi Related
http://nguoidentubinhduong.files.wordpress.com/2011/09/virtualized_by_vmware1.jpg&h=181 Virtualizing Mikrotik + Squid + Radius
3 in 1 using ESXi
~ By Syed Jahanzaib ~
http://aacable.files.wordpress.com/2012/12/virtual-network.png (http://aacable.wordpress.com/?attachment_id=2846)
.
Recently I did an installation of a network where they were low in hardware resources but still they wanted to utilize the benefits of Mikrotik Router OS with external Squid proxy server and also the Radius Billing Server . So in total they required at least 3 physical machines, but I managed to install all of them on single server using Virtualization technology of VMWARE ESXi 5.x (64bit) and it worked so great :)
Here is how I did it.
> Note: Because of some time shortage, I am just giving you an idea how it can be done, I am not writing in pin point details on how to connect every machine with Virtual/Physical switches. I will write about it soon.
Hardware Used for the Example:
64bit Server Class machine
Multiple SATA HDD's (the more Faster drives (like 10-15krpm) you have, the better result you will be able to achieve. Preferably in RAID mode, either 10 or 0, depend on your management and goals, in this example I used 7200krpm SATA HDD, I dedicate each hdd for each OS, I tested it on IBM xseries with RAID0 and found RAID 0 much more faster with 15krpm but its not redundant, one drive fail and your whole RAID will go down, so if you want redundancy, go with at least RAID 5 or RAID 10 , Raid 1 is also good as it mirrors each drive, but requires additional drives and also for proxy, its useless to use mirroring as it would be requiring more read/write burden on controller, oh GOD, in which argument I got into :p)
16GB RAM (Mikrotik doesn't requires much RAM in fact it officially supports maximum of 2G, but Radius and Squid do requires some good amount of RAM, I dedicated 8 GB to SQUID, 4GB to Radius, 2 GB to Mikrotik)
4 Network Adapters ( In this article, dueto time shortage, I have only mentioned howto add two network adapters for LAN and WAN link using virtual Switch tech)
Software Used:
1) Vmware ESXi 5.x  64bit as a Virtual Hyper-visor Server
Guest OS installed in it are as following
2) Mikrotik Router-OS 5.22
3) Ubuntu 10.4 for SQUID Proxy (2.7)
4) Ubuntu 10.4 for Radius Manager Billing System
First install Vmware ESXi. You can get its free edition from www.vmware.com  , just register and download the latest version , it would be in .iso format, Simply burn it to CD, and install it on your server , its very simple to install the ESXi, nothing more then just clicking NEXT NEXT :)
After ESXi installed, configure IP address on it, so you can manage it using its client called Vsphere client.
To shorten the story I am using only two interfaces for the mikrotik, LAN and WAN. in this example (shorten version) ESXi have two interfaces connected , one with the LAN user switch and other interface connected with the WAN (physically)
Creating Virtual Switch and bind Network Adapters with this switch.
Goto Configuration tab
From the list appear in Hardware section, click on Networking and click on ADD Networking
As showed in the image below , , ,
http://aacable.files.wordpress.com/2012/12/add-virtual-switch.png&h=118
http://aacable.files.wordpress.com/2012/12/2-add-network-wizard.png&h=218
http://aacable.files.wordpress.com/2012/12/3-add-network-wizard.png&h=220
http://aacable.files.wordpress.com/2012/12/4-add-network-wizard.png&h=220
http://aacable.files.wordpress.com/2012/12/5-add-network-wizard.png&h=219
Ok, our virtual switch is created.
Now its time to bind our WAN adapter in this switch. (So it can later be used for WAN for all hosts we will requiring for)
Click on the Properties
http://aacable.files.wordpress.com/2012/12/6-add-network-wizard.png&h=204
http://aacable.files.wordpress.com/2012/12/7-add-network-wizard.png&h=220
Done.
Creating Mikrotik in VM and assigning network adapters.
Now create new Virtual Machine for your Mikrotik.
Select necessary hardware that you required as required per user load. for example
Mikrotik = 1 CPU / 1 GB RAM / 10 GB HDD /
In Network Adapter Section, by default only one adapter is added, You have to add another adapter by selecting the number of adapters in drop down listing.
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/8-adding-lan-wan-in-host.png&h=285
Once the configuration is completed. Simply install the Mikrotik in newly created hosts you just created in above steps.
After configuration is complete, review once again the host settings,
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/9-mikrotik-network-adapters.png&h=266
After the installation is done, Connect to mikrotik with WINBOX  and look for interfaces
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/mikrotik-interface.png&h=113
.
I will write more on it later.