单网卡Squid AS4 U5 设置
生活随笔
收集整理的這篇文章主要介紹了
单网卡Squid AS4 U5 设置
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
簡單adsl撥號和squid代理部署<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
?
一、???????????? 系統(tǒng)環(huán)境 OS:as4u5i386 系統(tǒng)硬件:hp prolient g3 CPU2.4g*2? / mem 1g /disk 68 g 功能描述:可以實現(xiàn)基本的撥號共享和簡單代理(adsl無認證,squid監(jiān)控功能) 二、???????????? 系統(tǒng)圖?
???????????????????????????????????????????????? Linux as4 u5 ????????????????????????????????????????? eth0:10.1.8.137:3128 adsl +quid ? ? ? 三、???????????? adsl安裝設(shè)置 (一)? 安裝(系統(tǒng)自帶版本號大于3.5.1否則rpm -uvh rp-ppoe-3.5.3.i386.rpm) (二)? 設(shè)置 步驟如下: #adsl-setup?
1.賬號數(shù)字 2.網(wǎng)卡eth0(作為代理的ip) 3.斷線后是否自動撥號yes(包月)/ no(其它) 4.輸入dns ip地址(adsl的DNS服務(wù)器) 5.adsl密碼 6.是否允許普通用戶關(guān)閉開啟adsl??? yes(可以) 7防火墻等級 0(不啟用) 8啟動時就撥號 no(普通)/ yes(包月) 9.摘要輸入yes?
共享網(wǎng)絡(luò)連接 #iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE?
開機啟動設(shè)置 1.chkconfig --add adsl 2.setup 3.選擇system service 4.選中adsl 5.ok退出 6.在/etc/rc.d/rc.local加入以下內(nèi)容?
echo "[ok]" echo "Drop ICMP from anywhere" echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all echo "[ok]" iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE?
通過 adsl-start adsl-stop adsl-status控制adsl連接查看ppp0連接狀況?
?
QUESTIONS: 1設(shè)置dns地址 /etc/resolv.conf nameserver?? 192.168.1.100 2如果ppp0沒有啟動 ifup PPP0 3.查看網(wǎng)絡(luò)連接 ifconfig -a ? ip綁定網(wǎng)卡 ifconfig etho 192.168.1.1 然后重啟網(wǎng)絡(luò)服務(wù) service network restart route -n 查看默認網(wǎng)關(guān)是否設(shè)置正確 用netconfig更改默認網(wǎng)關(guān) 使用計時上網(wǎng)的用戶需要去掉eth0的網(wǎng)關(guān)?
四、???????????? squid安裝設(shè)置 (一)? 安裝在 用系統(tǒng)自帶的disk2:\RedHat\RPMS \squid-2.5.STABLE14-1.4E Rpm –ivh squid-2.5.STABLE14-1.4E.rpm?
(二)? 軟件配置 在/etc/squid/squid.conf文件中加入如下內(nèi)容?
http_port 10.1.80.137(代理IP《eth0》):3128 (代理端口)?
cache_dir ufs /var/spool/squid 100 16 256? cache_access_log /var/log/squid/access.log cache_log /var/log/squid/cache.log cache_store_log /var/log/squid/store.log pid_filename /var/log/squid.pid ? #auth_param basic children 5 #auth_param basic realm Squid proxy-caching web server #auth_param basic credentialsttl 2 hours acl all src 0.0.0.0/0.0.0.0 http_access allow all??
cache_effective_user?? squid cache_effective_group? squid?
3.啟動步驟 (1)squid –z(建立緩沖目錄結(jié)構(gòu)) (2)sqiud start 注意: 如需管理加入一下內(nèi)容: #cp /usr/lib/squid/cachemgr.cgi /home/httpd/cgi-bin 在文件/etc/http/conf/htttp.conf加入以下內(nèi)容: <Location /cgi-bin/cachemgr.cgi> AuthTypeBasic AuthNamw"Squidadmin" AuthUserFile/usr/local/squid/etc/squid.pwd require valid-user </Location> 生成密碼文件 #cd /usr/local/squid/etc #htpasswd -c squid.pwd squidadmin? "創(chuàng)建密碼文件" New passwd: Re-type new passwd: Adding passwd for user squidadmin #chown apache:apche squid.pwd???? 將口令文件的屬主改為Apache 五、???????????? 客戶端設(shè)置 在IE的代理服務(wù)器參數(shù)如下: IP:10.1.80.137? 端口號:3128轉(zhuǎn)載于:https://blog.51cto.com/heyiyi/99833
總結(jié)
以上是生活随笔為你收集整理的单网卡Squid AS4 U5 设置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: feng作品推荐あかね色に染まる坂 染成
- 下一篇: PPLIVe是如何通过URL来启动程序的