Posts

Showing posts from April, 2008

Difference between tagged and untagged interfaces on BIG-IP

Tagged Interfaces: - use if you want to connect more than 1 Vlan for this interface - A tagged interface is an interface that you assign to a VLAN in a way that causes the system to add a VLAN tag into the header of any frame passing through that interface. - Tagged interfaces are used when you want to assign a single interface to multiple VLANs. Untagged Interfaces: - use if you want to connect only 1 Vlan for this interface

Setting SSH Gateway with iptables

Case : user smiertx allow access ssh and ping on 10.10.10.0/24 and 10.10.20.0/24 networks user ikhyar only allow access ssh and ping on 10.10.10.11 and 10.10.20.11 servers Edit iptables config file # vi /etc/sysconfig/iptables # Firewall configuration written by system-config-securitylevel # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :RH-Firewall-1-INPUT - [0:0] :smiertx - [0:0] :ikhyar - [0:0] -A INPUT -j RH-Firewall-1-INPUT -A FORWARD -j RH-Firewall-1-INPUT -A OUTPUT -m owner --gid-owner smiertx -j smiertx -A OUTPUT -m owner --gid-owner ikhyar -j ikhyar -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited -A smiertx -d 10.10.10.0/255.255.255.0 -j A...

Setting Cisco Switch 2960G 24TC-L

Would you like to terminate autoinstall? [yes]: Y --- System Configuration Dialog --- Would you like to enter the initial configuration dialog? [yes/no]: no Switch>ena Switch#config t Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname Switch1 Switch1(config)#enable secret xxxxx Switch1(config)#service password-encryption Switch1(config)#username admin password xxxxx Switch1(config)#exit Switch1#configure t Enter configuration commands, one per line. End with CNTL/Z. Switch1(config)#vtp mode transparent Setting device to VTP TRANSPARENT mode. Switch1(config)#spanning-tree mode pvst Switch1(config)#end Switch1#vlan database % Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. Switch1(vlan)#vlan 200 name internal VLAN 200 added: Name: internal Switch1(vlan)#vlan 201 name eksternal VLAN 201 added: Name: eksternal Switch1(vl...

Install Oracle Client 10g.2 Solaris Sparc 64

# mkdir -p /app/oraclient # chown -R oracle:oinstall /app/oraclient # chmod -R 775 /app/oraclient Login to Xwindow with user "oracle". $ gunzip 10gr2_client_sol.cpio.gz $ cpio -idm

Re-installing Oracle Database 10g.2 Solaris Sparc 64

# rm -rf /app/* # rm -rf /oradata/* edit appropriate value on this files you can delete both files # vi /var/opt/oracle/oraInst.loc inventory_loc=/app/oracle/oraInventory inst_group=oinstall # vi /var/opt/oracle/oratab *:/app/oracle/product/10.2.0/Db_1:N: # reboot after this just follow step my previous post Thanks to Anam for helping me.

Install Oracle Database 10g.2 Solaris Sparc 64

# /usr/sbin/groupadd oinstall # /usr/sbin/groupadd dba # /usr/sbin/useradd -g oinstall -G dba oracle # passwd -r files oracle # vi /etc/system -------------- set noexec_user_stack=1 set semsys:seminfo_semmni=100 set semsys:seminfo_semmns=1024 set semsys:seminfo_semmsl=256 set semsys:seminfo_semvmx=32767 set shmsys:shminfo_shmmax=4294967295 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=100 set shmsys:shminfo_shmseg=10 # reboot # vi /etc/passwd ------------- oracle:x:100:100::/home/oracle:/bin/sh ------------- # mkdir /home/oracle # cp /etc/skel/* /home/oracle # cd /home/oracle # cp local.profile .profile # cp local.login .login # chown -R oracle:bin /home/oracle # mkdir -p /app/oracle # mkdir -p /oradata # chown -R oracle:oinstall /app/oracle # chown -R oracle:oinstall /oradata # chmod -R 775 /app/oracle # chmod -R 755 /oradata # prctl -n project.max-shm-memory -v 6gb -r -i project user.root # prctl -n project.max-sem-ids -v 256 -r -i project user.root # su - oracle $ vi .login ...

Unlocked root/user account on HP-UX 11.23 ia64

Login as any user $ sudo su - Password: ****** Execute this command, this only work on HP-UX. This command is not available on Solaris & Linux. #/usr/lbin/modprpw –l –k root or #/usr/lbin/modprpw –l –k smiertx

Memory Information on HP-UX 11.23 ia64

View swap memory allocated on your system # swapinfo -tam View portion of virtual memory available to server # vmstat View virtual and real memory usage # glance

Ethernet Card Information on HP-UX 11.23 ia64

View Ethernet card information # lanscan View Ethernet card capability on 10/100Base or 1000Base #ioscan –funC lan View Ethernet Settings, include speed and mode # lanadmin -x instance For example : # lanadmin -x 0 # lanadmin -x 1 etc ... You can run this command to view network config # netstat -in Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll lan0:1 1500 192.168.200.0 192.168.200.12 0 0 0 0 0 lan0 1500 192.168.200.0 192.168.200.11 7802 0 6122 0 0 lo0 4136 127.0.0.0 127.0.0.1 8745 0 8745 0 0

All Machine Information on HP-UX 11.23 ia64

Just run this command # machinfo CPU info: Number of CPUs = 1 Clock speed = 1600 MHz Bus speed = 400 MT/s CPUID registers vendor information = "GenuineIntel" processor serial number = 0x0000000000000000 processor version info = 0x000000001f020204 architecture revision: 0 processor family: 31 Intel(R) Itanium 2 Family Processors processor model: 2 Intel(R) Itanium 2 processor processor revision: 2 Stepping A2 largest CPUID reg: 4 processor capabilities = 0x0000000000000001 implements long branch: 1 Bus features implemented = 0xbdf0000060000000 selected = 0x0000000040000000 Bus Lock Signal masked Cache info: L1 Instruction: size = 16 KB, associativity = 4 L1 Data: size = 16 KB, associativity = 4 L2 Unified: size = 256 KB, associativity = 8 L3 Unified: ...

Installing Depot files on HP-UX 11.23 ia64

Download your depot files from http://hpux.connect.org.uk/ based on your machine type. Download it, for example : bash-3.2-ia64-11.23.depot.gz, put it on /tmp. Install it with 2 option : 1. It will display SAM # swinstall -s /tmp/bash-3.2-ia64-11.23.depot.gz 2. It don't display SAM, so you get quick way # swinstall -s /tmp/bash-3.2-ia64-11.23.depot.gz bash Don't forget to install dependencies for this depot file, it's different from Redhat, who will reject rpm that missed dependencies. HP-UX accept all depots without any warning, but you must install dependencies yourself. You can know dependencies on http://hpux.connect.org.uk/, when you download, look at any dependencies for this depot file. Check depot files that already installed on your system # swlist Somehow any error happened when installing from directory another than /tmp, for example : /data. You should register that directory to depot. # cd /data # swreg -l depot `pwd` If it still fails, look at my post before a...

Setting Hostname on HP-UX 11.23 ia64

Edit /etc/hosts, remember don't add any hostname on line "127.0.0.1 .......". It will make sam take so long time to begin. Remember also that after IP Address use tab to separate with name of host. # vi /etc/hosts 127.0.0.1 localhost loopback 10.10.10.1 devserv Make nodename value same as hostname # uname -S devserv Don't forget to edit /etc/rc.config.d/netconf # vi /etc/rc.config.d/netconf ---------------- HOSTNAME="devserv" --------------- After that restart network with # /sbin/init.d/net stop # /sbin/init.d/net start Check your hostname and nodename now ... # hostname # nodename

Setting IP Address on HP-UX 11.23 ia64

Edit file on /etc/rc.config.d/netconf ---------------------- INTERFACE_NAME[0]=lan0 IP_ADDRESS[0]="192.168.200.17" SUBNET_MASK[0]="255.255.255.0" BROADCAST_ADDRESS[0]="192.168.200.255" INTERFACE_STATE[0]="" DHCP_ENABLE[0]=0 ---------------------- Restart network with # /sbin/init.d/net start