最近2018中文字幕在日韩欧美国产成人片_国产日韩精品一区二区在线_在线观看成年美女黄网色视频_国产精品一区三区五区_国产精彩刺激乱对白_看黄色黄大色黄片免费_人人超碰自拍cao_国产高清av在线_亚洲精品电影av_日韩美女尤物视频网站

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Ubuntu怎么安裝squid并啟用SSL

這篇文章主要介紹“Ubuntu怎么安裝squid并啟用SSL”,在日常操作中,相信很多人在Ubuntu怎么安裝squid并啟用SSL問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”Ubuntu怎么安裝squid并啟用SSL”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!

達孜網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián),達孜網(wǎng)站設(shè)計制作,有大型網(wǎng)站制作公司豐富經(jīng)驗。已為達孜超過千家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)網(wǎng)站建設(shè)要多少錢,請找那個售后服務(wù)好的達孜做網(wǎng)站的公司定做!

安裝openssl

首先需要安裝 openssl 及相關(guān)的依賴。

apt-getinstallopenssl
apt-getinstalllibssl-dev
apt-getinstallssl-cert

安裝squid

直接使用 apt 安裝的 squid 沒有啟用 SSL,所以需要使用源代碼編譯安裝。

apt-getsourcesquid
apt-getbuild-depsquid
apt-getinstalldevscriptsbuild-essentialfakeroot

#squid版本為3.3.8
cdsquid3-3.3.8

#修改編譯參數(shù)
vimdebian/rules

#在DEB_CONFIGURE_EXTRA_FLAGS配置中添加
#注意with-open-ssl的值為實際openssl.cnf所在路徑
--enable-ssl\
--with-open-ssl=/usr/lib/ssl/openssl.cnf\

#編譯squid
./configure
debuild-us-uc-b

#安裝
cd..
apt-getinstallsquid-langpack
dpkg-isquid3-common_3.3.8-1ubuntu6.2_all.deb
dpkg-isquid3_3.3.8-1ubuntu6.2_amd64.deb

生成 SSL 證書

配置 squid

將配置文件修改成如下內(nèi)容。我這里沒有啟用身份驗證,如果需要可以自行添加。squid 端口號修改為 9999,也可以按需修改。

aclSSL_portsport443
aclSafe_portsport80#http
aclSafe_portsport21#ftp
aclSafe_portsport443#https
aclSafe_portsport70#gopher
aclSafe_portsport210#wais
aclSafe_portsport1025-65535#unregisteredports
aclSafe_portsport280#http-mgmt
aclSafe_portsport488#gss-http
aclSafe_portsport591#filemaker
aclSafe_portsport777#multilinghttp
aclCONNECTmethodCONNECT

http_accessdeny!Safe_ports

http_accessdenyCONNECT!SSL_ports
http_accessallowlocalhostmanager
http_accessdenymanager
http_accessallowlocalhost
http_accessallowall

#修改為證書路徑
https_port9999cert=/ssl/ssl.crtkey=/ssl/ssl.private.key

coredump_dir/var/spool/squid3

refresh_pattern^ftp:144020%10080
refresh_pattern^gopher:14400%1440
refresh_pattern-i(/cgi-bin/|\?)00%0
refresh_pattern(Release|Packages(.gz)*)$020%2880
refresh_pattern.020%4320

viaoff
forwarded_fordelete
DNS_v4_firston

需要注意的是,ssl.private.key是證書的私鑰,不需要密碼保護,不然 squid 無法啟動??梢允褂孟铝忻钌蔁o密碼保護的私鑰:

opensslrsa-inssl.key-outssl.private.key

配置防火墻

我使用的是 ufw,所以運行

ufwallow9999

重啟 squid 就可以正常使用了。

禁用 squid 升級

由于我們是使用源代碼編譯的 squid,所以升級會破壞配置,需要禁用 squid 升級。

sudoapt-markholdsquid3

到此,關(guān)于“Ubuntu怎么安裝squid并啟用SSL”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
網(wǎng)站標(biāo)題:Ubuntu怎么安裝squid并啟用SSL
本文地址:http://fisionsoft.com.cn/article/jdgspd.html