亚洲成精品动漫久久精久,九九在线精品视频播放,黄色成人免费观看,三级成人影院,久碰久,四虎成人欧美精品在永久在线

掃一掃
關注微信公眾號

伺服器備份程序及回存程序.3
2006-06-05   網絡

  在我工作的地方,我們透過廣域網路連接距離很遠的幾個地點。這些地方利用 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

熱詞搜索:

上一篇:伺服器備份程序及回存程序(tar.KDat) .2
下一篇:跨站腳本執行漏洞詳解

分享到: 收藏