2022年用squid+iptable做透明代理出现DNS问题代理服务器教程.docx
《2022年用squid+iptable做透明代理出现DNS问题代理服务器教程.docx》由会员分享,可在线阅读,更多相关《2022年用squid+iptable做透明代理出现DNS问题代理服务器教程.docx(11页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、2022年用squid+iptable做透明代理出现DNS问题代理服务器教程摘要:用squid+iptable做透亮代理出现DNS问题配置方法:quote:2f931843da用squid+iptable实现透亮代理squid和iptable的详细安装我在此不做太多说明,一般看看它们的说明即可。我公司用一台机器作为代理上网。eth0连接外部网,eth1连接内部网。下面把我的配置写下来。iptable的配置,在/etc/rc.d/书目下用touch吩咐建立firewall文件,执行chmodu+xfirewll以更改文件属性,编辑/etc/rc.d/rc.local文件,在末尾加上/etc/rc
2、.d/firewall以确保开机时能自动执行该脚本。echostartingipforwardecho1>/proc/sys/net/ipv4/ip_forwardechostartingiptablesrulesmodprobeip_tablesmodprobeip_nat_ftp/sbin/iptables-F-tnatiptables-tnat-APREROUTING-ieth1-ptcp-mtcp-dport80-jREDIRECT-to-ports3128#将全部80端口的包转发到3128端口iptables-tnat-APOSTROUTING-oeth0-jMASQUERAD
3、E#对eth0端口进行欺瞒squid的配置http_port3128cache_mem512Mcache_swap_low75cache_swap_high95maximum_object_size1024KBcache_dirufs/usr/local/squid/cache6000016256cache_access_log/var/squid/logs/access.logcache_log/dev/nullcache_store_lognonedebug_optionsALL,1icp_accessallowallicp_query_timeout2000cache_effective
4、_usernobodycache_effective_groupnogrouphttpd_accel_hostvirtualhttpd_accel_port80httpd_accel_with_proxyonhttpd_accel_uses_host_headeronaclallsrc0.0.0.0/0acllocalnetsrc10.0.0.0/20http_accessallowlocalnethttp_accessdenyallaclQUERYurlpath_regex-icgi-bin?.exe$.zip$.mp3$.mp2$.rm$.avi
5、36;no_cachedenyQUERYreference_age3daysquick_abort_min16KBquick_abort_max16KBquick_abort_pct95connect_timeout60secondsread_timeout3minutesrequest_timeout30secondsclient_lifetime30secondshalf_closed_clientsoffpconn_timeout60secondsident_timeout10secondsshutdown_lifetime10secondsmemory_poolsoffmemory_p
6、ools_limit0/quote:2f931843da其中reference_age3days,ident_timeout10seconds两行出错:quote:2f931843da2022/03/0315:09:34|parseConfigFile:line3379unrecognized:reference_age3days2022/03/0315:34:57|parseConfigFile:line1645unrecognized:ident_timeout10seconds/quote:2f931843da透亮代理可以实现,但是DNS有问题,在客户端阅读器输入IP可以访问外网,输入域
7、名就不行,在客户端吩咐行模式下执行nslookup吩咐,提示code:1:2f931843daDNSrequesttimeout/code:1:2f931843da在squid.conf中加入code:1:2f931843daaclSafe_portsport53#dns/code:1:2f931843da故障照旧请大侠帮助看看如何处理,感谢!水中风铃 回复于:2022-03-03 17:21:58iptables-AFORWARD-pudp-dport53-jACCEPTplatinum 回复于:2022-03-03 17:30:13其实可以在LINUX上起一个bind然后让client的D
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022 年用 squid iptable 透明 代理 出现 DNS 问题 代理服务器 教程
限制150内