Popular Posts

May 18, 2017

Oracle Database Installation - Solaris Operating System


Anonymous Port Ranges
#Rule A00402: anon port range OK? (tcp_smallest_anon_port, tcp_largest_anon_port, udp_smallest_anon_port, udp_largest_anon_port)
           ipadm set-prop -p smallest_anon_port=9000 tcp
           ipadm set-prop -p largest_anon_port=65500 tcp
           ipadm set-prop -p smallest_anon_port=9000 udp
           ipadm set-prop -p largest_anon_port=65500 udp

WARNING => UDP socket receive buffer size is not set to recommended value of 65536
WARNING => UDP socket send buffer size is not set to recommended value of 65536
DATA FROM JUDI-DEV-001 - UDP SOCKET RECEIVE BUFFER SIZE
DATA FROM JUDI-DEV-001 - UDP SOCKET SEND BUFFER SIZE
recv_buf = 57344
send_buf = 57344
send_buf and recv_buf==>65536
           ipadm set-prop -p send_buf=65536 udp
           ipadm set-prop -p recv_buf=65536 udp
           ipadm show-prop udp
           ipadm show-prop tcp

#Oracle DBA Installation in solaris 10
           /usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000
           /usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65500
           /usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000
           /usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500

#A02210 Kernel Parameters OK FAILED  SHMMAXTooSmall
           projmod -s -K "project.max-shm-memory=(priv,19327352832,deny)" user.oracle    (18GB - set as pet DBA request)
           prctl -n project.max-shm-memory -t privileged  $$

#A02020 ulimits OK?          FAILED  NoFilesSoftTooSmall
WARNING => Oracle database software owner soft nofile shell limits is not configured according to recommendation
DATA FROM JUDI-DEV-001 - ORACLE DATABASE SOFTWARE OWNER SOFT NOFILE SHELL LIMITS
oracle user'ssoft nofile shell limit = 256
The soft nofile shell limit for the Oracle DB software install owner should be >= 1024
           projmod -s -K "process.max-file-descriptor=(basic,1024,deny)" user.oracle
           ulimit -sa (Check the below value - should be 1024 from 256)
           nofile                         (-n)  1024

#A00110 ulimits OK?          FAILED  StackHardUnlimited (ulimit -Sa - check stack value)
#A02020 ulimits OK? FAILED StackHardUnlimited (ulimit -Ha - check stack value)
WARNING => Oracle database software owner soft stack shell limit is configured according to recommendation
DATA FROM JUDI-DEV-001 - ORACLE DATABASE SOFTWARE OWNER SOFT STACK SHELL LIMITS
oracle user's soft stack shell limit = 8192
The soft stack shell limit for the Oracle DB software should be >= 10240.If the soft stack limit is 10240 or above then the configuration should be OK.
oracle user's soft stack shell limit = unlimited
The Hard stack shell limit for the Oracle DB software should be = 32768.The default soft stack limit is "unlimited" Should change to  OK.
           projmod -s -K 'process.max-stack-size=(basic,10MB,deny),(privileged,32MB,deny)' user.oracle
           su - oracle -c "ulimit -Hs ; ulimit -Ss"(su to oracle and Check the below value - Should be 10240) OR
           ulimit -Ss and ulimit -Hs
           stack size (Kibytes)           (-s)  10240

#A00320 /etc/hosts Format    FAILED  No entry found
#host file entry should be in the below format
           192.168.1.20   judi-dev-01.corporate.com   judi-dev-01  loghost

#A00330 Kernel Parameters OK FAILED  NOEXEC_USER_STACKUndef
Update the below values in /etc/system and reboot the server
           set noexec_user_stack = 1
           set noexec_user_stack_log = 1
           forceload: sys/shmsys
           forceload: sys/semsys
           chmod 644 /etc/system

# oracheck for oracle installation
           cd /opt/oracle//work/RDA/rda/
           sh -x ./rda.sh -T hcve 
           Select the required Oracle database version option to do the pre-check

Find Oracle RAC cluster service is running or not
           ps -ef | grep crsd.bin | grep -v grep
           /opt/oracle/12.1.0.2/grid/bin/crsd.bin reboot    (This Process will run in RAC Cluster Nodes)

Find Oracle RAC Partner Nodes
           . oraenv
           +ASM1    (should be ASM2 if we execute in other node {ps -ef | grep asm})

           olsnodes
           
Unix command to find Oracle version number
           cat /var/opt/oracle/oratab | grep prod





~
soft limit maximum stack size solaris 11
~

Check and Disable weak SSH Cyphers and HMAC Algorithms


APPLIES TO : Solaris Operating System - Version 10 3/05 to 11.3

GOAL : This document explains how to determine which SSH Cyphers and HMAC Algorithms are in use by the SSH client/server and how to configure/limit these.

SOLUTION : To check for the offered ciphers and HMAC algorithms of an ssh server, you can use the command 'ssh -vvv remote_host' and verify the debug output of the session.
This will tell you which ciphers and HMAC algorithms are available on the client and server side. It will also tell you which one will be use after the negotiation.

Script to find weak ciphers Covered in another blog

Example:
$ ssh -vvv remote_host
Sun_SSH_2.2, SSH protocols 1.5/2.0, OpenSSL 0x1000110f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to remote_host [10.163.240.26] port 22.
debug1: Connection established.
debug1: ssh_kmf_check_uri: /export/home/jack/.ssh/identity
debug1: Identity file/URI '/export/home/jack/.ssh/identity' pubkey type UNKNOWN
debug1: ssh_kmf_check_uri: /export/home/jack/.ssh/id_rsa
debug1: Identity file/URI '/export/home/jack/.ssh/id_rsa' pubkey type UNKNOWN
debug1: ssh_kmf_check_uri: /export/home/jack/.ssh/id_dsa
debug1: Identity file/URI '/export/home/jack/.ssh/id_dsa' pubkey type UNKNOWN
debug1: Logging to host: remote_host
debug1: Local user: jack Remote user: jack
debug1: Remote protocol version 2.0, remote software version Sun_SSH_2.2
debug1: match: Sun_SSH_2.2 pat Sun_SSH_2.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-Sun_SSH_2.2
debug1: use_engine is 'yes'
debug1: pkcs11 engine initialized, now setting it as default for RSA, DSA, and symmetric ciphers
debug1: pkcs11 engine initialization complete
debug1: Creating a global KMF session.
debug1: My KEX proposal before adding the GSS KEX algorithm:
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,x509v3-sign-rsa,x509v3-sign-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc
debug2: kex_parse_kexinit: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha2-256-96,hmac-sha2-512-96,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: kex_parse_kexinit: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha2-256-96,hmac-sha2-512-96,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: en-US
debug2: kex_parse_kexinit: en-US
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug1: Failed to acquire GSS-API credentials for any mechanisms (No credentials were supplied, or the credentials were unavailable or inaccessible
)
debug1: SSH2_MSG_KEXINIT sent
debug3: kex_reset_dispatch -- should we dispatch_set(KEXINIT) here? 0 && !0
debug1: SSH2_MSG_KEXINIT received
debug1: My KEX proposal I sent to the peer:
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,x509v3-sign-rsa,x509v3-sign-dss

A)======The ssh client offered the following Ciphers==========
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc

B)======The ssh client offered the following HMAC Algorithms==========
debug2: kex_parse_kexinit: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha2-256-96,hmac-sha2-512-96,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: kex_parse_kexinit: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha2-256-96,hmac-sha2-512-96,hmac-sha1-96,hmac-md5,hmac-md5-96

debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: en-US
debug2: kex_parse_kexinit: en-US
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug1: KEX proposal I received from the peer:
debug2: kex_parse_kexinit: gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g==,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss

C)=====The sshd server offered the following Ciphers===========
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour

D)======The ssh server offered or replied the following HMAC Algorithms==========
debug2: kex_parse_kexinit: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha2-256-96,hmac-sha2-512-96,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: kex_parse_kexinit: hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha2-256-96,hmac-sha2-512-96,hmac-sha1-96,hmac-md5,hmac-md5-96

debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: de-DE,en-US,es-ES,fr-FR,it-IT,ja-JP,ko-KR,pt-BR,zh-CN,zh-TW,i-default
debug2: kex_parse_kexinit: de-DE,en-US,es-ES,fr-FR,it-IT,ja-JP,ko-KR,pt-BR,zh-CN,zh-TW,i-default
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-sha2-256

E)======The Cipher and HMAC Algorithm used after the negotiation==========
debug1: kex: server->client aes128-ctr hmac-sha2-256 none
debug2: mac_setup: found hmac-sha2-256
debug1: kex: client->server aes128-ctr hmac-sha2-256 none

debug1: Host key algorithm 'ssh-rsa' chosen for the KEX.
debug1: Peer sent proposed langtags, ctos: de-DE,en-US,es-ES,fr-FR,it-IT,ja-JP,ko-KR,pt-BR,zh-CN,zh-TW,i-default
debug1: Peer sent proposed langtags, stoc: de-DE,en-US,es-ES,fr-FR,it-IT,ja-JP,ko-KR,pt-BR,zh-CN,zh-TW,i-default
debug1: We proposed langtags, ctos: en-US
debug1: We proposed langtags, stoc: en-US
debug1: Negotiated lang: en-US
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: Remote: Negotiated main locale: en_US.UTF-8
debug1: Remote: Negotiated messages locale: en_US.UTF-8
debug1: dh_gen_key: priv key bits set: 251/512
debug1: bits set: 2062/4095
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: ssh_kmf_key_from_blob: blob length is 277.
debug3: check_host_in_hostfile: filename /export/home/jack/.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
debug3: check_host_in_hostfile: filename /export/home/jack/.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
debug3: check_host_in_hostfile: filename /export/home/jack/.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
debug2: no key of type 0 for host remote_host

From the above debug output, one can see the following steps:

A) The ssh client offered the following Ciphers:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc

B) The ssh client offered the following HMAC Algorithms:
hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha2-256-96,hmac-sha2-512-96,hmac-sha1-96,hmac-md5,hmac-md5-96

C) The sshd server offered the following Ciphers:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour

D) The ssh server offered the following HMAC Algorithms:
hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha2-256-96,hmac-sha2-512-96,hmac-sha1-96,hmac-md5,hmac-md5-96

E) The Cipher and HMAC Algorithm used after the negotiation:
aes128-ctr hmac-sha2-256

If you need to configure or limit the offered ciphers, use the /etc/ssh/sshd_config file on the server side
and the /etc/ssh/ssh_config on the client side, and specify your own set in the "Ciphers ...." and/or "MACs ...." lines.

Example:
The following entries in /etc/ssh/sshd_config and /etc/ssh/ssh _config file will :

Disable the arcfour and CBC mode ciphers
Disable the MD5 and -96 MAC algorithms
           cp -p /etc/ssh/sshd_config /etc/ssh/sshd_config.`date +%d-%b-%Y-%H-%M`
           vi /etc/ssh/sshd_config
                      Ciphers aes128-ctr,aes192-ctr,aes256-ctr
                      Macs hmac-sha2-256,hmac-sha2-512,
           svcadm restart ssh


Oracle Document Reference (Doc ID 2086158.1)

Script to find weak ciphers Covered in another blog


~Judi~


Disable weak SSH Cyphers and HMAC Algorithms;
Disable weak MD5 and -96 MAC algorithms;
SSH Weak MAC Algorithms;
Solaris 10;
Solaris 11;
Ciphers aes128-ctr,aes192-ctr,aes256-ctr;
 Macs hmac-sha2-256,hmac-sha2-512;
aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc
hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha2-256-96,hmac-sha2-512-96,hmac-sha1-96,hmac-md5,hmac-md5-96;
how to disable weak ciphers in solaris 10;
failed to acquire gss-api credentials for any mechanisms;
ssh weak mac algorithms enabled;
ssh server cbc mode ciphers enabled;
How to Disable Ciphers and Reconfigure Encryption
how to enable some cipher or esclude weak cipher
encryption - SSH: How to disable weak ciphers?

Disable weak ssl ciphers HTTPD apache | Unix Sun Solaris Admin tricks

Popular Posts