sábado, 29 de junio de 2013

Ver mis Dominios Registrados en Nic.Ar

Ingresamos en la página www.nic.ar, clickeamos sobre "Trámites vía web" y luego en "Consultas" sobre "Entidades"


Ingresamos el nombre ó parte del nombre (en mi caso: mi_info), luego damos "buscar":


Seleccionamos la entidad destacada "mi_entidad" y luego "continuar"


Anotamos y recordamos el "NIC-Handle", tener en cuenta el número luego de "NICAR-E":


Una vez que obtuvimos el NIC-Handle, volvemos a "Trámites vía web", en la columna "Consultas" seleccionamos "dominios por..":


Colocamos en NICAR-E el código que dijimos que deberían recordar previamente, luego la dirección de correo y "consultar"


Nos enviará un mail con los dominios que tenemos registrados al correo que indica la imagen de abajo:



lunes, 17 de junio de 2013

Cliente LDAP - ldapclient Unix Solaris 10


1) Backup del nsswitch.conf porque lo modifica:

# cp -pf /etc/nsswitch.conf /etc/nsswitch.conf.17-06-2013
# diff /etc/nsswitch.conf /etc/nsswitch.conf.17-06-2013


2) Ver si algún servicio está caído:

# svcs -xv
#


3) Ver servicio del ldap client:

# svcs -l /network/ldap/client:default
fmri         svc:/network/ldap/client:default
name         LDAP client
enabled      true
state        online
next_state   none
state_time   Fri Apr 05 09:46:28 2013
logfile      /var/svc/log/network-ldap-client:default.log
restarter    svc:/system/svc/restarter:default
contract_id  36
dependency   require_all/none svc:/system/filesystem/minimal (online)
dependency   require_all/none svc:/network/initial (online)
#


4) Ver la config y las estadiscitas del ldap_cachemgr:

# /usr/lib/ldap/ldap_cachemgr -g
cachemgr configuration:
server debug level          0
server log file "/var/ldap/cachemgr.log"
number of calls to ldapcachemgr       1560
cachemgr cache data statistics:
Configuration refresh information:
  Configured to NO REFRESH.
Server information:
  Previous refresh time: 2013/06/17 06:10:46
  Next refresh time:     2013/06/17 17:33:26
  server: 192.168.0.1, status: UP
Cache data information:
  Maximum cache entries:          256
  Number of cache entries:          0
#


5) Vemos la config del cliente de ldap, no debemos modificar el archivo, ya que se reescribirá si se modifica:

# cat /var/ldap/ldap_client_file
#
# Do not edit this file manually; your changes will be lost.Please use ldapclient (1M) instead.
#
NS_LDAP_FILE_VERSION= 2.0
NS_LDAP_SERVERS= 172.16.72.1
NS_LDAP_SEARCH_BASEDN= dc=redes-seguridad,dc=com,dc=ar
NS_LDAP_CACHETTL= 0
NS_LDAP_CREDENTIAL_LEVEL= anonymous
NS_LDAP_SERVICE_SEARCH_DESC= passwd:ou=Users,dc=redes-seguridad,dc=com,dc=ar?one
NS_LDAP_SERVICE_SEARCH_DESC= shadow:ou=Users,dc=redes-seguridad,dc=com,dc=ar?one
NS_LDAP_SERVICE_SEARCH_DESC= group:ou=Groups,dc=redes-seguridad,dc=com,dc=ar?one
NS_LDAP_ATTRIBUTEMAP= shadow:userpassword=userPassword
NS_LDAP_SERVICE_AUTH_METHOD= pam_ldap:tls:simple


6) Modificamos el cliente con el ldapclient:

Con el man vemos los parametros que son necesarios:

# man ldapclient

Ejemplo:

example# ldapclient manual \
       -a credentialLevel=proxy \
       -a authenticationMethod=sasl/CRAM-MD5 \
       -a proxyPassword=secret \
       -a proxyDN=cn=proxyagent,ou=profile,dc=xyz,dc=mycompany,dc=com \
       -a defaultSearchBase=dc=xyz,dc=mycompany,dc=com \
       -a domainName=xyz.mycompany.com \
       -a followReferrals=false \
       -a defaultServerList=172.16.100.1:386


7) Yo para mi red utilicé los siguientes, tener en cuenta que este comando modifica el /etc/nsswitch.conf:

/# ldapclient manual \
-a defaultServerList=10.11.12.13 \
-a defaultSearchBase=dc=redes-seguridad,dc=com,dc=ar \
-a credentialLevel=anonymous \
-a serviceSearchDescriptor=passwd:ou=Users,dc=redes-seguridad,dc=com,dc=ar?one \
-a serviceSearchDescriptor=shadow:ou=Users,dc=redes-seguridad,dc=com,dc=ar?one \
-a serviceSearchDescriptor=group:ou=Groups,dc=redes-seguridad,dc=com,dc=ar?one \
-a attributeMap=shadow:userpassword=userPassword \
-a serviceAuthenticationMethod=pam_ldap:tls:simple
System successfully configured


8) Vemos que se modificó el /etc/nsswitch.conf:

# diff /etc/nsswitch.conf /etc/nsswitch.conf.17-06-2013
24c24
< hosts:      ldap [NOTFOUND=return] files
---
> hosts:      files dns ldap [NOTFOUND=return]
28c28
< ipnodes:    ldap [NOTFOUND=return] files
---
> ipnodes:    files dns ldap [NOTFOUND=return]
30,36c30,36
< networks:   ldap [NOTFOUND=return] files
< protocols:  ldap [NOTFOUND=return] files
< rpc:        ldap [NOTFOUND=return] files
< ethers:     ldap [NOTFOUND=return] files
< netmasks:   ldap [NOTFOUND=return] files
< bootparams: ldap [NOTFOUND=return] files
< publickey:  ldap [NOTFOUND=return] files
---
> networks:   files ldap [NOTFOUND=return]
> protocols:  files ldap [NOTFOUND=return]
> rpc:        files ldap [NOTFOUND=return]
> ethers:     files ldap [NOTFOUND=return]
> netmasks:   files ldap [NOTFOUND=return]
> bootparams: files ldap [NOTFOUND=return]
> publickey:  files ldap [NOTFOUND=return]
38c38
< netgroup:   ldap
---
> netgroup:   files ldap


9) Volvemos a restaurar el que habíamos backupeado previamente:

# cp -pf /etc/nsswitch.conf.17-06-2013 /etc/nsswitch.conf 


10) Reiniciamos el server porque queda algo cacheado y el ping no resuelve correctamente:

# reboot


12) Testeamos que el ldapclient tenga la config de la nueva ip:

# ldapclient list
NS_LDAP_FILE_VERSION= 2.0
NS_LDAP_SERVERS= 10.11.12.13
NS_LDAP_SEARCH_BASEDN= dc=redes-seguridad,dc=com,dc=ar
NS_LDAP_CACHETTL= 0
NS_LDAP_CREDENTIAL_LEVEL= anonymous
NS_LDAP_SERVICE_SEARCH_DESC= passwd:ou=Users,dc=redes-seguridad,dc=com,dc=ar?one
NS_LDAP_SERVICE_SEARCH_DESC= shadow:ou=Users,dc=redes-seguridad,dc=com,dc=ar?one
NS_LDAP_SERVICE_SEARCH_DESC= group:ou=Groups,dc=redes-seguridad,dc=com,dc=ar?one
NS_LDAP_ATTRIBUTEMAP= shadow:userpassword=userPassword
NS_LDAP_SERVICE_AUTH_METHOD= pam_ldap:tls:simple


13) Si queremos ver el log:

# tail -f /var/svc/log/network-ldap-client:default.log

viernes, 7 de junio de 2013

Agregar Nuevo disco a Solaris 10 en XenServer Citrix

1) Comentar en /etc/vfstab

# vim /etc/vfstab

/dev/dsk/c1d0s0 /dev/rdsk/c1d0s0 /punto/de/montaje ufs 1 yes

2) Utilizamos el comando format, si no lo vemos con format primero utilizamos el devfsam con los siguientes parámetros para que refresque los devices:

# devfsadm -Cc disk

# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0d0
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
       1. c0d1
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0
       2. c1d0
          /pci@0,0/pci-ide@1,1/ide@1/cmdk@0,0
Specify disk (enter its number): 2

selecting c1d0
Controller working list found
[disk formatted, defect list found]

FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        show       - translate a disk address
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        volname    - set 8-character volume name
        !     - execute , then return
        quit

format> part
WARNING - This disk may be in use by an application that has
          modified the fdisk table. Ensure that this disk is
          not currently in use before proceeding to use fdisk.

format> fdisk
No fdisk table exists. The default partition for the disk is:

  a 100% "SOLARIS System" partition

Type "y" to accept the default partition,  otherwise type "n" to edit the
 partition table.
y

format> part

PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        ! - execute , then return
        quit


partition> print
Current partition table (original):
Total disk cylinders available: 14356 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0                0         (0/0/0)             0
  1 unassigned    wm       0                0         (0/0/0)             0
  2     backup    wu       0 - 14355      109.97GB    (14356/0/0) 230629140
  3 unassigned    wm       0                0         (0/0/0)             0
  4 unassigned    wm       0                0         (0/0/0)             0
  5 unassigned    wm       0                0         (0/0/0)             0
  6 unassigned    wm       0                0         (0/0/0)             0
  7 unassigned    wm       0                0         (0/0/0)             0
  8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
  9 alternates    wm       1 -     2       15.69MB    (2/0/0)         32130


partition> 0
Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0                0         (0/0/0)             0

Enter partition id tag[unassigned]: ENTER
Enter partition permission flags[wm]: ENTER
Enter new starting cyl[0]: ENTER
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 109.97gb
partition>



partition> print
Current partition table (unnamed):
Total disk cylinders available: 14356 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0 - 14355      109.97GB    (14356/0/0) 230629140
  1 unassigned    wm       0                0         (0/0/0)             0
  2     backup    wu       0 - 14355      109.97GB    (14356/0/0) 230629140
  3 unassigned    wm       0                0         (0/0/0)             0
  4 unassigned    wm       0                0         (0/0/0)             0
  5 unassigned    wm       0                0         (0/0/0)             0
  6 unassigned    wm       0                0         (0/0/0)             0
  7 unassigned    wm       0                0         (0/0/0)             0
  8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
  9 alternates    wm       1 -     2       15.69MB    (2/0/0)         32130


partition> label
Ready to label disk, continue? y

partition> quit

format> label
Ready to label disk, continue? y


# mount /usr/local/apps/SDK
mount: /dev/dsk/c1d0s0 is not this fstype


# newfs /dev/dsk/c1d0s0
newfs: construct a new file system /dev/rdsk/c1d0s0: (y/n)? y
Warning: 4332 sector(s) in last cylinder unallocated
/dev/rdsk/c1d0s0:       230629140 sectors in 37538 cylinders of 48 tracks, 128 sectors
        112611.9MB in 2347 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
..............................................
super-block backups for last 10 cylinder groups at:
 229740704, 229839136, 229937568, 230036000, 230134432, 230232864, 230331296,
 230429728, 230528160, 230626592


# vim /etc/vfstab
Descomentar:

/dev/dsk/c1d0s0        /dev/rdsk/c1d0s0        /punto/de/montaje     ufs     1       yes     -


# mount /punto/de/montaje


# ls -l /punto/de/montaje
total 16
drwx------   2 root     root        8192 Jun  7 21:50 lost+found


# df -h | grep c1d0s0
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c1d0s0        108G    64M   107G     1%    /punto/de/montaje


jueves, 6 de junio de 2013

Whitelist squid without authentication


Editamos la configuración del squid (squid.conf) y agregamos el archivo donde pondremos las webs de las lista blanca:


# vim /etc/squid/squid.conf
acl whitelist dstdomain "/etc/squid/sites.whitelist.txt"
acl all src all
acl password proxy_auth REQUIRED
http_access allow whitelist
http_access allow password http_access deny all

Editamos el archivo de listas sin autenticacion de proxy:

# vim /etc/squid/sites.whitelist.txt
www.redes-seguridad.com.ar

Chequeamos la config del squid:

# squid -k check

Si no tenemos ningun error reiniciamos el squid:

# /etc/init.d/squid reload

Por ejemplo si queremos activar office sin que autentique:

# vim /etc/squid/sites.whitelist.txt
#Activacion de Office:
go.microsoft.com
activation.sls.microsoft.com