How to set Static Ip address on Debian BOX

Posted by Simson on April 24th, 2009

This is also another important stuff to read, i atempted to forgot how it setup so i publish it so next time i just open my own blog i can read this article:

To configure a static IP (an IP that will never change) in debian you must edit the file
/etc/networking/interfaces and put the following:

CODE

# /etc/network/interfaces — configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card – this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
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

The last section is the most important, the top may or may not be the same so don’t play with it unless you get an error. In this case the IP of the server is 192.168.1.10 so if you run it as a DNS server for example, you can set that in your router’s config and not worry about it changing.

To apply this configuration type /etc/init.d/networking restart

You’ll get a message that it’s restarting the network interface, then you’ll get booted off ssh (because the IP changed) so reconnect using the new IP and it should work.

In red hat this file is /etc/sysconfig/network-scripts/ifcfg-eth0 and you would put this in it:

CODE

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

Using gParted to Resize your Vista HDD

Posted by Simson on April 7th, 2009

One
of the more advanced options for resizing your Windows
Vista partition is to use the GParted Live CD, a
bootable
linux CD that takes you straight into GParted, the great linux utility
for managing partitions. The problem is that if you resize your
boot/system partition, you will be completely unable to boot without
repairing windows.

First make sure that you have a bootable Windows Vista
installation
DVD, as you will be unable to use your computer if you don’t. Next,
download the GParted
Live CD
and burn it to cd.

Boot off the GParted cd, and you will see your hard drives in
the
drop-down list. The first drive is typically your boot drive, but you
can check the Flags column to make sure.

image

Next you’ll need to right-click on
the partition and choose Resize/Move from the menu.

image

Now you can either use the New Size textbox, or just
click and
drag the partition to make it smaller (or bigger). When you are done,
click the Resize/Move button.

image

This doesn’t immediately apply the changes, though. You can
make
other changes to your partitions and then when you are finished click
the Apply button.

image9

Depending on the amount of data and the speed of your
computer, it
can take quite a while to resize the partitions. On my computer it took
more than 30 minutes.

image

Once it’s done, quit, remove the live cd and then
reboot your
computer. Unless you are very lucky, you’ll be greeted with this
horrible error message saying “Windows Failed to start. A recent
hardware or software change might be the cause.”

File: \Windows\system32\winload.exe
Status: 0xc0000225
Info: The selected entry could not be loaded because the application is
missing or corrupt.

Here’s a screenshot of the error, but don’t worry, we’ll fix
it.

image

Insert your Windows Vista installation dvd and make sure you
boot off it. At the welcome screen click the Next button.

image

On the next screen, click the “Repair your computer” link in
the lower left hand corner.

image

The system recover options dialog will show up, and will ask
you if you want to Repair and restart, which we do.

image

If you happened to click the View details link you’ll see that
the
error is “Windows Device: Partition=Not found”, which indicates the
problem is the partition that we resized.

image

Your computer will reboot, and you’ll see Windows Vista in the
list
although it now has a different name indicating that it was recovered.

image

When Vista first starts up, it will start running a check of
the
disk. Whatever you do, don’t hit any keys here because we want the
system to check the disk.

image

Once it’s done it will reboot, and you’ll have Vista back up
and running again!

image

If you want to rename the Windows Vista entry in the list back
to normal, you can use VistaBootPro

Configuring Antispam Exchange 2007

Posted by Simson on March 22nd, 2009

Exchange 2007 has continued to improve upon its Anti Spam features with each version of the product. In this article I want to focus on installing and configuring the antispam agent on a hub transport server.
By default the agents are not installed on the hub role since this server is intended to be a down stream server behind an Exchange Edge Server. Throughout the article you will see that some features can be manged via EMC and a number of features must be managed via EMS.

Installing Anti Spam Agents
By default the Anti Spam agents are not installed on the hub servers ***these must be installed on each hub that you want to utilze the agents ****

Open EMC
Organizational Configuration
Select the Hub Transport Server
EMC
As you can see there is no reference to the anti spam agents

Lets go ahead and install the Agents”

1. Open EMS
2. you can change to the directory or input the path to the powershell script (I chose to change to the directory) Change to C:\progroam files\Microsoft\Exchange Server\Scripts (assuming install directory is default)
3. ./install-AntiSpamAgents.ps1
Installation on EMS
After the agents are installed the Transport Service needs to be restarted

Lets go back to EMC–Organizational Configuration — Hub Transport
EMC Antispam Tab appears
We now have an Anti Spam Tab with a number of items to configure

CONFIGURATION:
Now that we have installed our Anti Spam Agents lets take a look at what we can configure. Some configuration can only be done from EMS and some can be done from both EMS and EMC.
Content Filtering
IP Allow List
IP Allow List Providers
IP Block List
IP Block List Providers
Recpient Filtering
Sender Filtering
Sender ID
Sender Reputation

Content Filtering:
When the Content Filter agent is enabled on a computer, the Content Filter agent filters all messages that come through all Receive connectors on that computer. Only messages that come from external sources are filtered. External sources are defined as non-authenticated sources that are considered anonymous Internet sources.

http://technet.microsoft.com/en-us/library/bb124739.aspx

Content filter provides us with 3 tabs that we can configure
1. Custom Words
2. Exceptions
3. Action

Protected: 17 August 2007

Posted by Simson on March 13th, 2009

This post is password protected. To view it please enter your password below:


HP-UX: Disk and Filesystem tasks

Posted by Simson on March 3rd, 2009

Search for attached disk

ioscan -fnC disk

Initialize a disk for use with LVM

pvcreate -f /dev/rdsk/c0t1d0

Create the device structure needed for a new volume group.

cd /dev
mkdir vgdata
cd vgdata
mknod group c 64 0×010000

Create volume group vgdata

vgcreate vgdata /dev/dsk/c0t1d0

{ if your expecting to use more than 16 physical disks use the -p option, range from 1 to 256 disks. }

Display volume group vgdata

vgdisplay -v vg01

Add another disk to volume group

pvcreate -f /dev/rdsk/c0t4d0

vgextend vg01 /dev/dsk/c0t4d0

Remove disk from volume group

vgreduce vg01 /dev/dsk/c0t4d0

Create a 100 MB logical volume lvdata

lvcreate -L 100 -n lvdata vgdata
newfs -F vxfs /dev/vgdata/rlvdata

Extend logical volume to 200 MB

lvextend -L 200 /dev/vgdata/lvdata

Extend file system to 200 MB

{ if you don’t have Online JFS installed volumes must be unmounted before you can extend the file system. }

fuser -ku /dev/vgdata/lvdata { kill all process that has open files on this volume. }

umount /dev/vgdata/lvdata
extendfs /data

{ for Online JFS, 200 MB / 4 MB = 50 LE; 50 x 1024 = 51200 blocks }

fsadm -F vxfs -b 51200 /data

Set largefiles to support files greater than 2GB

fsadm -F vxfs -o largefiles /data

Exporting and Importing disks across system.

1. make the volume group unavailable

vgchange -a n /dev/vgdata

2. Export the the disk while creating a logical volume map file.

vgexport -v -m data_map vgdata

3. Disconnect the drives and move to new system.

4. Move the data_map file to the new system.

5. On the new system recreate the volume group directory

mkdir /dev/vgdata
mknod /dev/vgdata/group c 64 0×02000

6. Import the disks to the new system

vgimport -v -m data_map /dev/vgdata /dev/dsk/c2t1d0 /dev/dsk/c2t2d0

7. Enable the new volume group

vgchange -a y /dev/vgdata

Renaming a logical volume

/dev/vgdata/lvol1 -> /dev/vgdata/data_lv

umount /dev/vgdata/lvol1
ll /dev/vgdata/lvol1 take note of the minor ( e.g 0×010001 )
brw-r—– 1 root root 64 0×010001 Dec 31 17:59 lvol1

mknod /dev/vgdata/data_lv b 64 0×010001 create new logical volume name
mknod /dev/vgdata/rdata_lv c 64 0×010001

vi /etc/fstab { reflect the new logical volume }
mount -a

rmsf /dev/vgdata/lvol1
rmsf /dev/vgdata/rlvol1


Copyright © 2007 Free Cookies for Linux & Windows. All rights reserved.