Posts

VMware change IP

Modify /etc/hosts (ip) Modify /etc/sysconfig/network (IP & gateway Modify /etc/sysconfig/network-scripts/ifcfg-vswif[number]. By default, it should be 0 Or you can change it on fly: ifconfig ifcfg-vswif0 inet netmask broadcast up Useful tips (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1000266): To delete and recreate a virtual switch and Service Console from the command line: Note: On your system the vswif, vmnic, vSwitch numbers and network settings are different. 1. Run the following command to list the name of the vswif adapter: # esxcfg-vswif -l 2. Run the following command to delete the vswif adapter: # esxcfg-vswif --del vswif0 3. Run the following command to list the name of the vSwitch: # esxcfg-vswitch -l 4. Run the following command to delete the vSwitch: # esxcfg-vswitch -d vSwitch0 5. Run the following command to create the vSwitch: # esxcfg-vswitch -a vSwitch0 6. Run the following commands to create de...

ftp MLSD Connection timed out

Here is the error message: Command: MLSD Error: Connection timed out Error: Failed to retrieve directory listing Check the firewall. It happens to me that I have to open inbound and outbound traffic. Disable the firewall first and try if it works.

Linux iptables firewall

If you could not access the local computer, please check the firewall. By the default, the firewall allows all on Lo interface for the incoming package How about outbound? You need to open the outbound traffic for Lo interface, too iptables -L -nv --line-numbers iptables -v -I OUTPUT 1 -i LO -j ACCEPT

SFTP

The latest version OpenSSH (5.9p1) supports SFTP chroot 1> download OpenSHH & OpenSSL (which might need zlib -- yum install zlib-devel) 2> run the following commands: ./configure, make & make install 3> Modify the /etc/init.d/sshd to point to new SSH location 4> restart the sshd to make sure it works 5> modify sshd_config Match Group sftponly ChrootDirectory /home/%u ForceCommand internal-sftp AllowTcpForwarding no OR Match user USRT_ID useradd -s /bin/flase USER_NAME chown -R UID:GID /home/User_name chown root:root /home/User_name chmod 755 /home/User_name

Liunx Firewall

/sbin/iptables [-A|-I|-D] [OUTPUT|INPUT|FORWARD] [LINE_NUMBE] -p [protocol] --[dports|sport] PORT_NUMBER -J [DROP/EJECT/ACCEPT] Firewall log 1> Log file kern.warning /var/log/iptables.log >> /etc/syslog.conf 2> restart syslog daemon service syslogd restart Useful tip: /etc/init.d/iptables save (save to /etc/sysconfig/iptables) Save/restore the rules iptables-save > /root/iptables-save.out iptables-restore -c /root/iptables-save.out Firewall Code: # with a maximum of 15 log entries per minute /sbin/iptables -A INPUT -m limit --limit 15/minute -j LOG \ --log-level 7 --log-prefix "Dropped by firewall: " /sbin/iptables -A OUTPUT -m limit --limit 15/minute -j LOG \ --log-level 7 --log-prefix "Dropped by firewall: " # Reject any packets that do not meet the specified criteria /sbin/iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset /sbin/iptables -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable iptables -A INPUT -s 64.55.11.2 -m...

Load Oracle on NFS remote FS

No soft option due to lock a file Must Hard

HPUX

HPUX, HPUX 11V2, by default, did start NFS lockd. To endbale: cd etc/rc.config.d/nfsconf LOCKD_RESV_PORT=1 LOCKD_AUTHSYS_CRED=1