免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5316 | 回复: 15
打印 上一主题 下一主题

[proxy] squid 不能用mac认证 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-01-13 21:40 |只看该作者 |倒序浏览

centos 6.3  安装  yum安装squid和http
没有能实现mac 地址认证,哪里有问题?????????????????????????
#
# Recommended minimum configuration:
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_user.txt


#acl localnet src 10.0.0.0/8    # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16        # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

acl usermac arp  8c:a9:82:b1:fd:14

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT




#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost



#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed

http_access allow usermac

http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 3128

# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.
#

cache_dir ufs /var/spool/squid 1024 16 256
cache_mem 1024 MB
cache_swap_low 90
cache_swap_high 95
minimum_object_size 0 KB
maximum_object_size 4096 KB

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320

QQ截图20150113213740.jpg (122.72 KB, 下载次数: 88)

QQ截图20150113213740.jpg

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
2 [报告]
发表于 2015-01-14 07:56 |只看该作者
要注意,acl是有顺序的
你的mac是在什么网段?

localnet已允许,如acl也在localnet内就会不能体现出来。

论坛徽章:
0
3 [报告]
发表于 2015-01-14 08:17 |只看该作者
回复 2# cryboy2001


    #acl localnet src 10.0.0.0/8    # RFC1918 possible internal network  我的网段属于这个,已经拒绝了这个网段。

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
4 [报告]
发表于 2015-01-14 08:36 |只看该作者
你的yum安装也可能不支持mac控制

如源码安装编译要加参数--enable-arp-acl

论坛徽章:
0
5 [报告]
发表于 2015-01-14 08:54 |只看该作者
回复 4# cryboy2001

上面那个截图就是我用yum安装后的结果,里面包含了mac的功能吧。


   

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
6 [报告]
发表于 2015-01-14 09:29 |只看该作者
哦,刚刚没注意。

你可以仔细一点,看看日志有没有记录,mac有没写错,squid重启,等等。

论坛徽章:
0
7 [报告]
发表于 2015-01-14 09:43 |只看该作者
回复 6# cryboy2001
老兄,能不能给我远程帮我看一下,我找了好久的原因,也没找到。你的qq号码是多少或者加我249468198


   

论坛徽章:
0
8 [报告]
发表于 2015-01-14 13:51 |只看该作者
回复 1# mengcun123


    你的squid的ip和控制的那台客户段 在一个广播域内吗???

论坛徽章:
0
9 [报告]
发表于 2015-01-14 13:57 |只看该作者
回复 8# fly_jiang

不在一个广播域
   

论坛徽章:
0
10 [报告]
发表于 2015-01-14 15:38 |只看该作者
回复 9# mengcun123


    兄弟 那就对了,不在一个广播域就无效了。。。。。

你要在代理服务器上 开放 几个网口给不同vlan用。。。。不在一个广播域就没有冲突这一说了。。。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP