溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

FreeBSD6.0Release+Squid+Socks5服務(wù)器架設(shè)筆記

發(fā)布時(shí)間:2020-08-10 20:02:37 來源:ITPUB博客 閱讀:139 作者:慕容鈺靈 欄目:建站服務(wù)器

架設(shè)此服務(wù)器,使客戶端通過設(shè)置代理服務(wù)器的squid來瀏覽網(wǎng)頁,通過代理服務(wù)器的socks5來使用QQ、MSN、證券等服務(wù),下面簡單介紹服務(wù)器的架設(shè)過程。

一、安裝FreeBSD6.0Release

從ftp://ftp.freebsd.org/pub/FreeBSD/torrents/6.0-RELEASE下載最新版本FreeBSD6.0Release刻成光盤并選擇最小化安裝(安裝時(shí)開通ftp及ssh服務(wù))。

網(wǎng)絡(luò)信息:
網(wǎng)段 -> 192.168.10.0/24
fxp0 -> 內(nèi)網(wǎng)網(wǎng)卡 192.168.10.254 
em0 -> 外網(wǎng)網(wǎng)卡 218.104.52.x/32

1、選擇軟件包時(shí)選擇最小化安裝。

2、編輯inetd.conf時(shí)開通ftp及telnet服務(wù)。
其它的都默認(rèn)安裝,具體可參考這,安裝完后重啟機(jī)器。

二、配置freebsd

1、配置/etc/rc.conf:
hostname="jifangproxy.jscpu.com"
defaultrouter="218.104.52.x"
ifconfig_em0="inet 218.104.52.x netmask 255.255.255.248"
ifconfig_fxp0="inet 192.168.10.254 netmask 255.255.255.0"
inetd_enable="YES"
kern_securelevel_enable="NO"
linux_enable="YES"
nfs_reserved_port_only="YES"
sendmail_enable="NONE"
sshd_enable="YES"
usbd_enable="NO"

2、配置/etc/resolv.conf:
domain jscpu.com
nameserver 218.104.48.106
nameserver 221.6.4.66

3、將光盤放入光驅(qū)中,安裝ports和src
# /usr/sbin/sysinstall
然后選擇Configure-->Distributions,然后利用空格鍵選擇src和ports兩項(xiàng),點(diǎn)install,安裝完成后重啟機(jī)器。

三、配置內(nèi)核

# cd /usr/src/sys/i386/conf
# cp GENERIC funpower
# ee funpower 
內(nèi)核根據(jù)服務(wù)器的不同具體配置。
編輯好funpower后開始編譯安裝內(nèi)核:
#/usr/sbin/config funpower
#cd ../compile/funpower
#make cleandepend
#make depend
#make
#make intall
編譯安裝完成后重啟機(jī)器。

四、安裝squid服務(wù)

1、安裝perl(freebsd5.4以后要先安裝perl后再安裝squid)

從http://www.cpan.org/authors/id/R/RG/RGARCIA/下載 http://www.bbqmw.net/qm_yeqm/perl-5.6.2.tar.gz,然后拷貝到/usr/ports/distfiles中,然后:

# cd /usr/ports/lang/perl5
# make install

2、下載并安裝squid

從http://www.squid-cache.org/Versions/v2/2.5/下載squid最新版squid-2.5.STABLE12.tar.gz,通過ftp上傳至服務(wù)器目錄中。

<安裝>
# cd /home/funpower
# tar zxvf squid-2.5.STABLE12.tar.gz
# cd squid-2.5.STABLE7
# ./configure –prefix=/usr/local/squid
# make
# make install

<配置squid配置文件>
# cd /usr/local/squid/etc
# ee squid.conf
配置文件中改如下幾項(xiàng):
http_port 3128          //56行
cache_mem 128 MB     //490行
cache_dir ufs /usr/local/squid/cache 1024 16 256      //705行
cache_access_log /dev/null              //712
cache_log /dev/null                    //720
cache_store_log none                  //730
配置文件中加入以下幾項(xiàng):
acl web src 192.168.10.254             //在1830行左右acl all src 0.0.0.0/0.0.0.0這行前加入

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI