Jan 29 2014

Download extpart and Extend the Windows C: Partition

Published by under Windows

Windows 2003 Server and XP do not provide any tool to extend the boot partition. Diskpart, Microsoft default disk manager, works with secondary volumes only.
In this context, Dell have released ExtPart, a free piece of software you can download for free that works on any hardware (I was successful on HP servers).

Download Extpart Dell Basic Disk Expansion on Dell website.
 
You may get a message it is not 32-bit compatible. Nevermind, this is only a self extract file.
Run extpart.exe on a 32 bit platform and copy the unpacked file onto your 2003 server or PC.
 
To extend your C: drive, open a command prompt, change directory to extpart’s and run:

extpart.exe C: 1024

This will extend the C: partition by 1 GB (1024MB).
Make sure there’s space left on the disk before you extend the volume.
 
If you get the “Unable to connect to C: or it does not exist” message, reboot in safe mode and run the command again.

 

No responses yet

Oct 24 2013

Run a DHCP Relay on a Cisco Catalyst 2960 Switch

Published by under Cisco

Having a DHCP relay on a layer 2 switch is usually a nonsense. However, a DHCP server happened to crash and I had no access to configure a new DHCP service on a remote site.
My only option was to set a DHCP relay on the switch that will forward requests to another site to avoid a massive change for static IP.
Some say layer 2 devices cannot deal with DHCP but hey, this is on the Cisco catalyst 2960 feature list… I even got this to work on a LAN base image.

Cisco catalyst DHCP relay

First I create a new scope on a Windows DHCP server hosted on the main site whose IP is 192.168.15.240.
 

Windows DHCP Ranges


Here’s how I configured my Cisco 2960: Small site, one vlan (VLAN 50), all ports in the same vlan

interface Vlan50
 ip address 192.168.50.11 255.255.255.0
 no ip route-cache
!
ip default-gateway 192.168.50.254

service dhcp

ip dhcp pool My_Dhcp_Pool
   relay source 192.168.50.0 255.255.255.0
   relay destination 192.168.15.240
!

 
Make sure you have the connectivity to the DHCP server

my_switch#ping 192.168.15.240

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.15.240, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 33/42/59 ms

 
The Cisco 2960 vlan interface must be configured with an appropriate IP address and netmask of course. Then it must be activated using the no shutdown command.
Since the switch has only one interface, it can provide IPs on a single range. I don’t think a DHCP request received on a port assigned to a different vlan would get a response, I haven’t tested it though.
 
Disable the DHCP relay if you need it no more

no service dhcp

This solution can be used as a backup with just a Cisco 2960 switch acting as a DHCP relay. In most scenarios, a layer 3 hardware such as a router, or a server on the network would handle DHCP leases.

 

No responses yet

May 11 2013

Freeradius Usage Graphs

Published by under Freeradius


Freeradius traffic usage graph

Radius servers generate a lot of accounting records. Is it worth keeping them? Of course! Beside the fact they could be used to check if a customer was connected at a given date, or find out who got IP address X.X.X.X that same day, the most interesting is to generate Freeradius traffic usage graphs and show customers their daily download and upload. This is particularly useful for Internet providers. Many other features can then be implemented on top of that:
– Bill customers based on traffic, with your own or a professional billing software
– Charge customers for each extra MB passed the quota
– Suspend or restrict download speed for abusing customers
– Or simply detect abusing customers
Those are only a few examples but there are many other applications that could be built from there.


Usage Graphs Features

These scripts are already used by Internet service providers but could be used by anyone really using Freeradius.

They provide:
– Customer’s IP detection. User doesn’t need to enter his username or IP address.
– Customizable header and footer
– Easy setup. Just uncompress the archive and set your system parameters, that’s it
– Admin section to monitor any customer
– Displays days with no data or zero traffic

To get best results, have a look here on how to update your Radius usage at regular intervals. If not, you will get many days with no traffic due to the Radius protocol sending accounting at the start and the end of a session. You will also need to setup Freeradius and send accounting to a Mysql, Postgresql or Oracle database. Perl and its DBI and GD modules are also required. Visit www.perl.com.

It is recommended to create indexes on UserName on tables radacct and radcheck to speed up the script.
Freeradius usage graph is compatible with all Freeradius up to last version 3.x


Freeradius Usage Graphs Download

download Want to give it a try? Get this Radius traffic reporting script for free from the download section right now!
Download ( hits)

Note: This version only supports Mysql. Check below for Postgresql and Oracle.
In order to improve those scripts, don’t hesitate to contact us at contact@netexpertise.eu to share your ideas.


Advanced Script

Benefit from new features added to the previous script
– Display per day or per month
– Display traffic or number of disconnections
– Define start and stop dates
– Interactivity through a form
– Pick up dates from calendar
– Customizable graph colors to match your site
– Postgresql and Oracle support

Check this DEMO out and get the advanced version for €20 only!

 

4 responses so far

May 08 2013

Include Stored Procedures in Mysql Backups

Published by under Mysql

Most of us use mysqldump utility to backup Mysql databases. Be aware because mysqldump includes triggers by default but stored procedures and functions are ignored.
Stored procedures and functions are called routines in Mysql all together. Run mysqldump –help and you will see FALSE for routine’s default value.


You can include stored procedures and functions adding the –routines switch when running a backup.

$ mysqldump -u user -p my_database --routines backup.sql


Better, if you don’t want to type in the option – or forget – everytime you run a backup, Mysqldump default’s behaviour can be changed adding a mysqldump section in the my.cnf file, usually in your homedir.

$ cat ~/.my.cnf
[mysqldump]
routines = true


Make sure mysqldump default behaviour is now what you think:

$ mysqldump --print-defaults 
mysqldump would have been started with the following arguments:
--routines=true


Check your backup scripts before you run into a disaster recovery!

 

No responses yet

May 01 2013

Change Linux Keyboard

Published by under Linux

One can change the current session keyboard mapping with loadkeys.
To load the French keyboard map, simply run

loadkeys fr

 
Available keymaps can be found in /lib/kbd/keymaps/
You can even create your own

 

No responses yet

« Prev - Next »