跳到主要內容

發表文章

Cisco Router使用Tacacs做驗證

環境如下: Tacacs的相關設定: 1. 請先確定Router可以Ping到Tacacs Server 2. 2811設定如下 RA(config)#aaa new-model RA(config)#aaa authentication enable default group tacacs+ local (若Tacacs Server連絡不到,則會改由Local Database做驗證) RA(config)#tacacs-server host 10.1.1.2 key cisco RA(config)#username ccna1 password cisco1 3. 再次登入後,則會詢問相關帳號,密碼 RA> RA>enable Username: Password: RA# 4. Telnet 改用Tacacs Server做驗證 RA(config)#aaa authentication login tt group tacacs+ local RA(config)#line vty 0 4 RA(config-line)#password ccaa RA(config-line)#login authentication tt

Windows Server 2008 命令提示字元的中文變問號

剛裝好的Windows Server 2008,在命令提示字元中,中文會顯示問號 進到控制台/地區及語言/系統管理,點選變更系統地區設定,把非Unicode程式的語言改為中文(繁體,台灣),中文就會顯示正常!

同事中了 "W32.Downadup.B" 病毒

同事告知Windows AD的帳號被鎖住,我從Windows AD中解開被鎖住的帳號後,順便看了安全性稽核的Log,發現一堆User帳號被鎖住(如下圖) 解開被鎖住的一堆帳號後,還是陸續出現帳號被鎖住,於是我又點入該事件,看到有一個IP在搞鬼 找到搞鬼的電腦,在他的電腦輸入 Netstat -n,會發現他持續在掃網段的IP,而且Port 都是445(網路芳鄰),我的解決方式如下: 1. Trend的iClean掃毒,結果問題仍然沒解 2. 安裝公司的Symantec Endpoint,結果有掃到病毒,掃瞄內容如下圖 在 Symantec的網站 可以看出他是利用Windows RPC的漏洞進行攻擊,而同事的電腦沒上更新,Firewall又是關閉狀態,才會中毒... 重開機後解決這個問題,再請使用者安裝SP3,再執行Windows Update......

ROBOCOPY 備份指令

同事詢問WinRAR的備份指令,需求如下: 1.從 C:\Program Files\tmp備份到D:\tmp 2.檔名則為日期+時間 3.把備份好的原始檔砍掉 內容如下: echo off set pp="C:\Program Files\tmp\" "C:\Program Files\WinRAR\RAR.exe" a -df -agyyyymmddhhmm d:\tmp\ %pp%  因為我習慣備份的時候還會留下Log,所以我又給了他下面的批次檔 echo off set pp="C:\Program Files\tmp\" set xx=%date:~0,4%%date:~5,2%%date:~8,2%   echo  =====%date%  %time%===== > %xx%.log "C:\Program Files\WinRAR\RAR.exe" a -agyyyymmddhhmm d:\tmp\ %pp% >> %xx%.log echo  =====%date%  %time%===== >> %xx%.log 有點時間又研究了公司備份時用的ROBOCOPY指令,所以改寫公司備份的批次檔 echo off set x=%date:~0,4%%date:~5,2%%date:~8,2% set y=%date:~11,3% set pp=\\10.0.1.250/d$\mailbackup\ robocopy  D:\lotus \\10.0.1.250\mailbackup\%y%\  /e  /xo  /purge /log:%pp%log_%y%.txt 內容為把D:\Lotus 備份到網路上的10.0.1.250主機的Mailbakcup目錄,並且以星期為週期,也就是我只會存七天內的備份,另外/Log則是要新增Log檔,這個指令好用多了....... ROBOCOPY 詳細的內容可以 參考這裡

Cisco ASA 擋我寄出去的信

上星期五從公司Server寄出一封信到Gmail被退信,本來不以為意,今天發現Mail Server Queue住了一堆要寄到Gmail的信件 查了一下Mail Server的Log (我們公司是用Notes) ================================================================== 2012/03/19 上午 08:40:16  Router: No messages transferred to GMAIL.COM (host GMAIL.COM) via SMTP: The server is not responding. The server may be down or you may be experiencing network problems. Contact your system administrator if this problem persists. 2012/03/19 上午 08:40:21  Router: Failed to connect to SMTP host GMAIL.COM because The server is not responding. The server may be down or you may be experiencing network problems. Contact your system administrator if this problem persists. ================================================================== Mail Server的主機上 Tracert Route Gmail的IP也沒問題,所以就懷疑Firewall在作怪 在Cisco ASA的Log中發現有一些奇怪的Log,而這些Source IP是Google的IP,Port是80或443 ================================================================== 2 Mar 19 2012 10:50:04 106001 74.125.31.121 80 ...

Trunk 與 VTP

802.1Q Trunking *Trunk不屬於任何VLAN,可以承載所有VLAN *兩端設備 Native VLAN要相同() *Trunk Port不能使用Port-Security |Dest|SRC|Len/Etype|Data(46-1500)|FCS|   Ethernet Frame |Dest|SRC| Tag |Len/Etype|Data(46-1500)| FCS(重新演算) | 802.1Q Frame Tag=   | EtherType(0x8100) | PRI | Token Ring Encapsulation  F lag | VLAN ID | Tag=  |----------- 16Bit-------- | 3Bit | -------------------1Bit---------------- | ----12Bit-- | (總共4Byte) Native VLAN (Native VLAN-->Untagged) *預設為VLAN 1,只能有一個Native VLAN *所有資料到Trunk都會加Tag,只有Native Vlan不加Tag *802.1Q 才有 -------------------------------------------------------------------------------------------- 查看介面Trunk的相關資訊 這個範例是兩台2950的Port 1對接 SW1# show interfaces fa 0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative Mode:  dynamic desirable Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking...

國外ISP的SMTP Server

老闆出國兩個禮拜,一大早寄信告知不能寄信,提醒他使用非公司網路寄信要驗證,順便給他一張國外ISP業者的SMTP Server清單 http://www.host45.com/resources/ispsmtps.php 希望他一切順利 ^^

Spanning-tree

STP Port的狀態 Forwarding 可以收發Data Frames 可以收發BBPDUs Blocking 不 可以收發Data Frames 可以收發BBPDUs Disabled 未參與STP的運作 Broadcast storms Multiple frame transmission MAC Database instability --------------------------------------------------- Spanning-Tree 預防LOOP協定 , 標準為802.1D --------------------------------------------------- 角色選擇 1.先選擇Root Bridge(Bridge ID較低者),剩下的則為Nonroot Bridge *若平手比Base Mac,可用Show version指令查詢 *只有Root Bridge會發BPDU 2.每一台Nonroot Bridge一定要選出一個Root Port RP為離Root Bridge的最佳路徑 RP狀態為Forwarding 選擇方式為:  *Tootal Path Cost: (Path Cost:10G=2,1G=4,100M=19,10M=100)  *Port ID    3.每個Segment(兩個Switch Port對接的線路)要選出一個Designated Port DP 發送BPDU DP狀態為Forwarding 選擇方式為:  *Sending Path Cost  *Bridge ID  *Port ID 4.剩下的則為Nondesignated Port NDP為其他未指派角色的Ports NDP狀態為Blocking --------------------------------------------------- BPDU(Bridge Protocol Data Unit) 預設每2秒傳送 Bridge ID=Bridge Priority(預設32768),MAC Address(Base Mac Address) --------------...

Cisco Switch 基礎設定

==基礎設定== Switch> enable Switch# configure terminal Enter configuration commands, one per line.  End with CNTL/Z. sw02(config)# hostname sw02 sw02(config)# line console 0 sw02(config-line)# exec-timeout 0 sw02(config-line)# logging synchronous sw02(config-line)# exit sw02(config)# no ip domain-lookup sw02(config)# interface vlan 1 sw02(config-if)# ip address 10.0.1.106 255.255.255.0 sw02(config-if)# no shutdown 00:19:32: %LINK-3-UPDOWN: Interface Vlan1, changed state to up 00:19:33: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up sw02(config-if)# exit sw02(config)# line console 0 sw02(config-line)# password cisco sw02(config-line)# login sw02(config-line)# exit sw02(config)# enable password cisco sw02(config)# enable secret cisco3 sw02(config)# username ciscouser password ciscopassword sw02(config)# ip domain-name www.cisco.com sw02(config)# crypto key generate rsa The name for the keys will be: sw02.www.cisco.com Choose th...

Frame Relay (只有做半套)

Basic Frame Relay ------------------------------------------------------------------------------------ Router-1#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router-1(config)#interface serial 1/0 Router-1(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial1/0, changed state to up Router-1(config-if)#ip address 10.1.1.1 255.255.255.0 Router-1(config-if)#encapsulation frame-relay %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up Router-1(config-if)#frame-relay map ip 10.1.1.2 100 (Remote IP , Local DLCI) Router-1#show frame-relay map Serial1/0 (up): ip 10.1.1.2 dlci 100, static, CISCO, status defined, active Subinterface Point to Point -------------------------------------------------------------------------------------- Router-3(config)#interface serial 1/0 Router-3(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial1/0, changed state to up Router-3(config-if)#encapsulation frame-rel...

IPV6 小記

Unicast Global ==> 2000::/3 (目前只開放2或3帶頭) Unique Local==> FD帶頭 Link-Local==> FE80帶頭 Local Loopback==>::1/128 Unspecified==>::/128 MultiCast FF帶頭 AnyCast 與Unicast共用 EUI-64 產生方式 更多介紹

NAT

Static NAT ============================================== Router(config-if)#ip address 10.1.1.1 255.255.255.0 Router(config-if)#interface fa 0/0 Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#exit Router(config)#ip nat inside source static 192.168.1.2 10.1.1.1 Router(config)#interface fa 0/0 Router(config-if)#ip nat inside Router(config-if)#interface fa 0/1 Router(config-if)#ip nat outside Router#show ip nat translations Pro  Inside global     Inside local       Outside local      Outside global ---  10.1.1.1          192.168.1.2        ---                --- tcp 10.1.1.1:1026      192.168.1.2:1026   10.1.1.2:80        10.1.1.2:80 Dynamic Address Translation ============================================= Router(config)#interface fa 0/0 Router(config-if)#no shutdown...

ACL

編號型 ACL (1~99) ========================================= 只針對Source Address做回應 ex: r1(config)#access-list 1 permit 192.168.1.0 0.0.0.255 r1(config)#interface fa 0/0 r1(config-if)#ip access-group 1 in 允許 192.168.1.0/24 從 fa 0/0 連入 r1#show access-lists Standard IP access list 1     10 permit 192.168.1.0, wildcard bits 0.0.0.255 (有一條隱性的拒絕 deny any) 192.168.1.254 0.0.0.0 可簡寫 host 192.168.1.254 192.168.1.254 0.0.0.0 255.255.255.255 可簡寫 any 套用在VTY Access r1(config)#line vty 0 15 r1(config-line)#access-class 1 in 可以用Show ip interface fa 0/0可以看介面有沒有套用ACL R1# show ip interface fastEthernet 0/0 FastEthernet0/0 is up, line protocol is up (connected) Internet address is 192.168.10.254/24 Broadcast address is 255.255.255.255 Address determined by setup command MTU is 1500 bytes Helper address is not set Directed broadcast forwarding is disabled Outgoing access list is not set Inbound access list is 1 Proxy AR...

Vmware Server 網路卡選擇NAT

Vmware Server若是安裝在Windows 7,網卡使用NAT的功能會有問題!! 這兩天試了幾次,果然是VMware的問題,雖然可以用ICS解決,不過連線還是會有問題,改用VirtualBox就不會有這種狀況..... http://life.different.idv.tw/scottwu/49.htm

EIGRP 小記

1. Classless 2.支援VLSM 3.Unequal-Cost pathways  (OSPF Equal-Cost Load Balancing) 4.預設會 Auto Summary .......... EIGRP有三張Table 1. neighbor Table          |          |     dual 演算法          V 2. Topology Table (不是Database),已經知道下一站要怎麼走,OSPF還要使用SPF演算法 a.路徑走Successor,若Successor斷掉,則走 Feasible Successor b.FD 值 =介面到下一站Router的Metric+AD值 c.要成為 Feasible Successor,必須AD值小於 Successor的FD值(Metric) 3 .Riouting Table EIGRP 也有送Hello Packets(預設每5秒送一次Hello),會包含AS Number,若是AS Number不同,鄰居關係會無法建立 OSPF 中的Process ID可以不用,但是Area要相同 ---------------------------------------------- 例如 ---------------------------------------------- B3#show ip interface brief  Interface              IP-Address      OK? Method Status                Protocol FastEthernet0/0        172.16.4.254    YE...

RIP V2 小記

RIP 1. RIP 只支援FLSM(SLSM),不支援VLSM,但可以切割子網段,以介面上的Subnet Mask判斷,所以RIP宣告的時候,沒有宣告 Subnet Mask 2. RIP V2 支援不連續網路! 3 . 只對直接相連的介面丟出Routing Table 4.RIP 支援自動 彙整(關不掉) , 不支援 手動 彙整 ,RIP V2支援 自動 彙整/手動 彙整 假設有一Router有兩個介面 FA 0   ==> IP  10.2.2.2/16 FA 1   ==> IP  10.1.1.1/16 r1(config)#router rip  r1(config-router)#version 2 r1(config-router)#network 10.0.0.0 * 在正確的介面啟動RIP *介面 若 有3個10.0.0.0的網段只要打 1次,若是有2個1 92.168. x.0的網段 , 則 是 要打2次 r1(config-router)#no auto-summary *有不連續網路要 關掉 auto-summary 檢查 r1#show ip protocols  Routing Protocol is " rip " Sending updates every 30 seconds, next due in 7 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 2, receive 2   Interface             Send  Recv  Trigg...