GB | BIG5
|
| 首頁 > 系統管理 > Linux > 正文 |
 |
| Linux 網管 123 --- 第8章. 備份及回存程序 -3.Cisco 路由器組態備份 |
| by Steve Frampton, (2001-07-02 20:10:00) |
在我工作的地方,我們透過廣域網路連接距離很遠的幾個地點。這些地方利用 Cisco 路由器透過 ISDN 連接,
或在其他例子, Centrex data circuits 提供 Internet 及 WAN 連結。 Cisco 路由器產品允許網路伺服器透
過 TFTP (“Trivial File Transfer Protocol”) 讀寫組態檔。無論何時當路由器組態變更,在 Linux 伺服器
上儲存其組態檔很重要,因為這樣才能維護備份。
請注意 Red Hat 預設是 disable TFTP 服務,因為如果組態不正確這可能變成安全上的漏洞。 TFTP daemon
允許任何人無須進行稽核就可以讀寫檔案。我個人的做法是建立一個 ``/tftpboot/'' 目錄,由 root 所擁有,
然後修改位於``/etc/inetd.conf''檔已有的組態列,指向該檔案位置:
tftpd dgram udp wait root /usr/sbin/tcpd in.tftpd /tftpboot
注意: 在上面那一行末端加上 ``/tftpboot'' 路徑,明確地指出允許 TFTP daemon 存取的檔案位置。雖然您
也可以略過這一部份,並且允許 TFTP 存取您系統上任何一部份的檔案,既然 TFTP 有安全上的風險,這可
能是很遭的主意。
一但您 enable TFTP 服務,別忘了鍵入:
killall -HUP inetd
上面的指令重新啟動 INETD daemon 以辨認出您在 inetd.conf 檔中所做的任何變更。
要建立路由器組態備份檔牽涉到3個步驟的程序 : 設定寫入到一個已存在檔(或建立一個新的)的許可,寫入備份
檔,然後重新設定限制存取該檔案。下面是一個路由器組態備份的例:
mail:~# cd /tftpboot
mail:/tftpboot# chmod a+w xyzrouter-confg
chmod: xyzrouter-confg: No such file or directory
mail:/tftpboot# touch xyzrouter-confg
mail:/tftpboot# chmod a+w loyola-confg
mail:/tftpboot# telnet xyzrouter
Escape character is '^]'.
User Access Verification
Password: ****
xyzrouter> enable
Password: ****
xyzrouter# write network
Remote host []? 123.12.41.41
Name of configuration file to write [xyzrouter-confg]?
Write file xyzrouter-confg on host 123.12.41.41? [confirm]
Building configuration...
Writing xyzrouter-confg !! [OK]
xyzrouter# exit
Connection closed by foreign host.
mail:/tftpboot# chmod a-wr,u+r xyzrouter-confg
mail:/tftpboot# exit
當路由器出現失效的情形 (例如因為打雷發生的突波所導致),這些備份檔可以幫助重新載入路由器組態,
從組態檔恢復牽扯到3個步驟的程序 : 設定既有檔案的許可,載入檔案,然後重新設定限制存取該檔案。下
面是路由器組態恢復的例
mail:~# cd /tftpboot
mail:/tftpboot# chmod a+r xyzrouter-confg
mail:/tftpboot# telnet xyzrouter
Escape character is '^]'.
User Access Verification
Password: ****
xyzrouter> enable
Password: ****
xyzrouter# config network
Host or network configuration file [host]?
Address of remote host [255.255.255.255]? 123.12.41.41
Name of configuration file [xyzrouter-confg]?
Configure using loyola-confg from 123.12.41.41? [confirm]
Loading xyzrouter-confg from 123.12.41.41 (via BRI0): !
[OK - 1265/32723 bytes]
xyzrouter# write
xyzrouter# exit
Connection closed by foreign host.
mail:/tftpboot# chmod a-wr,u+r xyzrouter-confg
mail:/tftpboot# exit
(http://www.fanqiang.com)
進入【UNIX論壇】
|
|
| 相關文章 |
Linux 網管 123 --- 第13章. 其他的問題 3.附帶文件的指示 (2001-07-04 07:00:00) Linux 網管 123 --- 第13章. 其他的問題 2.哪裡可以找到幫助 (2001-07-03 22:08:00) Linux 網管 123 --- 第13章. 其他的問題 1.系統損毀 (2001-07-03 21:04:00) Linux 網管 123 --- 第12章. 保持伺服器安全的策略 (2001-07-03 20:10:01) Linux 網管 123 --- 第11章. 在企業裡的電腦使用 Linux -2.伺服器的遷移及延展性 (2001-07-03 19:00:01) Linux 網管 123 --- 第11章. 在企業裡的電腦使用 Linux -1.使用 RAID (2001-07-03 18:08:00) Linux 網管 123 --- 第10章. 升級 Linux 及其他應用軟體 -9.Sendmail (2001-07-03 17:04:01) Linux 網管 123 --- 第10章. 升級 Linux 及其他應用軟體 -8.Apache.Squid (2001-07-03 16:10:00) Linux 網管 123 --- 第10章. 升級 Linux 及其他應用軟體 -7.升級到 2.2.x 版的核心 (2001-07-03 15:00:01) Linux 網管 123 --- 第10章. 升級 Linux 及其他應用軟體 -6.作一個訂的核心 (2001-07-03 14:08:00)
|
===更多相關=== |
|
|
 |
★ 樊強制作 歡迎分享 ★ |