歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Ubuntu安裝squid作為內網的代理服務器(Proxy)的簡單配制

Ubuntu安裝squid作為內網的代理服務器(Proxy)的簡單配制

日期:2017/3/1 14:30:10   编辑:關於Linux
Ubuntu安裝squid作為內網的代理服務器(Proxy)的簡單配制 我有一台Ubuntu Linux的機器,它有無線網卡,可以上外網。我想把它設置為代理服務器,這樣內網裡的其他機器就可利用它作為代理上外網了。 1. 在Ubuntu Linux上安裝squid [python] aborn@aborn-lisp:~$ sudo apt-get install squid 2. 安裝好後會自動啟動,如果使用默認配制,在另一台機器上設置代理(這是我在Chrome上設置代理): 測試下發現以下問題: 3. 看來還沒有Access的權限,配制squid 編輯文件squid.conf [python] aborn@aborn-lisp:~$ sudo vi /etc/squid/squid.conf 4. 把下面676這行注釋去掉,允許localnet的訪問 即: [python] 673 # Example rule allowing access from your local networks. 674 # Adapt localnet in the ACL section to list your (internal) IP networks 675 # from where browsing should be allowed 676 http_access allow localnet 677 http_access allow localhost 5. 重啟squid [python] aborn@aborn-lisp:~$ sudo /etc/init.d/squid restart 6. 然後在另一台機器上可以上網了!!
Copyright © Linux教程網 All Rights Reserved