How to Configure Proxy Settings in Linux

How to Configure Proxy Settings in Linux

Here are two different ways to configure Linux to recognize a proxy server or proxy configuration file.

Export Command for Proxy Environment Variables

Personal kneeling in stone tunnel, photo credit jondoe via flickr

photo credit: jondoe

Use the following commands to configure your proxy for http and ftp traffic on the command line
export http_proxy=http://: export ftp_proxy=http://:

If your proxy requires login/authentication, you can use the format:
export http_proxy=http://username:password@::

To have this applied every time you log in, place these lines in your .bashrc in your home (~) directory.
export http_proxy=http://:
export ftp_proxy=http://:

Network Proxy Settings

For GNOME, go to Computer->Desktop Preferences->Network Proxy
For KDE desktop manager, you can get to the network proxy settings under System Settings > Network Settings > Proxy

In the setting, you can configure either by your proxy server and port, by the network, or a file via a URL/file location (e.g. http://myproxyserver:port/proxyfile.pac) .

These settings work with most other applications (e.g. other browsers like Chrome, OS commands).

Program/Application Level

Some applications and commands need to be configured individually. Below are some common examples.


You can manually set up the Firefox proxy in Options menu. Go to Options > Advanced > Settings.

Fedora – Yum Package Manager

yum proxy settings can be found in the file system at

Add a line to the file with the following information:
The next time you run yum, it will pick up that proxy.

For Ubuntu

Here is a similar how to article on configuring proxy settings in Ubuntu covering Synaptic Package Manager, Gnome, apt-get, and Firefox.

Online Security  (via Bryan Soliman Blog)

Online Security (via Bryan Soliman Blog)

If you’re looking for a concise introduction to online security, check out my work colleague Bryan’s blog. You can find further information on ethical hacking and web application security in Bryan’s published work in PenTest Magazine.

The Basics of Online Security – features, technology used, and consumer issues:

Abstract Magalhaes (2003) explained that e-commerce requires huge commitment in securing online transaction of users’ credit card information, and other personal information. The top of the list of consumer complaints about e-business is the data security breaches, the identity theft and the phishing sites and e-mails. Most of the e-commerce web sites usually setup a secure gateway that can take customers payments, credit card information, billin … Read More

Service Level Metrics for Middleware and Server Performance Monitoring

Service Level Metrics for Middleware and Server Performance Monitoring

Below are examples of metrics and measures  that are common when looking at IT infrastructure, middleware, and server performance.

Why People Use These Metrics

These metrics are useful when:

  • Considering service level metrics for infrastructure hosting providers and applications.
  • What to charge clients based on usage of infrastructure services.
  • Quality, stability, and capacity of infrastructure services


  • Disk space utilization (we want to check utilization and growth over time). Check space utilization on specific partitions like ones for log files and critical application server files
  • Number of middleware related incidents (errors, problems, etc.) and source of incidents (monitoring, clients, users, etc)
  • Throughput of requests
  • Up time
  • Input / Output – bytes received/transmitted per second
  • Usage thresholds for various performance measures related to CPU, memory, disk, network, failed transactions
  • CPU, memory, disk, network, failed transactions (%) over time
Removing viruses, trojans, and other malware from your Windows computer

Removing viruses, trojans, and other malware from your Windows computer

These steps are easy when you know exactly when your Windows computer  has been infected (e.g. inserting a USB stick, visiting a website with malicious software on your browser).

At the time of infection or shortly after infection, perform the following steps:

  1. Immediately turn off your computer and unplug it from the network / internet (remove the network cable or if you are using wireless, try to turn off the wireless connection / router – if you are not sure, just leave it).
  2. Reboot Windows and go into safe mode. You only need the basic safe mode without any networking, etc.
  3. To get into the Windows Safe Mode, as the computer is booting press and hold your “F8 Key” which should bring up the an options menu as shown below. Use your arrow keys to move to “Safe Mode” and press your Enter key. More information on safe mode can found on the Microsoft site by searching “Windows safe mode” along with your version of Windows.
  4. Use the Microsoft system restore to restore your computer to an early point before the infection began. This restore will revert system changes done by the virus, trojans, and other malware. The restore does not impact the “My Documents” and personal settings, so keep that in mind if you saved infected files to My Documents folders.
  5. System restore may be found differently depending on your version of Windows. The easy way is to use the built in Windows help (F1) in safe mode and search for system restore to find the program. If on Windows Vista/7, use the search on “restore system”. There are also instructions off the Microsoft site.


Resize and Expand a Virtualbox Hard Drive and Media in 4 Steps

Resize and Expand a Virtualbox Hard Drive and Media in 4 Steps

Updated April 1, 2014

Often, people find their virtual machine hard disks are too small for usage needs. Below are steps showing you how to resize and expand an existing VMDK or VDI virtual hard drive in VirtualBox for use with a guest virtual machine (VM).

Things to Know Before You Start

  • If you already have a dynamically allocated disk that is VDI or VHD linked to the virtual machine, simply use the VBoxManage modifyhd –resize command. e.x. VBoxManage modifyhd <your filename> --resize 100000. That command would be for 100GB. You can then skip to the resize your guest OS step in this guide. If you’re not sure or don’t have it, read on.
  • If your hard drive is VDI, you can try the CloneVDI tool to resize your disk easily without and skip to the resize your guest OS step in this guide.
  • There are suggestions below to help you avoid having to resize virtual drives ever again by using large dynamically expanding storage and can be completed in 10-20 minutes.
  • Ensure your guest VM is powered off before executing the steps and that all hard disks involved are not connected to VMs.

Step 1: Create a New Hard Disk

Use VirtualBox to create a new hard disk (vdi) with your desired size. You can use the dynamically expanding storage or a fixed size disk. If you are expanding the hard disk capacity, choose a size significantly larger (e.g. double the size) than the original hard disk to avoid problems.
Note: Starting with version 4.0 of VirtualBox, to create new disk images, use the “Storage” page in a virtual machine’s settings dialog because disk images are now by default stored in each machine’s own folder. The screenshot below pertains to VirtualBox 3.0.

Disk Type should be the Same

Make sure the new disk you create is of the same type as your old disk you want to expand. So if you have an IDE hard disk already, create a new IDE disk. The same applies for a SATA disk.

Recommendation: Use a large size dynamically expanding storage

It is to your advantage to use a large dynamic hard disk with a high maximum storage space to save you from having to go through this resizing process frequently. Having a dynamic 300 GB or 2 TB virtual disk won’t actually take up 300 GB or 2 TB on your hard drive and only takes up the actual disk space used on the disk. The exception to the recommendation would be if the system storing your virtual hard disks has space restrictions and your hard disks tend to grow quickly (e.g. a virtualized database server sitting on a host machine with a small hard drive).

Use of a fixed-size storage

It is best to use dynamic storage; however, some people have experienced problems using the dynamically expanding storage and using the fixed-size storage solved their problems.

Step 2: Clone Your Old Hard Disk

You can clone your old hard disk with the VirtualBox VBoxManage command. Make sure your VirtualBox directory containing the VBoxManage command is in your operating system path or you can execute the command below from the VirtualBox with absolute paths (e.g. ~/.VirtualBox/HardDisks/old_hard_disk.vdi). If you are in the directory containing your HardDisk folder (e.g. ~/.VirtualBox/HardDisks), run the following:

VBoxManage clonehd old_hard_disk.vdi new_hard_disk.vdi ––existing
Notes on using VBoxManage:

  • There are *2* dashes before ––existing.
  • The commands shown are case sensitive and should be entered as shown. VirtualBox documentation contains more info on VBoxManage and command syntax.
  • If you are running VBoxManage in Windows and are not running the command in the same directory as the hard disks you are cloning, you may have to add quotations ” ” around your hard disk paths so the command can recognize the location of the hard disks. For example:

C:Program FilesOracleVirtualBox>VBoxManage clonehd "c:extUbuntu64Studio.vdi" "C:Folder With SpaceNewHardDisk.vdi" --existing

  • Make sure to follow the syntax ordering given by the VBoxManage command, otherwise you may get an error like Invalid parameter ‘C:FolderWithSpaceNewHardDisk.vdi’.

The command will work if your old disk is in the vdi and also the VMDK format. The “–existing” parameter tells VirtualBox that the clone operation is to an already existing destination medium. Only the portion of the source medium which fits into the destination medium is copied. Since the new_hard_disk.vdi for us is larger than the old_hard_disk.vdi, all the source will be copied to the destination (e.g. entire guest hard disk).

Note for VMDK images: Your original VMDK guest image could be in one VMDK file or split into multiple VMDK files done by a virtualization program like VMWare. The advantage of having split files is it makes it easier to backup to DVDs and discs. After the cloning, you will only have one large VDI. To back up to disc media you’ll have to use a program to split the guest image (e.g. guest’s own tools or file splitters)

Cloning hard disks… you see something like the following

Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
(C) 2005-2010 Oracle Corporation All rights reserved.
Clone hard disk created in format 'VDI'. UUID: ee28ab8b-8232-4c76-8c1b-184afdd1dd27

Step 3: Update the Guest Hard Disk

Replace the old guest hard disk with your new hard disk (i.e. new_hard_disk.vdi):

  1. Go to the settings for the guest VM and choose the “Storage” options.
  2. Select the appropriate controller (e.g. IDE Controller, SATA Controller) and add your new hard disk.
  3. Remove the old hard disk from the Storage section of your guest.

Step 4: Resize the Guest File System

If you boot into your guest operating system (OS), the file system will continue to only use the old hard disk partition set up. To use the increased disk space visible the OS, you can use disk partition management commands. The steps for the resizing the disk can depend on your operating system.

For Windows environments

Windows 7, Windows Server 2008

You can boot into Windows using the new hard disk and use the “Disk Management” utility to extend your hard disk volume. Right click on the drive you are extending and select the extend command.

Windows XP, Windows Server 2003, Windows 2000

Microsoft has a good knowledge base article on partition management for these versions of windows. Alternatively, you can use this partition manager tool from Aomei which works on a variety versions of Windows.

For other environments like Linux and Mac

You can use a Gnome Partition Editor GParted boot disk / live CD to resize the disk partition so the guest file system knows about the increased disk space. To use GParted on the guest, configure the guest to boot from the GParted CD (General -> Advanced tab set CD/DVD Rom as the first boot device, then select GParted CD). Instructions for using GParted and resizing disk partitions can be found at the GParted website or Google GParted resizing for several walkthroughs.

Note on Logical Volume Management (LVM) disks / partitions (common for Fedora installations)

You can graphically manage lvm partitions using the system-config-lvm Linux tool. Documentation for system-config-lvm is available for various flavors of Linux online and a comment from David in the comments section has confirmed this method works on Ubuntu 10 Server.

If you cannot use system-config-lvm, here are other options:

  1. Try GParted. GParted currently (December 2012) has some support for lvm (source: There is no easy way to expand a partition using lvm with the file system in the logical volume as supposed to ext3 or ext4 partitions.
  2. If the lvm partition does not contain the operating system, just create a new partition using GParted with ext3 or 4 (ext3 is safe) with the new virtual disk space. Go into the OS and copy all files from the lvm to the ext partition. Remove the lvm partition later after you have confirmed the files are converted and not in use.
  3. If the lvm partition contains your operating system (root lvm), either (1) copy your key files (e.g. /home/) to a backup and reinstall the OS or (2) attempt to convert the lvm to a different kind of partition or expand it. The (2) second option’s instructions are more complex due the active root partition and other things like resizing the file system. However, if you know Logical Volume Management (LVM) administration well, you can find some instructions on the internet and comments on this article from “zuzu”.


Six hard disk drives with cases opened showing...

Photo credit: Wikipedia

People’s Experience with These Steps

You can find in the comment section of this article other people’s experiences with these steps and their tips.

THANK YOU Readers!

This post has been enhanced several times thanks to reader comments.

Installing VirtualBox guest additions on Fedora

Installing VirtualBox guest additions on Fedora

Happy Holidays!

This celebration season post covers installation of the VirtualBox guest additions on Fedora while using yum to update the kernel sources.

The steps were tested in Fedora 13 (GNOME), Fedora 14 (GNOME), and Fedora 15 (XFCE and KDE). A common problem in installing the guest additions on a new copy of Fedora is the guest additions install will complain about missing kernel sources. These steps show how to update the kernel sources to fix this problem and allow a successful install of the guest additions.

OS Set Up and Installation of Guest Additions

1) First update the kernel by typing following command.

yum -y update kernel 

The latest kernel will be downloaded and updated.

2) Type following command after the kernel update.

yum -y install kernel-devel kernel-headers dkms gcc gcc-c++ 

After that, restart the Fedora virtual machine (VM).

3) Go to devices in VirtualBox console and select Install Guest additions.

This action will mount the VirtualBox guest additions and it will be visible on your desktop if it mounted successfully. Alternatively, you can find it in the file system (e.g. /media/VBox Additions CD).

4) Open a console terminal. Change directory to the Vboxadditions CD and run the following command.

sudo sh 

Note: To run sudo you must be part of the /etc/sudoers file – e.g.

# User privilege specification
yourusername    ALL=(ALL) ALL

or part of a Unix/Linux administration group.

5) It is possible after running the VirtualBox additions that you still need to install the current kernel-devel (files used for building kernel modules) in yum. In which case, the VBox additions install will tell you what to install (see an example below). After installing the kernel-devel, try running the VirtualBox additions installation again (sudo sh VBoxLinuxAdditions).

Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were 
not found. 
If the following module compilation fails then 
this could be the reason.
The missing package can be probably be installed with
yum install kernel-devel-2.6.32-100.28.5.el6.x86_64

Check the installation log to verify everything works.

Shared Folders

If you’re using shared folders, check the VirtualBox documentation on using them. Usually the thing you have to do after setting up your host to share folders with the Fedora guest is to add the Linux user you are using to the vboxsf user group.

for example, use the command:

usermod -a -G vboxsf your_user_name

After adding your account to the vboxsf group, logout and then login again. You should be able to access the shared folders in the /media/ folder.

Add a user to a group

Usermod is a command to change a user’s account settings.To add a user to a group, use the following:
$ usermod -a -G newGroup username
Make sure to use the -a option so the user is added to newGroup while continuing to be a member of other groups. Otherwise the user is removed from all groups and only added to newGroup.

Fix Audio Quality Issues in Windows Movie Maker 2.6

Fix Audio Quality Issues in Windows Movie Maker 2.6

If you are experiencing low, degraded, or bad audio quality in the movies you created in Windows Movie Maker 2.6 (MM 2.6), check out possible solutions below.

The solutions are aimed at when you are adding audio to a movie such as adding soundtracks with wav and mp3 files. The quality of these input audio files may be high, but for some reason the output file (movie file you save) and the movie preview (storyboard or timeline) in MM has worse audio quality than the audio files you used for the soundtrack of the movie.

Check existing codecs

Playback issues for movies are often related to codecs installed on your machine. Codecs are likely the cause of most sound input issues since MM may use different codecs for playback when the audio files are in your collections as supposed to when the audio file is now part of your soundtrack. Solving issues with codecs is difficult since everyone computer will have different ones installed and being used during the MM preview and playback. Possible solutions are:

  1. Observe if codec icons show up during movie playback or preview. Check the options for these codec icons.
  2. Change audio codecs: you could uninstall audio codecs being used and use the Window defaults or install new audio codecs.
  3. For advanced users, use a tool like G-Spot and check if you have the required codecs for an audio file installed.

Check Windows Movie Maker filters

In Windows Movie Maker, try going to “Tools > Options > Compatibility” and unchecking all the filters ending in .ax. It is possible these .ax filters are causing low audio quality in the movie preview and saving. This solution is common if you have installed a bunch of new codecs and filters. Also, if audio quality was fine before and now is low, it may be due to installation of new filters.

When saving the movie…

Check audio export settings during saving of movie

After you have completed your editing in MM and are ready to save your movie, look in “other settings” and select the appropriate audio settings. Note configuration of settings may work best with WMV output and may not solve problems with people saving to DV formats.

Convert soundtrack files to stereo or use alternative profiles when saving

Use alternative output file profiles (either the Windows Movie Maker defaults or custom profiles) within MM when saving the movie. Sometimes your audio may be configured to be mono only or stereo only which affects the soundtrack in the saved movie. WMV formats may allow more customization.

Audio file tuning

Here are possible solutions to common audio problems. They may not be useful if you really have codec issues, but can work if there are problems with the audio files used for your movie soundtrack.

  • If using MP3s, convert MP3s to wav. Use Audacity/TMPGEnc if you need to convert audio channels on sound files (e.g. mp3, wav) used in your soundtrack.
  • Play around with MP3 bitrate: e.g. if MP3 is at 256Khz, reduce it to 192Kbps @ 44.1kHz.