Posts

ISCSI Linux

1> Add pacakge yum install iscsi-initiator-utils 2> Edit conf file vi /etc/iscsi/iscsid.conf 3> Start the ISCSI /etc/init.d/iscsi start 4> Discover targets iscsiadm -m discovery -t sendtargets -p /etc/init.d/iscsi restart 5> Check device fdisk -l

Cisco IP Sec

crypto isakmp policy 2 authentication pre-share crypto isakmp key cisco123 address 172.16.1.1 crypto ipsec transform-set ASA-IPSEC esp-des esp-sha-hmac crypto map SDM_CMAP_1 1 ipsec-isakmp description Tunnel to172.16.1.1 set peer 172.16.1.1 set transform-set ASA-IPSEC match address 100 interface FastEthernet0 ip address 172.17.1.1 255.255.255.0 duplex auto speed auto crypto map SDM_CMAP_1 access-list 100 remark SDM_ACL Category=4 access-list 100 remark IPSec Rule access-list 100 permit ip 10.20.10.0 0.0.0.255 10.10.10.0 0.0.0.255 ! ! ! !--- This ACL 110 identifies the traffic flows using route map access-list 110 deny ip 10.20.10.0 0.0.0.255 10.10.10.0 0.0.0.255 access-list 110 permit ip 10.20.10.0 0.0.0.255 any route-map nonat permit 10 match ip address 110 debug crypto isakmp debug crypto ipsec show crypto isakmp sa show crypto ipsec sa terminal monitor terminal no monitor clear crypto ipsec ? clear crypto isakmp show processes cpu show interfaces show interfaces switching ...

Config NETAPP CIFS

Configure NETAPP CIFS: 1> workgroup (local account) useradmin to create local user with same UID/Password 2> Windows 2000 DC Do nothing (just run cifs setup) 3> Windows NT/2000 DC Create computer and user ID in the windows NT Then just run: cifs setup

Oracle impdp

# impdp system/ @>ORACLE_SID> commit=y full=y show=y Location: SQL> select owner, directory_name, directory_path from dba_directories where directory_name like 'DATA_PU%'; OWNER DIRECTORY_NAME ------------------------------ ------------------------------ DIRECTORY_PATH -------------------------------------------------------------------------------- SYS DATA_PUMP_DIR /u01/app/oracle/admin/linpe9004/dpdump/

Linux iptable static NAT

modprobe iptable_nat echo 1 > /proc/sys/net/ipv4/ip_forward # Please make a note # eth0 -- internet interface # eth1 -- private interface # PREROUTING statements for 1:1 NAT # (Connections originating from the Internet) iptables -t nat -A PREROUTING -d PUBLIC_IP -i eth0 -j DNAT --to-destination PRIVATE_IP # POSTROUTING statements for 1:1 NAT # (Connections originating from the home network servers) iptables -t nat -A POSTROUTING -s PRIVATE_IP -o eth0 -j SNAT --to-source PUBLIC_IP # POSTROUTING statements for Many:1 NAT # (Connections originating from the entire home network) iptables -t nat -A POSTROUTING -s PRIVATE_SUBNET/24 -j SNAT -o eth0 --to-source ETH0_IP # Allow forwarding to each of the servers configured for 1:1 NAT # (For connections originating from the Internet. Notice how you # use the real IP addresses here) iptables -A FORWARD -p tcp -i eth0 -o eth1 -d PIP -m multiport --dports 80,443,22 \ -m state --state NEW -j ACCEPT # Allow forwarding for all New and Esta...

Linux iptables static NAT

modprobe iptable_nat echo 1 > /proc/sys/net/ipv4/ip_forward # Please make a note # eth0 -- internet interface # eth1 -- private interface # PREROUTING statements for 1:1 NAT # (Connections originating from the Internet) iptables -t nat -A PREROUTING -d PUBLIC_IP -i eth0 -j DNAT --to-destination PRIVATE_IP # POSTROUTING statements for 1:1 NAT # (Connections originating from the home network servers) iptables -t nat -A POSTROUTING -s PRIVATE_IP -o eth0 -j SNAT --to-source PUBLIC_IP # POSTROUTING statements for Many:1 NAT # (Connections originating from the entire home network) iptables -t nat -A POSTROUTING -s PRIVATE_SUBNET/24 -j SNAT -o eth0 --to-source ETH0_IP # Allow forwarding to each of the servers configured for 1:1 NAT # (For connections originating from the Internet. Notice how you # use the real IP addresses here) iptables -A FORWARD -p tcp -i eth0 -o eth1 -d PIP -m multiport --dports 80,443,22 \ -m state --state NEW -j ACCEPT # Allow forwarding for all New and Esta...

Rebuild Oracle EM

A. On both nodes stop dbconsole emctl stop dbconsole B. Drop DBConsole manaully Step 1: Drop AQ related objects in the SYSMAN schema Logon SQLPLUS as user. Bypass any errorSYSMAN SQL> exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'MGMT_NOTIFY_QTABLE',force =>TRUE); Step 1:Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects: SQL> exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'SYSMAN.MGMT_NOTIFY_QTABLE',force =>TRUE); SQL> EXEC sysman.emd_maintenance.remove_em_dbms_jobs; SQL> EXEC sysman.setEMUserContext('',5); SQL> REVOKE dba FROM sysman; SQL> DECLARE CURSOR c1 IS SELECT owner, synonym_name name FROM dba_synonyms WHERE table_owner = 'SYSMAN'; BEGIN FOR r1 IN c1 LOOPIF r1.owner = 'PUBLIC' THEN EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM 'r1.name; ELSE EXECUTE IMMEDIATE 'DROP SYNONYM 'r1.owner'.'r1.name; END IF; END LOOP; END;/ SQL> DROP USER mgmt_view CASCADE; S...