11 月 282013
 

洛杉矶

C:\>ping 50.7.103.90 -n 6

正在 Ping 50.7.103.90 具有 32 字节的数据:
来自 50.7.103.90 的回复: 字节=32 时间=183ms TTL=51
来自 50.7.103.90 的回复: 字节=32 时间=178ms TTL=51
来自 50.7.103.90 的回复: 字节=32 时间=182ms TTL=51
来自 50.7.103.90 的回复: 字节=32 时间=182ms TTL=51
来自 50.7.103.90 的回复: 字节=32 时间=199ms TTL=51
来自 50.7.103.90 的回复: 字节=32 时间=188ms TTL=51

50.7.103.90 的 Ping 统计信息:
数据包: 已发送 = 6,已接收 = 6,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 178ms,最长 = 199ms,平均 = 185ms

C:\>tracert 50.7.103.90

通过最多 30 个跃点跟踪到 50.7.103.90 的路由

1 2 ms 1 ms 1 ms 192.168.1.1
2 37 ms 23 ms 17 ms 116.24.132.1
3 19 ms 17 ms 20 ms 183.56.71.221
4 27 ms 22 ms 22 ms 119.145.47.169
5 22 ms 23 ms 23 ms 121.34.242.234
6 24 ms 23 ms 23 ms 202.97.33.170
7 23 ms 22 ms 23 ms 202.97.60.90
8 181 ms 184 ms 184 ms 202.97.58.254
9 198 ms 199 ms 199 ms 202.97.52.226
10 202 ms 187 ms 189 ms xe-2-3-0.mpr4.sjc7.us.above.net [64.125.12.33]
11 191 ms 186 ms 187 ms xe-4-0-0.cr2.sjc2.us.above.net [64.125.24.5]
12 194 ms 192 ms 193 ms ae1.cr2.lax112.us.above.net [64.125.31.234]
13 199 ms 198 ms 199 ms xe-3-1-0.er4.lax112.us.above.net [64.125.21.194]

14 194 ms 193 ms 195 ms 208.184.110.166.IPYX-069066-930-ZYO.above.net [2
08.184.110.166]
15 187 ms 188 ms 189 ms 50.7.103.90

跟踪完成。

C:\>

丹佛

C:\Users\Harvey Mei>ping 204.45.182.138 -n 6
正在 Ping 204.45.182.138 具有 32 字节的数据:
来自 204.45.182.138 的回复: 字节=32 时间=275ms TTL=50
来自 204.45.182.138 的回复: 字节=32 时间=245ms TTL=50
来自 204.45.182.138 的回复: 字节=32 时间=326ms TTL=50
来自 204.45.182.138 的回复: 字节=32 时间=216ms TTL=50
来自 204.45.182.138 的回复: 字节=32 时间=234ms TTL=50
来自 204.45.182.138 的回复: 字节=32 时间=221ms TTL=50
204.45.182.138 的 Ping 统计信息:
数据包: 已发送 = 6,已接收 = 6,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 216ms,最长 = 326ms,平均 = 252ms
C:\Users\Harvey Mei>

C:\Users\Harvey Mei>tracert 204.45.182.138
通过最多 30 个跃点跟踪到 204.45.182.138 的路由
1 <1 毫秒 <1 毫秒 <1 毫秒 192.168.1.254
2 44 ms 36 ms 56 ms 183.11.248.1
3 13 ms 3 ms 3 ms 113.106.37.85
4 76 ms 119 ms 29 ms 121.15.179.98
5 29 ms 51 ms 35 ms 121.34.242.234
6 50 ms 53 ms 24 ms 202.97.35.254
7 8 ms 7 ms 6 ms 202.97.60.90
8 216 ms 271 ms 235 ms 202.97.58.218
9 183 ms 218 ms 180 ms 202.97.49.166
10 180 ms 193 ms 205 ms xe-4-1-3.mpr1.lax12.us.above.net [64.125.13.13]
11 166 ms 168 ms 167 ms xe-2-2-0.cr2.lax112.us.above.net [64.125.31.194]
12 290 ms 196 ms 187 ms ae1.cr2.sjc2.us.above.net [64.125.31.233]
13 244 ms 209 ms 160 ms ae4.cr1.sjc2.us.above.net [64.125.30.125]
14 215 ms 214 ms 233 ms ae4.mpr1.den1.us.above.net [64.125.20.21]
15 275 ms 197 ms 276 ms 208.184.34.122.IPYX-069048-ZYO.above.net [208.184.34.122]
16 220 ms 216 ms 218 ms 204.45.182.138
跟踪完成。
C:\Users\Harvey Mei>

11 月 272013
 

xenserver-host-template-mem-01 xenserver-host-template-mem-02i

查看当前的模板最小内存值

[root@h01 ~]# xe template-list name-label=CentOS\ 6\ \(32-bit\) params=memory-static-min --minimal
 536870912
[root@h01 ~]#

获取指定模板的UUID值

[root@h01 ~]# xe template-list name-label=CentOS\ 6\ \(32-bit\) params=uuid --minimal
 0114dd35-65f7-2bf6-bcda-4e31274c2c3f

修改指定模板的最小内存值

[root@h01 ~]# xe template-param-set uuid=0114dd35-65f7-2bf6-bcda-4e31274c2c3f memory-static-min=128MiB

查看修改后的慢板最小内存值

[root@h01 ~]# xe template-list name-label=CentOS\ 6\ \(32-bit\) params=memory-static-min --minimal
 134217728
[root@h01 ~]#
11 月 122013
 

CentOS 6 系统默认规则

[root@msr13 snmp]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT
-A INPUT -j REJECT –reject-with icmp-host-prohibited
-A FORWARD -j REJECT –reject-with icmp-host-prohibited
COMMIT
[root@msr13 snmp]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all  —  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
2    ACCEPT     icmp —  0.0.0.0/0            0.0.0.0/0
3    ACCEPT     all  —  0.0.0.0/0            0.0.0.0/0
4    ACCEPT     tcp  —  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
5    REJECT     all  —  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
1    REJECT     all  —  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

[root@msr13 snmp]#

添加入站规则(使用服务监听类)

iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

规则

iptables -A INPUT -i eth0 -p udp -s 113.106.92.180 –dport 161 -j ACCEPT
iptables -A INPUT -i eth0 -p udp -s 113.106.92.180 –dport 3306 -j ACCEPT

清除规则

iptables -F
iptables -X
iptables -Z

限制指定IP访问本机或特定端口服务

11 月 042013
 
接压缩并执行安装程序

[root@linuxwalk tarball]# tar xzf DenyHosts-2.6.tar.gz
[root@linuxwalk DenyHosts-2.6]# python setup.py install

查看生成的目录及文件

[root@linuxwalk DenyHosts-2.6]# ll /usr/share/denyhosts/
 total 84
 -rw-r--r-- 1 root root 16549 Dec 8 2006 CHANGELOG.txt
 -rwxr-xr-x 1 root root 4076 Apr 22 2006 daemon-control-dist
 -rw-r--r-- 1 root root 20830 Aug 20 2006 denyhosts.cfg-dist
 -rw-r--r-- 1 root root 18009 Dec 17 2005 LICENSE.txt
 drwxr-xr-x 2 root root 4096 Nov 4 10:23 plugins
 -rw-r--r-- 1 root root 3575 Feb 3 2006 README.txt
 drwxr-xr-x 2 root root 4096 Nov 4 10:23 scripts
 -rw-r--r-- 1 root root 1522 Apr 5 2006 setup.py
 [root@linuxwalk DenyHosts-2.6]#

Continue reading »