Mount and Umount ISO with lofi command (Solaris) 
Mount:


# lofiadm -a /path/to/cd.iso
/dev/lofi/1
# mount -o ro -F hsfs /dev/lofi/1 /mnt


Unmount:


# umount /mnt
# lofiadm -d /dev/lofi/1


[ add comment ] ( 6 views )   |  [ 0 trackbacks ]   |  permalink
Mail pretending to be sent from your domain? SPF! 
Mail servers usually have no method how to verify valid server which is authorized to send emails from concrete domain. Unless they do use SPF record mechanism. SPF stands for "Sender Permitted From"; SPF record says who is responsible for SENDING mail for a specific domain. (Note the MX record is primary designed to inform the world who is responsible for RECEIVING mail for a domain).

How to tell the world the only authorized mail servers (mail senders) for our domain? Via the DNS.

The example below says: if the mail claims to be from someone in ourdomain.org the mail must be sent from the MX server for this domain. The a: record can be used to specify other hosts authorized to sent mail as well (other than hosts with the regular MX record). Those are -all the server. No exceptions.

ourdomain.org

TXT "v=spf1 mx a:yetanother.mailserver.com -all"



Some nice short reading about SPF:
http://www.openspf.org/Introduction

Official:
http://www.openspf.org/

To test SPF settings:
http://www.kitterman.com/spf/validate.html


Note: SPF records should also be published in DNS as type SPF records. This is new and most implementations do not support it yet.

Please consider to implement SPF to your mail server while receiving mail as well.




[ add comment ] ( 3 views )   |  [ 0 trackbacks ]   |  permalink
Notes on Veritas FS 

Find out where the diskgroup is imported (on which host)

vxdisk -s list

Start all the volumes in diskgroup

vxvol -g <dg> startall

Import/Deport pool

vxdg deport <dg> # deport pool from host
vxdg import <dg> -C # C switch clears hostid
vxdg import <dg> -f # F force import?

List disks/diskgroup/details

vxdisk list # shows disks
vxdg list # shows dg
vxinfo -g <dg> # show volumes in the groups



[ add comment ] ( 3 views )   |  [ 0 trackbacks ]   |  permalink
Installing Oracle Database 11g Release 1 on Linux - (RHEL 5) 
http://www.idevelopment.info/data/Oracl ... l#Overview


[ add comment ] ( 5 views )   |  [ 0 trackbacks ]   |  permalink
Disable yum kernel updates in CentOS Linux 

echo "exclude = kernel*" >> /etc/yum.conf


[ add comment ] ( 3 views )   |  [ 0 trackbacks ]   |  permalink
Allow vsftpd to use passive mode 
The design of the FTP protocol relies on two channels. One channel is dedicated to ftp commands (ls, pwd, get, bi, ha) and the other for data transfer only.

FTP protocol originally required ( after the command channel from client to server established - client conneced to port 21 ) server to connect from it's port ( 20 ) to the client's assigned data port ( above 1024 ). This mode nowadays called as "active mode" had problems with various network masquerades and client firewalls as well (because server issues CONNECTion to CLIENT).

Therefore, the other, PASSIVE mode was added to the FTP, which doesn't require server to send syn packet to client. The process works the way the client issues connection from some high-port ( > 1024 ) to FTP server ( to the data port 21 ), then for data transfer client will again sends ack to the FTP server to some of the server's high ports.

When your FTP server is firewalled, you will need to allow both modes, as some clients still have some firewalls in the way which prevent the active mode access.

To allow passive mode in vfstpd (which is the default ftpd in CentOS) you should add lines below to the vsftpd.conf. Vsftpd will use the port range specified to assign data channels in passive mode. One port to one client data connection.


pasv_enable=yes
pasv_max_port=20000
pasv_min_port=20050


Plus, if you host has the standard CenOS/RedHat firewall on you should add the lines which will allow client to connect the server's high port. The required port range in iptables is specified by colon ( 20000:20050 ).



[ add comment ] ( 4 views )   |  [ 0 trackbacks ]   |  permalink
The Nocturnes memo 
A long time ago Michael Kenna was interviewed by Tim Baskerville about night photography. As I would like to keep Michael's time suggestion, I'm pasting it here. The whole article can be foud at: http://www.thenocturnes.com/resources/kenna.html

"On the first few night sessions students work with one manual camera, one lens set at f5.6, a tripod, cable release, flash light, paper, pencil, and Tri-X film (Tri-X is iso 400). I give basic starting points (i.e. an exposure in the city with direct street lighting-5 second exposure, in the city with indirect street lighting-1 minute, city open spaces with distant lighting-5 minutes, landscape outside the city-30 minutes, etc.), they will bracket one and two stops plus and minus, writing every exposure down, noting as many details as possible about the lighting conditions at the time. I suggest that they process their film 20% less than their usual development time. I think the initial hurdle involved in photographing at night is in getting comfortable with the equipment and the environment - it really is quite different from photographing during the day."

[ add comment ] ( 7 views )   |  [ 0 trackbacks ]   |  permalink
iSCSI scratchpad 

# zpool create pool c1t1d0 c1t2d0

# zfs create pool/iscsi

# zfs create –V 16g pool/iscsi/zvol1

# iscsitadm modify admin –base-directory /pool/iscsi

# iscsitadm create target –type disk –backing-store /dev/zvol/rdsk/pool/iscsi/zvol1

# iscsitadm list target

Target: zvol1

iSCSI Name: iqn.1986-03.com.sun:02:07d36959-03e8-495c-bc36-b79913ee0f6e.zvol1

Connections: 0


Then on the client…

# iscsiadm add static-config iqn.1986-03.com.sun:02:07d36959-03e8-495c-bc36-b79913ee0f6e.zvol1,160.7.108.11

# devfsadm


[ add comment ] ( 3 views )   |  [ 0 trackbacks ]   |  permalink
Bits & Bytes Reference 

1 bit (bit)
1 byte (B) = 8 bits
1 kibibyte (KiB) = 2^10 bytes = 1,024 bytes
1 mebibyte (MiB) = 2^20 bytes = 1,048,576 bytes
1 gibibyte (GiB) = 2^30 bytes = 1,073,741,824 bytes
1 tebibyte (TiB) = 2^40 bytes = 1,099,511,627,776 bytes
1 pebibyte (PiB) = 2^50 bytes = 1,125,899,906,842,624 bytes
1 exbibyte (EiB) = 2^60 bytes = 1,152,921,504,606.846,976 bytes
1 zebibyte (ZiB) = 2^70 bytes = 1,180,591,620,717,411,303,424 bytes
1 yobibyte (YiB) = 2^80 bytes = 1,208,925,819,614,629,174,706,176 bytes


For further reference use:
http://www.romulus2.com/articles/guides ... ytes.shtml


[ add comment ] ( 4 views )   |  [ 0 trackbacks ]   |  permalink
Simple Solaris iptraf like script 
How to monitor interface throughput on Solaris machine? I was looking for some sort of Linux's IPtraf (which is a great ip traffic monitor which can show you more than just interface traffic throuput) for Solaris. Seems no IPtraf port or similar text utility for Solaris so far. The script below should help you a bit and show the interface throughput.

It only prints out througput of the interface in 5 second intervals. If your system's interface is named ce0 instead of hme0, you need to change the script 'hme:0:hme0:*bytes' to 'ce:0:ce0:*bytes'.


#!/usr/bin/bash

WAIT=5

# traffic monitor
# writes total number of bytes (traffic) per interval

I_BYTES_OLD=`kstat -p 'hme:0:hme0:*bytes' | grep rbytes | awk -F" " '{ print $2}'`
O_BYTES_OLD=`kstat -p 'hme:0:hme0:*bytes' | grep obytes | awk -F" " '{ print $2}'`

while true
do
DATE=`date +%m/%d/%y" "%H:%M:%S`

I_BYTES=`kstat -p 'hme:0:hme0:*bytes' | grep rbytes | awk -F" " '{ print $2}'`
O_BYTES=`kstat -p 'hme:0:hme0:*bytes' | grep obytes | awk -F" " '{ print $2}'`

I_BYTES_DIFF=`echo $I_BYTES - $I_BYTES_OLD | bc`
O_BYTES_DIFF=`echo $O_BYTES - $O_BYTES_OLD | bc`

I_BYTES_OLD=$I_BYTES
O_BYTES_OLD=$O_BYTES

T_BYTES=`echo $I_BYTES_DIFF + $O_BYTES_DIFF | bc`

sleep $WAIT
clear
echo "$DATE interface: hme0 input: $I_BYTES_DIFF output: $O_BYTES_DIFF totalBytes: $T
_BYTES"
done


[ add comment ] ( 3 views )   |  [ 0 trackbacks ]   |  permalink

<<First <Back | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Next> Last>>