2015年5月26日 星期二

防火牆上常見ICMP訊息

ICMP type 11 Time exceeded message:

Code描述
0Time to live (TTL) equals 0 during transit.
1Fragment reassembly timeout.封包重組逾時

Code 0 說明
If the gateway processing a datagram finds the time to live field is zero it must discard the datagram. The gateway may also notify the source host via the time exceeded message.
Code 0 may be received from a gateway

在防火牆Log上常看到來自外部來的ICMP type 1 code 0的訊息,根據上述的說明,路由器在傳遞封包時,當TTL值為0時,路由器會丟棄封包,並回應來原主機ICMP type 1 code 0的訊息。
這個狀況會發生在DNS主機上,攻擊者倭造來源IP,對DNS主機發送查詢,DNS會將查詢的結果回應至來源IP,因為來源IP不存在,故封包經過路由器傳遞到TTL 為0時,變丟棄封包,並告知來原主機 ICMP type 11 code 0 ,表示該封包無法傳遞並告知來源IP。

ICMP type 3 Destination Unreachable
Code
Description
0
Network unreachable error.
路由器無法將封包傳遞至目標位址,通常是路由器無法將封包根據路由表傳遞至下一個路徑,故路由器會送出網路無法到達訊息。
1
Host unreachable error.
由路由器或Gateway送出,通常是無法存取該網段的某個主機。
2
Protocol unreachable error. 通訊協定錯誤,無法傳達。
Sent when the designated transport protocol is not supported.
3
Port unreachable error. 無法存取Port
Sent when the designated transport protocol is unable to demultiplex the datagram but has no protocol mechanism to inform the sender.
4
The datagram is too big.
Packet fragmentation is required but the DF bit in the IP header is set.
5
Source route failed error.
6
Destination network unknown error.
7
Destination host unknown error.
8
Source host isolated error.
Obsolete.
9
The destination network is administratively prohibited.
10
The destination host is administratively prohibited.
11
The network is unreachable for Type Of Service.
12
The host is unreachable for Type Of Service.
13
Communication Administratively Prohibited.
This is generated if a router cannot forward a packet due to administrative filtering.
14
Host precedence violation.
Sent by the first hop router to a host to indicate that a requested precedence is not permitted for the particular combination of source/destination host or network, upper layer protocol, and source/destination port.
15
Precedence cutoff in effect.
The network operators have imposed a minimum level of precedence required for operation, the datagram was sent with a precedence below this level.
16
-
255



2015年5月3日 星期日

Cisco NTP access type

IOS router defines the following four types of access for NTP:
1) Peer – permits router to respond to NTP requests and accept NTP updates. NTP control queries are also accepted. This is the only class which allows a router to be synchronized by other devices.
2) Serve – permits router to reply to NTP requests, but rejects NTP updates (e.g. replies from a server or update packets from a peer). Control queries are also permitted.
3) Serve-only – permits router to respond to NTP requests only. Rejects attempt to synchronize local system time, and does not access control queries.
4) Query-only – only accepts NTP control queries. No response to NTP requests are sent, and no local system time synchronization with remote system is permitted.

2015年4月25日 星期六

CentOS 7 修改時區

安裝環境時,忘了選時區怎麼辦?

# cp /usr/share/zoneinfo/Asia/Taipei /etc/localtime
# ntpdate time.stdtime.gov.tw

PS:CentOS 7 minimal安裝預設沒有ntpdate套件,要先安裝。 

CentOS 7 On Hyper-V(第二代) 修改螢幕解析度

環境說明: CentOS 7  Grub 2 on Hyper-V 第二代

修改 /etc/default/grub  加入
GRUB_CMDLINE_LINUX_DEFAULT="video=hyperv_fb:800x600"

重新產生grub2 環境
 # grub2-mkconfig -o /boot/grub2/grub.cfg
若是使用第二代的Hyper-V環境(UEFI環境),產生的grub2設定檔位置不一樣
要注意,否則怎麼改都不成功。
# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Ubuntu下
# Sudo update-grub


Ubuntu 參考

2015年4月4日 星期六

rpm 套件管理

 查更新記錄
rpm -qa --changelog openssl | head -n11
* 2015  3月 19 四 Tomáš Mráz 1.0.1e-42.4
- update fix for CVE-2015-0287 to what was released upstream

* 2015  3月 18 三 Tomáš Mráz 1.0.1e-42.3
- fix CVE-2015-0209 - potential use after free in d2i_ECPrivateKey()
- fix CVE-2015-0286 - improper handling of ASN.1 boolean comparison
- fix CVE-2015-0287 - ASN.1 structure reuse decoding memory corruption
- fix CVE-2015-0289 - NULL dereference decoding invalid PKCS#7 data
- fix CVE-2015-0292 - integer underflow in base64 decoder
- fix CVE-2015-0293 - triggerable assert in SSLv2 server

查詢openssl 是否對CVE-2014-0224有做修正
rpm -q --changelog openssl | grep CVE-2014-0224

- fix CVE-2014-0224 fix that broke EAP-FAST session resumption support
- fix CVE-2014-0224 - SSL/TLS MITM vulnerability
 

2015年3月9日 星期一

Brocade SAN Switch 常用指令

nsShow: 顯示主機的WWN (10:00:00:00:c9:2b:c9:0c).
cfgShow : 檢視zone的設定是否正確.
 cfgshow all 查詢設定檔

configshow: 顯示交換器設定 (類似show run)
version: 查詢韌體板本



  • Port 相關指令


portCfgShow : 檢測交換器埠的資訊ports information.
portShow :檢視  NPIV 屬性和列出每個連接裝置上的Port WWNha的所有 N_Port (physical and
virtual)

portcamshow                Display filter utilization


原文:portShow command to view the NPIV attributes and all the N_Port (physical and
virtual) port WWNs that are listed under portWwn of device(s) connected





version : 查詢韌體板本

2015年3月8日 星期日

FreeBSD 10 與先前版本主要差異



FreeBSD 10 與先前版本主要差異
  • clang 取代 GCC 成為預設編譯器
  • Unbound 已被導取代 base 系統作為本機 DNS 解析服務。
  • BIND 已從 base 系統移除,改用Unbound取代。
  • 使用來自 NetBSD 專案的 bmake 替換了 make。
  • pkg 成預設的套件管理工具。
  • pkgadd、pkgdelete 及其相關工具已被移除
  • 對虛擬化進行了主要增強,內建支援BIS(Built in – BIS are included as part of this ,FreeBSD 9及8的版本需自行額外加裝BIS, Linux 則稱為LIS) 。
  • 針對 SSD 的 TRIM 支援已被加入到 ZFS
  • 效能更高的LZ4 壓縮演算法已被加入到 ZFS

Hyper-v對FreeBSD的支援
 
FreeBSD virtual machines on Hyper-V


CentOS and Red Hat Enterprise Linux virtual machines on Hyper-V

https://technet.microsoft.com/zh-tw/library/dn531026.aspx