關機相關指令
init 0 --OK mode
init 5 --關機
init 6 --重新開機
網路
vi /etc/hosts --修改 IP
::1 localhost
127.0.0.1 localhost
192.168.1.1 dns-backup loghost
vi /etc/netmasks --修改 mask
192.168.1.0 255.255.255.0
grep network /etc/path_to_inst --查網卡名稱
ifconfig -a --
2013年12月10日 星期二
2013年11月29日 星期五
2013年10月29日 星期二
Juniper Firewall - ISG-1000、SSG-550
指令
get config | include 3389 //顯示設定,並只顯示有關鍵字 "3389" 的設定Juniper-6350
set routing-options static route 192.168.5.74/32 discard //封鎖此 IP
Juniper-ISG1000
set interface "Inter1" mip 10.10.10.50 host 192.168.10.100 netmask 255.255.255.255 vr "trust-vr" //設定內部 IP 轉址
set address "Untrust" "_1.1.1.15/32" 1.1.1.15 255.255.255.255 "測試用" //設定外部要連進來的 IP
set service "TCP_80&443" protocol tcp src-port 0-65535 dst-port 80-80 //設定 port
set service "TCP_80&443" + tcp src-port 0-65535 dst-port 443-443 //在同樣名字裡附加其他 port
set policy id from "Untrust" to "Trust" "_1.1.1.15/32" "MIP(61.60.127.179)" "TCP_80&443" permit log //設定 police 允許從外部 IP 連線並經由 MIP 轉址進到內部 Server
Ins5 SSG-550 新增IP
set address "Untrust" "_192.168.5.58/32" 192.168.5.58 255.255.255.255
2013年10月28日 星期一
WAF 網路應用程式防火牆
WAF 網路應用程式防火牆
http://www.amxecure.com/index.php/zh/securecontrol/476-securespherewaf
http://www.informationsecurity.com.tw/article/article_detail.aspx?aid=7276
http://www.techbang.com/posts/1826-waf-web-host-bridge-is-falling-down
作個記錄
http://www.amxecure.com/index.php/zh/securecontrol/476-securespherewaf
http://www.informationsecurity.com.tw/article/article_detail.aspx?aid=7276
http://www.techbang.com/posts/1826-waf-web-host-bridge-is-falling-down
作個記錄
2013年2月19日 星期二
Cisco 中文操作手冊
從別人那裏 A 來的隨機器附送的 Cisco中文操作手冊,非常薄的一本,只有簡單的內容
Windows Vista、7、8 : 建議使用 putty、Teraterm。( 個人是使用 SecureCRT 及 Xshell4,可以自動記錄文字成 txt 檔 )
Date : 8 bit
Parity : none
Stop : 1 bit
連線後會要輸入帳號密碼,預設值是 帳號 : admin 密碼 : (無),Web : 帳號 : (無) 密碼 : cisco
連線成功後會進入使用者模式 ( Switch> ),輸入 : enable 後會進入特權模式 ( Switch# ),再輸入 : configure terminal 會進入配置模式 ( Switch(config)# )。
switch# conf t
switch(config)# vlan2
switch(config-vlan)# name line2
switch(config-vlan)# exit
switch# show vlan brief
將 Fa0/1 及 Fa0/2 加入 vlan2 ,並將 Fa0/19 - 24 設定為 Trunk port ( 802.1Q )
switch# conf t
switch(config)# interface range fastethernet0/1-2
switch(config-if-range)# swithport access vlan2
switch(config-if-range)# switch mode access
switch(config-if-range)# exit
switch(config)# interface range fastethernet0/19-24
switch(config-if-range)# swithport trunk encapsulation dot1q
switch(config-if-range)# switch mode trunk
switch(config-if-range)# exit
switch# show vlan brief
switch(config)# ip routing
switch# clock set 16:10:40 23 September 2013
時區 :
switch(config)# clock timezone TW +8
指定 debug 檔及 log 檔加上時間標記
switch(config)# service timestamps debug datetime localtime
switch(config)# service timestamps log datetime localtime
檢視 :
switch# show clock
NTP :
switch(config)# ntp int0 --- 設定 NTP 來源介面為 int0
switch(config)# ntp server 10.10.10.10 --- 連線到外部的NTP Server 自動更新時間 ( 可設定
多台 )
switch(config)# ntp peer 192.168.0.5 --- 設定內部網路的 IP 位置,當有其他設備已經連到
NTP Server 時,可以用這指令跟那台設備同步時間,
這指令可以同時設定多個。
檢視 :
switch# show ntp status
switch# show ntp peer
switch# show ntp associations
這薄薄一本幾乎都是教用快速設定或設定精靈........
基本設定 :
使用 console port 登入設備 :
一條 USB 轉 RS-232 ( 公頭 ) ( 現在 NB 大多取消了 console port ),一條 RJ-45 轉 console port ( 母頭 ) ( 有些較新的機器 console port 改成使用 RJ-45 的接頭,購買時都會附上一條 RJ-45 轉 console 的轉接線 )。軟體 :
Windows XP : 內建超級終端機。Windows Vista、7、8 : 建議使用 putty、Teraterm。( 個人是使用 SecureCRT 及 Xshell4,可以自動記錄文字成 txt 檔 )
連線設定
Baud rate : 9600Date : 8 bit
Parity : none
Stop : 1 bit
連線後會要輸入帳號密碼,預設值是 帳號 : admin 密碼 : (無),Web : 帳號 : (無) 密碼 : cisco
連線成功後會進入使用者模式 ( Switch> ),輸入 : enable 後會進入特權模式 ( Switch# ),再輸入 : configure terminal 會進入配置模式 ( Switch(config)# )。
清除所有設定
switch# write erase ( 清除 startup configuration , 執行後 startup configuration 會回復出廠值 )建立 VLAN
建立 vlan 2 並命名為 line2switch# conf t
switch(config)# vlan2
switch(config-vlan)# name line2
switch(config-vlan)# exit
switch# show vlan brief
將 Fa0/1 及 Fa0/2 加入 vlan2 ,並將 Fa0/19 - 24 設定為 Trunk port ( 802.1Q )
switch# conf t
switch(config)# interface range fastethernet0/1-2
switch(config-if-range)# swithport access vlan2
switch(config-if-range)# switch mode access
switch(config-if-range)# exit
switch(config)# interface range fastethernet0/19-24
switch(config-if-range)# swithport trunk encapsulation dot1q
switch(config-if-range)# switch mode trunk
switch(config-if-range)# exit
switch# show vlan brief
啟動 L3 Switch 繞送服務
在未設定的情況下,各 vlan 是無法互通的,必須要輸入指令才能像 Router 一樣在不同 vlan 及網段中繞送封包switch(config)# ip routing
設定 時間、NTP ( 網路時間設定 )
時間 :switch# clock set 16:10:40 23 September 2013
時區 :
switch(config)# clock timezone TW +8
指定 debug 檔及 log 檔加上時間標記
switch(config)# service timestamps debug datetime localtime
switch(config)# service timestamps log datetime localtime
檢視 :
switch# show clock
NTP :
switch(config)# ntp int0 --- 設定 NTP 來源介面為 int0
switch(config)# ntp server 10.10.10.10 --- 連線到外部的NTP Server 自動更新時間 ( 可設定
多台 )
switch(config)# ntp peer 192.168.0.5 --- 設定內部網路的 IP 位置,當有其他設備已經連到
NTP Server 時,可以用這指令跟那台設備同步時間,
這指令可以同時設定多個。
檢視 :
switch# show ntp status
switch# show ntp peer
switch# show ntp associations
這薄薄一本幾乎都是教用快速設定或設定精靈........
2012年12月4日 星期二
Fortigate-300A 韌體升級 - Part2
將升級過程遇到的一些問題及解決過程做個紀錄 (現在暫時憑記憶作筆記,內容有些會有誤)
原始版本 : Fortigate-300A 4.0 MR1-Patch10
1. 先將 NB 直接接上防火牆並用 WEB GUI 登入。
2. 從韌體版本下方的按鈕按更新後選擇 MR2 的檔案,按下確認後,
就會開始更新並自動重開機。
**問題** 自動重開後,就無法進入 WEB,從 Console 進入發現設定被清空還原至出廠狀態
開始解決 :
1.從手冊上,port 1 預設 192.168.1.99/24 ,將 NB 改成 192.168.1.100/24,ping 成功,但是
仍然無法進入 WEB。
2.從機器前面板還原至出廠預設值,依舊 ping 成功,WEB 失敗。
3.測試另外一組預設 IP,192.168.100.99/24,ping 成功,WEB 失敗。
4.Console 進入,原廠預設帳號 : damin ,密碼 : (空白)
5.輸入指令 :
#config system interface
#edit port1
#acc http https -- 開啟 port 1 的 WEB 功能
#end
#show system interface -- 確認 port 1 的 https 有開啟
6.問題無解決,只好刪除韌體並使用 TFTP 重新載入。
步驟 :
一、機器關閉電源重新開機,在開機中跑出 "Enter any key....." 時,按下空白鍵。
二、按 G 選擇刪除韌體。
三、按 E 從 TFTP 載入韌體,先輸入 TFTP Server IP (NB的IP),第二空格按 ENTER 跳過,
接著輸入韌體名稱,包含副檔名,版本為 MR2-Patch1。
四、更新完後選擇 D ,使用預設的設定。
等機器重開機完後,使用 192.167.1.100/24,連上 port 1,登入 https://192.168.1.99 成功。
更新至最新版本韌體 :
1. 重複動作更新自動重開即可,設定檔回復後,就算升級韌體設定也不會消失。
2.經過測試從 MR2-Patch1 > Patch4 > Patch7 > Patch10 > Patch13 ,一次跳過 2個更新
可以正常使用,跳再多則無法保證。( 原廠建議一次最多跳 2、3個版本 )
結論 : 結果還是不知道是 MR2 這版本檔案有問題,還是因為從 MR1 轉到 MR2 的關係
才會有問題,只能等以後有機會再來測試。
原始版本 : Fortigate-300A 4.0 MR1-Patch10
1. 先將 NB 直接接上防火牆並用 WEB GUI 登入。
2. 從韌體版本下方的按鈕按更新後選擇 MR2 的檔案,按下確認後,
就會開始更新並自動重開機。
**問題** 自動重開後,就無法進入 WEB,從 Console 進入發現設定被清空還原至出廠狀態
開始解決 :
1.從手冊上,port 1 預設 192.168.1.99/24 ,將 NB 改成 192.168.1.100/24,ping 成功,但是
仍然無法進入 WEB。
2.從機器前面板還原至出廠預設值,依舊 ping 成功,WEB 失敗。
3.測試另外一組預設 IP,192.168.100.99/24,ping 成功,WEB 失敗。
4.Console 進入,原廠預設帳號 : damin ,密碼 : (空白)
5.輸入指令 :
#config system interface
#edit port1
#acc http https -- 開啟 port 1 的 WEB 功能
#end
#show system interface -- 確認 port 1 的 https 有開啟
6.問題無解決,只好刪除韌體並使用 TFTP 重新載入。
步驟 :
一、機器關閉電源重新開機,在開機中跑出 "Enter any key....." 時,按下空白鍵。
二、按 G 選擇刪除韌體。
三、按 E 從 TFTP 載入韌體,先輸入 TFTP Server IP (NB的IP),第二空格按 ENTER 跳過,
接著輸入韌體名稱,包含副檔名,版本為 MR2-Patch1。
四、更新完後選擇 D ,使用預設的設定。
等機器重開機完後,使用 192.167.1.100/24,連上 port 1,登入 https://192.168.1.99 成功。
更新至最新版本韌體 :
1. 重複動作更新自動重開即可,設定檔回復後,就算升級韌體設定也不會消失。
2.經過測試從 MR2-Patch1 > Patch4 > Patch7 > Patch10 > Patch13 ,一次跳過 2個更新
可以正常使用,跳再多則無法保證。( 原廠建議一次最多跳 2、3個版本 )
結論 : 結果還是不知道是 MR2 這版本檔案有問題,還是因為從 MR1 轉到 MR2 的關係
才會有問題,只能等以後有機會再來測試。
Fortigate-300A 韌體升級
紀錄升級 Fortigate-300A 防火牆的些過程,它的授權已經過期,要先上官網延長授權。
先到官網 http://www.fortinet.com 的下方進入支援網頁
在支援網站選擇 Reqister/Renew
登入帳號密碼
輸入 Contract Registration Code , 這在授權書上會有
接下來再輸入機器的序號,FG300Axxxxxxxxxx 等16碼,這在機器背面的貼紙上。(因已先註冊完成所以無附圖)
中間會跳出同意書按確認後,即授權成功。
之後選擇 Manage/View Products ,可以看見帳號下有哪些機器註冊
像此圖下方有台 FG300A 的 Firewall ,後面有授權到期時間,點機器進去還可以看到詳細
資料
再來是下載韌體,將指標移到 Download 上,選擇 Firmware Images 選項,然後點選下方的 FortiGate
點選後會連接到 FTP,之後就去各版本尋找機器相對應的韌體
在 4.0 的 MR1 Patch10 下,有著現在使用的韌體
先到官網 http://www.fortinet.com 的下方進入支援網頁
在支援網站選擇 Reqister/Renew
登入帳號密碼
輸入 Contract Registration Code , 這在授權書上會有
接下來再輸入機器的序號,FG300Axxxxxxxxxx 等16碼,這在機器背面的貼紙上。(因已先註冊完成所以無附圖)
中間會跳出同意書按確認後,即授權成功。
之後選擇 Manage/View Products ,可以看見帳號下有哪些機器註冊
像此圖下方有台 FG300A 的 Firewall ,後面有授權到期時間,點機器進去還可以看到詳細
資料
再來是下載韌體,將指標移到 Download 上,選擇 Firmware Images 選項,然後點選下方的 FortiGate
點選後會連接到 FTP,之後就去各版本尋找機器相對應的韌體
在 4.0 的 MR1 Patch10 下,有著現在使用的韌體
***注意事項***
原廠建議要升級韌體一定要按照順序升上去,如下圖的 MR2,要升級到 Patch13 的話就要從 MR2 、MR2 Patch1 ~~ 一路升級到 MR2 Patch13,中間可以稍微跳個 2、3 號,像是 Patch 1、Patch 3、Patch 5、Patch 8 這樣下去,不過如果時間足夠的話建議還是一個一個升上去比較保險。
訂閱:
文章 (Atom)









