Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Thursday, October 13, 2011

How to add BlackBerry Java Plug-in for Eclipse Update Site

Installation instructions

If you’re using Java® 2 SDK, Standard Edition v6.0, obtain Update 16 of the Java 2 SDK v6.0 from the Oracle® website before downloading the plug-in using the Eclipse Update Mechanism.

  1. From the Help menu, select Install New Software to open the Install window.
  2. Click the Add button:
    1. In the Add Site dialog, type the URLhttp://www.blackberry.com/go/eclipseUpdate/3.6/javainto the location text box and specify BlackBerry Java Plug-in Update Site in the name text box.
    2. Click the OK button, BlackBerry Update Site appears in the Available Software list.
  3. Select the BlackBerry Java Plug-in item and at least one BlackBerry Component Pack item you want to work on.
  4. Click the Next button.
  5. Click the Next button after reviewing the items to be installed.
  6. Check the I accept the terms of the license agreement radio button after reviewing licenses.
  7. Click the Finish button to begin installation.
  8. Note: you'll need to enter your BlackBerry® Developer Zone login ID and password in an authentication dialog. Due to security policy, you may be authenticated multiple times. If you don’t have a BlackBerry Developer Zone login, register for access to the BlackBerry Developer Zone.
  9. After successfully downloading the files, you’ll be prompted to restart the Eclipse Platform. Choose to restart the platform.

Software versions (new updates available as of May 31, 2011)

To verify you’re using the latest version of the BlackBerry Java Plug-in for Eclipse or BlackBerry Java SDK:

  1. In Eclipse, go to Help and select About Eclipse.
  2. Click on Installation Details.
  3. Under the Installed Software Tab, check to see if you have the latest versions:
    • BlackBerry Java SDK v7.0 (updated May 31, 2011)
    • BlackBerry Java SDK v5.0.0.25
    • BlackBerry Java SDK v4.7.0.57 (updated July 9, 2010)
    • BlackBerry Java SDK v4.6.1.49 (updated July 9, 2010)
    • BlackBerry Java SDK v4.6.0.23 (updated July 9, 2010)
    • BlackBerry Java SDK v4.5.0.28 (updated July 9, 2010)

Technical requirements

  • Eclipse 3.6 Helios
  • 32-bit Windows® XP or Windows 7 (Note: 64-bit versions require 32-bit Java and Eclipse)
  • Monitor with a resolution of 1024 x 768 or higher
  • PC with Intel® Pentium® 4 processor or compatible (2.5 GHz or higher, 2 GB RAM, 1.5 GB HD free)
  • Java SE Development Kit (JDK) 6, update 14 or later


Friday, September 16, 2011

How to install Google Chrome on Ubuntu 11.04

Installing Google Chrome on Ubuntu 11.04

Google Chrome can be installed in many ways, on Ubuntu 11.04. Here I’ll explain few simple methods. You can also install Chromium (almost similar to Google Chrome), it is available in Ubuntu Software Center or Synaptic Package Manager. Just follow the steps -

step #1 : Go to its official website and download the Debian Package. Google Chrome version 10.x.* is the latest one.

Download the Google Chrome for Ubuntu 11.04

step #2 : Open the saved file with Ubuntu Software Center (Right Click on the Package, then select Open With USC; click on install Button to proceed) or Use the dpkg command to install the package. To install from the command line, type the command given below and enter your login password to proceed.

sudo dpkg -i google-chrome-stable_current_i386.deb

step #3 : That’s all.. No more steps.. Enjoy surfing with Chrome.

Thursday, September 15, 2011

How to Install Ubuntu Netbook Edition with Wubi Installer

Ubuntu is one of the most popular versions of Linux, and their Netbook Remix edition is especially attractive for netbook owners. Here we’ll look at how you can easily try out Ubuntu on your netbook without a CD/DVD drive.

Netbooks, along with the growing number of thin, full powered laptops, lack a CD/DVD drive. Installing software isn’t much of a problem since most programs, whether free or for-pay, are available for download. Operating systems, however, are usually installed from a disk. You can easily install Windows 7 from a flash drive with our tutorial, but installing Ubuntu from a USB flash drive is more complicated. However, using Wubi, a Windows installer for Ubuntu, you can easily install it directly on your netbook and even uninstall it with only a few clicks.

Getting Started

Download and run the Wubi installer for Ubuntu (link below). In the installer, select the drive you where you wish to install Ubuntu, the size of the installation (this is the amount dedicated to Ubuntu; under 20Gb should be fine), language, username, and desired password. Also, from the Desktop environment menu, select Ubuntu Netbook to install the netbook edition. Click Install when your settings are correct.

sshot-434

Wubi will automatically download the selected version of Ubuntu and install it on your computer.

sshot-437

Windows Firewall may ask if you want to unblock Wubi; select your network and click Allow access.

sshot-438

The download will take around an hour on broadband, depending on your internet connection speed. Once the download is completed, it will automatically install to your computer. If you’d prefer to have everything downloaded before you start the install, download the ISO of Ubuntu Netbook edition (link below) and save it in the same folder as Wubi.

image

Then, when you run Wubi, select the netbook edition as before and click Install. Wubi will verify that your download is valid, and will then proceed to install from the downloaded ISO. This install will only take about 10 minutes.

sshot-443

Once the install is finished you will be asked to reboot your computer. Save anything else you’re working on, and then reboot to finish setting up Ubuntu on your netbook.

sshot-444

When your computer reboots, select Ubuntu at the boot screen. Wubi leaves the default OS as Windows 7, so if you don’t select anything it will boot into Windows 7 after a few seconds.

sshot-547

Ubuntu will automatically finish the install when you boot into it the first time. This took about 12 minutes in our test.

sshot-554

When the setup is finished, your netbook will reboot one more time. Remember again to select Ubuntu at the boot screen. You’ll then see a second boot screen; press your Enter key to select the default.

sshot-2010-05-17-[11-36-08]

Ubuntu only took less than a minute to boot in our test. When you see the login screen, select your name and enter your password you setup in Wubi. Now you’re ready to start exploring Ubuntu Netbook Remix.

sshot-2010-05-17-[11-38-48]

Using Ubuntu Netbook Remix

Ubuntu Netbook Remix offers a simple, full-screen interface to take the best advantage of netbooks’ small screens. Pre-installed applications are displayed in the application launcher, and are organized by category. Click once to open an application.

image

The first screen on the application launcher shows your favorite programs. If you’d like to add another application to the favorites pane, click the plus sign beside its icon.

image

Your files from Windows are still accessible from Ubuntu Netbook Remix. From the home screen, select Files & Folders on the left menu, and then click the icon that says something like 100GB Filesystem under the Volumes section.

image

Now you’ll be able to see all of your files from Windows. Your user files such as documents, music, and pictures should be located in Documents and Settings in a folder with your user name.

image

You can also easily install a variety of free applications via the Software Installer.

image

Connecting to the internet is also easy, as Ubuntu Netbook Remix automatically recognized the WiFi adaptor on our test netbook, a Samsung N150. To connect to a wireless network, click the wireless icon on the top right of the screen and select the network’s name from the list.

image

And, if you’d like to customize your screen, right-click on the application launcher and selectChange desktop background.

image

Choose a background picture you’d like.

image

Now you’ll see it through your application launcher. Nice!

image

Most applications are opened full-screen. You can close them by clicking the x on the right of the program’s name.

image

You can also switch to other applications from their icons on the top left. Open the home screen by clicking the Ubuntu logo in the far left.

image

Changing Boot Options

By default, Wubi will leave Windows as the default operating system, and will give you 10 seconds at boot to choose to boot into Ubuntu. To change this, boot into Windows and enter Advanced system settings in your start menu search.

image

In this dialog, click Settings under Startup and Recovery.

image

From this dialog, you can select the default operating system and the time to display list of operating systems. You can enter a lower number to make the boot screen appear for less time.

image

And if you’d rather make Ubuntu the default operating system, select it from the drop-down list.

image

Uninstalling Ubuntu Netbook Remix

If you decide you don’t want to keep Ubuntu Netbook Remix on your computer, you can uninstall it just like you uninstall any normal application. Boot your computer into Windows, open Control Panel, click Uninstall a Program, and enter ubuntu in the search box. Select it, and click Uninstall.

image

Click Uninstall at the prompt. Ubuntu uninstalls very quickly, and removes the entry from the bootloader as well, so your computer is just like it was before you installed it.

sshot-2010-05-17-[11-51-59]

Conclusion

Ubuntu Netbook Remix offers an attractive Linux interface for netbooks. We enjoyed trying it out, and found it much more user-friendly than most Linux distros. And with the Wubi installer, you can install it risk-free and try it out on your netbook. Or, if you’d like to try out another alternate netbook operating system, check out our article on Jolicloud, another new OS for netbooks.

Links

Download Wubi Installer for Windows

Download Ubuntu Netbook Edition


Monday, September 12, 2011

How to Universal USB Installer – Easy as 1 2 3

Universal USB Installer is a Live Linux USB Creatorthat allows you to choose from a selection of Linux Distributions to put on your USB Flash Drive. The Universal USB Installer is easy to use. Simply choose a Live Linux Distribution, the ISO file, your Flash Drive and, Click Install. Other features include; Persistence (if available), and the ability to fat32 format the flash drive (recommended) to ensure a clean install. Upon completion, you should have a ready to run bootable USB Flash Drive with your select Linux version installed.

Universal USB Installer (UUI) Screenshots

Universal USB Installer Steps
Universal USB Installer - Progress Window

Universal-USB-Installer-1.8.6.3.exe – September 7, 2011 – Changes

Updated to use newer syslinux for UBCD, Added Leenux, Uberstudent, and OpenSUSE 11.4 LXDE entries.


Tq http://www.pendrivelinux.com

Tuesday, September 6, 2011

Top 5 emergency antivirus recovery live CDs

Data recovery live CD

If a computer has been infected with a virus and refuses to boot or when it does malware kicks in stopping you from running a virus scanner,using an antivirus live CD will bypass the need to boot the operating system helping you to remove any callous rootkit. There are various Linux based live CDs that allow for data recovery, the antivirus live CDs below have specifically been designed to remove persistent viruses and they are user friendly, meant to be used as a last resort when everything else fails or to save you time if you are a computer administrator.

To use an emergency recovery disk all you have to do is to burn the .iso to blank media, insert the CD rom inside the optical drive, reboot your computer making sure CD-drive is the first booting device in the BIOS and you are in, the live CD will scan your computer for viruses once it boots.

Dr Web live CD: When you boot the CD it detects all disk drives automatically without the need to mount them, you can select a folder or disk to be scanned, the included Midnight Commander file browser allows you to copy any file to an external device and help is available from Dr. Web by email. This live CD lets you check your RAM memory for errors with the Memtest86+ utility making sure that your problem is not a hardware fault.

AVG Rescue CD: It comes with antivirus and antispyware, it defines itself as a portable version of AVG antivirus inside a Linux distribution, you can use it to move files to an external device, test RAM memory, edit registry keys and ping network devices to see if they are reachable, everything is free and it comes with the latest virus signatures database.

AVG antivirus live CD

AVG antivirus live CD

PCTools live CD: Officially named Alternate Operating System Scanner, this antivirus live CD will detect and remove rootkits and other difficult to delete malware, it uses the Spyware Doctor antivirus engine to scan your files and Windows registry, if it finds something it cleans it up warning you of the location and the virus name.

F-Secure Rescue CD: A customized Knoppix Linux distribution made by F-Secure to remove persistent malware, any virus you have in your operating system will be useless against F-Secure Rescue CD, first of all because it runs on Linux and secondly because the operating system in your main hard drive will not be active, the live CD can be used for data recovery too.

F-Secure emergency recovery live CD

F-Secure emergency recovery live CD

Avira Rescue System: Linux based live CD to scan your computer for viruses, Avira antivirus database is updated several times a day, this is a good live antivirus CD to catch the latest exploit, once malware has been detected the live CD will automatically remove it saving yourself time reinstalling the whole operating system.


Tq http://www.hacker10.com/

Sunday, October 24, 2010

Howto: Ubuntu Linux convert DHCP network configuration to static IP configuration

Your main network configuration file is /etc/network/interfaces

Desired new sample settings:
=> Host IP address 192.168.1.100
=> Netmask: 255.255.255.0
=> Network ID: 192.168.1.0
=> Broadcast IP: 192.168.1.255
=> Gateway/Router IP: 192.168.1.254
=> DNS Server: 192.168.1.254

Open network configuration file
$ sudo vi /etc/network/interfacesOR$ sudo nano /etc/network/interfaces

Find and remove dhcp entry:
iface eth0 inet dhcp

Append new network settings:

iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254

Save and close the file. Restart the network:
$ sudo /etc/init.d/networking restart

Task: Define new DNS servers

Open /etc/resolv.conf file
$ sudo vi /etc/resolv.conf

You need to remove old DNS server assigned by DHCP server:
search myisp.com
nameserver 192.168.1.254
nameserver 202.54.1.20
nameserver 202.54.1.30

Save and close the file.

Task: Test DNS server

$ host cyberciti.biz

Network command line cheat sheet

You can also use commands to change settings. Please note that these settings are temporary and not the permanent. Use above method to make network changes permanent or GUI tool as described below.

Task: Display network interface information

$ ifconfig

Task: Take down network interface eth0 / take a network interface down

$ sudo ifconfig eth0 downOR $ sudo ifdown eth0

Task: Bring a network interface eth0 up

$ sudo ifconfig eth0 upOR$ sudo ifup eth0

Task: Change IP address and netmask from command line

Activate network interface eth0 with a new IP (192.168.1.50) / netmask:
$ sudo ifconfig eth0 192.168.1.50 netmask 255.255.255.0 up

Task: Display the routing table

$ /sbin/route OR$ /sbin/route -n
Output:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 ra0
172.16.114.0 * 255.255.255.0 U 0 0 0 eth0
172.16.236.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.1.254 0.0.0.0 UG 0 0 0 ra0

Task: Add a new gateway

$ sudo route add default gw 172.16.236.0

Task: Display current active Internet connections (servers and established connection)

$ netstat -nat

Task: Display open ports

$ sudo netstat -tulpOR$ sudo netstat -tulpn

Task: Display network interfaces stats (RX/TX etc)

$ netstat -i

Task: Display output for active/established connections only

$ netstat -e
$ netstat -te
$ netstat -tue

Where,

  • -t : TCP connections
  • -u : UDP connections
  • -e : Established

Task: Test network connectivity

Send ICMP ECHO_REQUEST to network hosts, routers, servers etc with ping command. This verifies connectivity exists between local host and remote network system:
$ ping router
$ ping 192.168.1.254
$ ping cyberciti.biz

See simple Linux system monitoring with ping command and scripts for more information.

Task: Use GUI (Graphical Configuration) network Tool

If you are new, use GUI configuration tool, type the following command at terminal:
$ network-admin &

Above command is Ubuntu's GUI for configuring network connections tool.

Final tip - Learn how find out more information about commands

A man page is your best friend when you wanted to learn more about particular command or syntax. For example, read detailed information about ifconfig and netstat command:
$ man ifconfig
$ man netstat

Just get a short help with all command options by appending --help option to each command:
$ netstat --help

Find out what command is used for particular task by searching the short descriptions and manual page names for the keyword:
$ man -k 'delete directory'
$ apropos -s 1 remove

Display short descriptions of a command:
$ whatis rm
$ whatis netstat

Linux offers an excellent collection of utilities, which can be use to finding the files and executables, remember you cannot memorize all the commands and files ;)

How do I find out my DHCP server address?

Q. In Windows XP / 2000 / Vista ipconfig /all command will show me DNS server and DHCP server ip address. But, how to know DHCP server address in Linux?

A. The DHCP protocol allows a host to contact a central server which maintains a list of IP addresses which may be assigned on one or more subnets. A DHCP client may request an address from this pool, and then use it on a temporary basis for communication on network.

dhclient.leases file

Under Linux you use command dhclient to obtain and managing dhcp tasks. In order to keep track of leases across system reboots and server restarts, dhclient keeps a list of leases it has been assigned in the dhclient.leases file. On startup, after reading the dhclient.conf file, dhclient reads the dhclient.leases file to refresh its memory about what leases it has been assigned.

When a new lease is acquired, it is appended to the end of the dhclient.leases file. In order to prevent the file from becoming arbitrarily large, from time to time dhclient creates a new dhclient.leases file from its in-core lease database. The old version of the dhclient.leases file is retained under the name dhclient.leases~ until the next time dhclient rewrites the database.

Find out DHCP server address

Usually dhclient.leases file is located at /var/lib/dhcp3/dhclient.leases, type the following command:
less /var/lib/dhcp3/dhclient.leases
OR
cat /var/lib/dhcp3/dhclient.leases
Alternatively, you can just use grep command to get DHCP server address, enter:
grep dhcp-server-identifier /var/lib/dhcp3/dhclient.leases
Output:

lease {  
interface "ra0";
fixed-address 192.168.1.106;
option subnet-mask 255.255.255.0;
option dhcp-lease-time 86400;
option routers 192.168.1.1;
option dhcp-message-type 5;
option dhcp-server-identifier 192.168.1.1;
option domain-name-servers 208.67.222.222,208.67.220.220;
option dhcp-renewal-time 43200;
option dhcp-rebinding-time 75600;
option host-name "vivek-desktop";
renew 0 2007/12/9 05:17:36;
rebind 0 2007/12/9 15:06:37;
expire 0 2007/12/9 18:06:37;
}

lease {
interface "ra0";
fixed-address 192.168.1.106;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
option dhcp-lease-time 86400;
option dhcp-message-type 5;
option domain-name-servers 208.67.222.222,208.67.220.220;
option dhcp-server-identifier 192.168.1.1;
option dhcp-renewal-time 43200;
option dhcp-rebinding-time 75600;
option host-name "vivek-desktop";
renew 0 2007/12/9 06:11:22;
rebind 0 2007/12/9 16:13:50;
expire 0 2007/12/9 19:13:50;
}

A note about RHEL / CentOS / Fedora Linux user

Redhat and friends uses /var/lib/dhcp/dhclient.leases file:
less /var/lib/dhcp/dhclient.leases

Tuesday, October 19, 2010

How to find MAC address

MAC address of your computer

Windows 2000 / XP / 2003 / 2008 / Vista / Windows 7

  1. Open a Command Prompt window by clicking the Start button, clicking Programs or All Programs, clicking Accessories, and then clicking Command Prompt.
  2. In the Command Prompt window type ipconfig /all
  3. Find the Physical Address line under the section that describes your network adapter. MAC address is listed as six groups of two hexadecimal digits, separated by hyphens (-).
C:\Documents and Settings\admin>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : mypc
Primary Dns Suffix . . . . . . . : domain.local
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : domain.local

Ethernet adapter Wireless Network Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/Wireless 3945ABG Network Connection
Physical Address. . . . . . . . . : 00-13-02-80-92-7A
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.0.3
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.1
Lease Obtained. . . . . . . . . . : Sunday, February 15, 2008 3:19:03 PM
Lease Expires . . . . . . . . . . : Friday, February 20, 2008 3:19:03 PM

Ethernet adapter Local Area Connection:

Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Intel(R) PRO/1000 PL Network Connection
Physical Address. . . . . . . . . : 00-0E-7B-89-C4-E0

Ethernet adapter Local Area Connection 2:

Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Bluetooth Personal Area Network from TOSHIBA
Physical Address. . . . . . . . . : 00-03-7A-F3-6C-E7

Windows Vista / Windows 7 / Windows 2008 (Full Installation only)

  1. Open a Command Prompt window by clicking the Start button, clicking Programs or All Programs, clicking Accessories, and then clicking Command Prompt.
  2. In the Command Prompt window type getmac (or getmac /v if your computer has more than one network adapter).
  3. MAC address is listed as six groups of two hexadecimal digits, separated by hyphens (-) in the beginning of the line.
C:\Users\admin>getmac
Physical Address Transport Name
=================== ==========================================================
00-21-85-0C-52-A3 \Device\Tcpip_{4B89E525-B2FE-4E02-B769-D671265BBDE6}

LINUX

  1. Open a terminal or console window.
  2. In the window type ifconfig
  3. MAC address is marked as HWaddr and listed as six groups of two hexadecimal digits, separated by colon (:).
root@host:~# ifconfig
eth1 Link encap:Ethernet HWaddr 00:10:5A:0D:5A:A5
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::210:5aff:f00d:5bb5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1206866 errors:54423 dropped:0 overruns:0 frame:81536
TX packets:941228 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:332783971 (317.3 MiB) TX bytes:214601237 (204.6 MiB)
Interrupt:10 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1573 errors:0 dropped:0 overruns:0 frame:0
TX packets:1573 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:99765 (97.4 KiB) TX bytes:99765 (97.4 KiB)

Apple Mac OS X 10.2-10.6

  1. Launch Finder, open Applications folder, then open Utilities folder and start Terminal.
  2. In the Terminal window type ifconfig
  3. Find the ether line under the section that describes your network adapter. MAC address is listed as six groups of two hexadecimal digits, separated by by colon (:).
host:~ user$ ifconfig
lo0: flags=8049 mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
gif0: flags=8010 mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863 mtu 1500
ether 00:25:bc:de:96:74
media: autoselect status: inactive
supported media: none autoselect 10baseT/UTP 10baseT/UTP 10baseT/UTP 10baseT/UTP 100baseTX 100baseTX 100baseTX 100baseTX 1000baseT 1000baseT 1000baseT
fw0: flags=8863 mtu 4078
lladdr 00:25:bc:ff:fe:de:98:64
media: autoselect status: inactive
supported media: autoselect
en1: flags=8863 mtu 1500
inet6 fe80::225:ff:fe4e:a73d%en1 prefixlen 64 scopeid 0x6
inet 192.168.0.101 netmask 0xffffff00 broadcast 192.168.0.255
ether 00:25:00:4e:a8:39
media: autoselect status: active
supported media: autoselect

MAC address of a system connected to the same subnet as your computer

Windows 2000 / XP / 2003 / 2008 / Vista / Windows 7

  1. Open a Command Prompt window by clicking the Start button, clicking Programs or All Programs, clicking Accessories, and then clicking Command Prompt.
  2. In the Command Prompt window type ping
    Replace with an IP address of the system you want to find MAC address.
  3. In the same Command Prompt window type arp -a
    MAC address is listed in the Physical Address column as six groups of two hexadecimal digits, separated by hyphens (-).
C:\Documents and Settings\User>ping 192.168.0.1

Pinging 192.168.0.1 with 32 bytes of data:

Reply from 192.168.0.1: bytes=32 time<1ms TTL=127
Reply from 192.168.0.1: bytes=32 time<1ms TTL=127
Reply from 192.168.0.1: bytes=32 time<1ms TTL=127
Reply from 192.168.0.1: bytes=32 time<1ms TTL=127

Ping statistics for 192.168.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\User>arp -a

Interface: 192.168.0.101 --- 0x2
Internet Address Physical Address Type
192.168.0.1 00-17-9a-46-7c-a3 dynamic

LINUX

  1. Open a terminal or console window.
  2. In the window type ping -c1
    Replace with an IP address of the system you want to find MAC address.
  3. In the same window type arp
    MAC address is listed in the HWaddress column as six groups of two hexadecimal digits, separated by colon (:).
root@host:~# ping -c1 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=127 time=4.22 ms

--- 192.168.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 4.223/4.223/4.223/0.000 ms
root@host:~# arp
Address HWtype HWaddress Flags Mask Iface
192.168.0.1 ether 00:17:9A:46:7C:A3 C eth1

MAC address of your Smart Phone / Mobile device

iPhone / iPod Touch

  1. Tap Settings. Select General and then About.
  2. Scroll down until you find Wi-Fi Address line. Wi-Fi Address line shows MAC address as six groups of two hexadecimal digits, separated by colon (:).

iPad

  1. Tap Settings. Select General on the left side and then About on the right.
  2. Find the Wi-Fi Address line. Wi-Fi Address line shows MAC address as six groups of two hexadecimal digits, separated by colon (:).

Monday, September 27, 2010

Apache Web Server Security

The increase in cyber attacks on high profile online business websites implies that web security still needs to be addressed. Exploits of web server vulnerabilities typically have a more disastrous and visible impact. While with web application vulnerabilities a malicious user could gain access to a database and other form of stored data, with web server software vulnerabilities, a malicious user could even gain access to the operating system, potentially compromising the whole network.

A brief introduction to Apache web server

The Apache Foundation released Apache Version 2 in 2002, following on the success of Apache Web Server version 1. Version 2 was almost a total rewrite, which mostly focused on further modularization and development of the Apache core. Apache Version 2 has several improvements, which include Unix threading, IP version 6 support and most importantly of all, better support for non-Unix platforms, such as Microsoft Windows. These improvements helped Apache web server to become the first web server used to host over 100 million websites and web applications on the internet, thus being the most widely used web server.

Securing Apache web server

The following suggestions will go a long way in improving the security of an Apache web server installation. Despite applying the ‘less is better’ rule to harden a web server by disabling a number of modules, it will not be enough. It is still recommended to apply all security patches in case a disabled module is enabled in the future.

Limit server functionality

One must first be aware of which function or functions the web server will be used for. Will it serve HTML pages only, or also execute a number of scripts? Enabling support for PHP, ASP.NET and other similar web technologies will only increase the attack surface which a malicious user could penetrate. This might happen because of vulnerabilities in a specific web server module. Therefore one should only support web technologies which are going to be used.

Limit access to operating system and its files

The operating system on which the Apache web server will be running must also be hardened. For more information on how to secure a web server operating system, click here. It is important that the Apache web server process runs under a unique user ID, which must not be used by any other system processes. Apache processes must also have limited access to the operating system files (chrooting). Chrooting is the process of creating a new root directory structure where all Apache daemon files are moved to. As a result of the chrooting process, the Apache web server daemon will only have access to the new directory structure. No shell programs e.g. /bin/sh, /bin/csh/ should be present in the Apache’s chrooted environment. This way the web server benefits immunity from a large number of existing exploits.

Disable unnecessary web server modules

Apache is shipped with a number of pre-enabled modules to be more user friendly. This is a bit of a break from its Unix past of only providing the essential. In this case, the ‘less is better’ rule is to be applied with more diligence and the choice of which module to enable is probably the most important step. An administrator would avoid potential break-ins simply by disabling unnecessary modules when new vulnerabilities are found in them. Check about every pre-enabled module to confirm if it is needed, and if not, disable it.

Tighten the Apache configuration

The default Apache configuration contains a large number of directives that are not used in a typical scenario. One can safely switch off or disable the directives listed below if not being used:

  • directory indexes
  • unnecessary default ‘Alias’ and 'ScriptAlias’
  • Handlers (only leave handlers which you will be using. Remove all others)
  • Directory Options such as ‘FollowSymLinks’ (if no symbolic links are used in the web directories)

Friendly web server error messages should also be configured, to make sure that the least amount of information is disclosed about the Apache web server installation and configuration. If possible, the web server banner should also be obfuscated (security by obscurity).

Disable Server Sides Includes

SSIs bring along a number of potential security risks with them. Most important of all, SSI-enabled web documents will severely increase the load on the server. In high traffic websites or in a shared web hosting environment, such load can become very significant. Furthermore, server sides includes pose the same number of risks associated with CGI (Common Gateway Interface) scripts in general. SSI-enabled files, can execute any CGI script or program under the permissions of the user which the Apache web server runs on, thus posing a huge security risk. A number of web technologies that avoid using SSI and transfer the processing required to the client / browser side are available today. A web master should take advantage of such web technologies.

Monitor log files

Proper web application access and web server operation logging should be enabled. Such logs should not be placed in the web server root directory. As with any other internet service, it is important to check all of Apache’s log files regularly. Analysing past events from web server log files, will give the administrator a good idea of what attack trends are being followed. This will also help the administrator identify where the web server needs tightening up.

Install all Apache web server updates

From time to time, Apache Foundation release a number patches. It is always a good practice to keep the Apache web server installation up to date, despite of whether the patch is a security patch, or a software update. Subscribe to a mailing list such as ‘Apache Server Announcements’ to receive notifications of when updates and patches are available. Such mailing lists are hosted by the Apache Foundation.

Stay informed and frequently check the web server configuration

A number of books, online security guidelines articles and white papers are available to help an administrators secure an Apache web server installation and implement the above security suggestions, which are however universal. It is suggested to read such articles and follow the guidelines. After applying such changes, it is also important to test the web server’s and web application’s functionality, to confirm that such changes did not hinder any of the web application’s functionality. The use of third party security tools, such as Acunetix WVS can help confirm that the applied procedures did improve your web server security. Acunetix WVS will also launch a number of security checks against an Apache web server, and will also check for weak configurations. Take a product tour of Acunetix Web Vulnerability Scanner or download it today!

Thursday, August 26, 2010

Apt-fast and Axel: Faster apt-get Installations and Upgrades

Apt-fast script that combines the power of the axel download manager with the stability of apt-get.


Install axel in ubuntu

First you need to install axel in ubuntu using the following comamnd from your terminal

sudo apt-get install axel

Now you need to download apt-fast script from here.Then, just place the script somewhere (/usr/bin or /usr/sbin is ideal), rename it to apt-fast (without the .sh extension)

sudo mv apt-fast.sh apt-fast

now you need to change the permissions to downloaded script

sudo chmod +x apt-fast

Using apt-fast

Once done, just use it like apt-get. To install a single package, make sure your database is up to date (apt-fast update), and run apt-fast install packagenamehere. Watch it download with incredible speed, and install your requested packages. To upgrade or dist-upgrade, do the same thing. Just use apt-fast dist-upgrade or apt-fast upgrade.

Should your download stall for any number of reasons, you’ll need to do an apt-fast clean.

Enjoy ubuntu... ;)

How to install Axel in ubuntu

Axel

Axel is a command-line downloader for unix-like operating systems. Unlike wget, axel includes download acceleration, whicThis program tries to accelerate the downloading process by using multiple connections for one file. Starting from version 0.97, the program can use multiple mirrors for one download as well. The program tries to be as light as possible (25-30k in binary form), so it might be useful as a wget clone on byte-critical systems.

Install axel in Ubuntu

sudo aptitude install axel


Enjoy ubuntu... ;)

Sunday, July 25, 2010

How to WebDAV on Ubuntu 9.04 Server

WebDAV is a file manager that running on web server. You can access it like on your desktop. Easy and enjoyable.

Install Ubuntu 9.04 server as usual and select LAMP and OpenSSH when asked for choice. You can also install vsFTPd if you want to but it is optional.

Step 1 :

sudo a2enmod dav_fs
sudo a2enmod dav
sudo a2enmod dav_lock

sudo a2dissite default

sudo /etc/init.d/apache2 restart

Step 2 :

To create a virtual host for the WebDAV.

sudo mkdir -p /var/www/webdav
chown www-data /var/www/webdav

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/webdav

sudo nano /etc/apache2/sites-available/webdav

Make the a portion of the file as the following :


....
DocumentRoot /var/www/webdav

   Options Indexes FollowSymLinks MultiViews
   AllowOverride None
   Order allow,deny
   allow from all


   DAV On
   AuthType Basic
   AuthName "webdav"
   AuthUserFile /var/www/.passwd.dav
   Require valid-user
   DavMinTimeout 600
   
      Require valid-user
   


....

Step 3 :

sudo htpasswd -c /var/www/.passwd.dav samiux

chown root:www-data /var/www/.passwd.dav
chmod 640 /var/www/.passwd.dav

suod chmod -R 0777 /var/www/webdav
sudo chown www-data:www-data /var/www/webdav

sudo /etc/init.d/apache2 restart

Step 4 :

To test if WebDAV works or not.

sudo apt-get install cadaver

sudo cadaver http://localhost/

If you got “dav:/” prompt, enter “quit” to quit. Otherwises, fix the problem.

Step 5 (Windows only) :

Download NetDrive at http://www.netdrive.net/ and set it accordingly. The port should be 80.

Now you can access your WebDAV server from Windows.

Step 6 (Ubuntu only) :

Go to “Place” > “Connect to Server“. Select “WebDAV (HTTP)“. Enter the IP of your WebDAV server and then press “Connect“. Submit the username and password. An icon will be displayed on your desktop. Double click it and go.

Now you can access your WebDAV server from Ubuntu.


OpenOffice
If you open the OpenOffice files on the WebDAV by clicking, you can only open it in read only mode. However, there is method to overcome this problem. You open OpenOffice Write (for example), click the “Open file” and at the “Name of file” enter the following :

vnd.sun.star.webdav://192.168.0.100/openoffice_readonly_on_webdav.odt

Now you can edit and save it on WebDAV.

Limitation of WebDAV

You can paste a file onto WebDAV directly but there is a file size limitation, that is, the file should be less than 1GB. If you want to paste a file larger than 1GB, I suggest to use FTP instead.

Make sure to change the ownership of the files that you have uploaded by FTP.

sudo chown -R www-data:www-data /var/www/webdav


Enjoy ubuntu... ;)

kunkun-laptop .... ;)