使用Web代理可以提高網頁的訪問速度,因為訪問的數據會存儲在內存或是硬盤中,就會直接從代理服務器中讀取。同時,為了提高網絡訪問的安全性,可以給Web代理服務器設置相應的權限,使它的安全性得到提高。
下面就介紹如何在RouterOS中創建Web代理的方法。
一、啟用Web-Proxy
啟用路徑:IP/Web-Proxy,然后點擊Web Proxy Settings按鈕,如圖示1:
在Web Proxy Settings的設置框中勾選Enable,並定義相應端口。如無其他特殊需求,其他的都用默認值。如圖示2:
proxy)" title="ROS創建Web代理(Web proxy)" action-data="http%3A%2F%2Fs11.sinaimg.cn%2Fmiddle%2F621c8c10g8ce756b081ea%26690" action-type="show-slide" style="margin: 0px; padding: 0px; list-style: none;">
二、在防火牆中添加一條NAT策略,將80端口的數據重定向到8080端口:
設置路徑:[Gnet@GateFlow] > / IP Firewall NAT add Chain=dstnet Protocol=6(tcp) Dst.Port=80 Action=redirect To-Ports=8080
注:dstnet 基於目的地址的NAT
redirect 重新定向到Web代理的端口
proxy)" title="ROS創建Web代理(Web proxy)" action-data="http%3A%2F%2Fs13.sinaimg.cn%2Fmiddle%2F621c8c10g8ce7a1fd893c%26690" action-type="show-slide" style="margin: 0px; padding: 0px; list-style: none;">
proxy)" title="ROS創建Web代理(Web proxy)" action-data="http%3A%2F%2Fs14.sinaimg.cn%2Fmiddle%2F621c8c10g8ce7a249cbcd%26690" action-type="show-slide" style="margin: 0px; padding: 0px; list-style: none;">
proxy)" title="ROS創建Web代理(Web proxy)" action-data="http%3A%2F%2Fs8.sinaimg.cn%2Fmiddle%2F621c8c10g8ce7a2686667%26690" action-type="show-slide" style="margin: 0px; padding: 0px; list-style: none;">
三、編輯策略,通過網站域名對該網站實行允許訪問(allow)或拒絕訪問(deny):
[Gnet@Flow] > / IP Web-Proxy add Src.Address=[Address] Dst.Host= [web- address] Action=allow/deny
注:在添加多條策略后,應該先Allow,在Deny。
proxy)" title="ROS創建Web代理(Web proxy)" action-data="http%3A%2F%2Fs13.sinaimg.cn%2Fmiddle%2F621c8c10g8ce7c73c453c%26690" action-type="show-slide" style="margin: 0px; padding: 0px; list-style: none;">
proxy)" title="ROS創建Web代理(Web proxy)" action-data="http%3A%2F%2Fs7.sinaimg.cn%2Fmiddle%2F621c8c10g8ce7c75adec6%26690" action-type="show-slide" style="margin: 0px; padding: 0px; list-style: none;">
proxy)" title="ROS創建Web代理(Web proxy)" style="margin: 0px; padding: 0px; border: 0px; list-style: none;"> OK,以上就是用ROS創建Web代理的具體步驟。最后還有一點需要注意的是,做Web代理的設備的存儲空間的話,要預算的稍微富裕點,要不然就會出現網頁顯示不完整的尷尬現象啦!

proxy)" title="ROS創建Web代理(Web proxy)" action-data="http%3A%2F%2Fs10.sinaimg.cn%2Fmiddle%2F621c8c10g8ce74defcae9%26690" action-type="show-slide" style="margin: 0px; padding: 0px; list-style: none;">