zoukankan      html  css  js  c++  java
  • squid白名单

    http_access deny all    #取消注释
    http_access allow all --> http_access allow xxx_custom_ip
    
    #添加系统服务器IP白名单
    acl xdaili_custom_ip src 60.191.4.xxx/32
    acl xdaili_custom_ip src 139.196.210.xxx/32
    acl xdaili_custom_ip src 139.196.172.xxx/32
    acl xdaili_custom_ip src 106.15.42.xxx/32
    
    
    #添加讯代理IP白名单
    acl xxx_custom_ip src xx.xx.xx.x/32
    
    #删除文件中包含"xx.xx.xx.x"的那行
    sed -i '/xx.xx.xx.x/d' file.txt
    
    #squid重载配置文件
    /usr/sbin/squid -k reconfigure
    
    #以下内容必需在配置文件最后一行
    http_access allow xxx_custom_ip
    http_access deny all
    
    #在指定行后插入内容(N;4a,在第四行后面添加内容,a:指定行数的后面,i:指定行数的前面)
    sed -e 'N;4aacl xdaili_custom_ip src 1.192.228.102/32' file.txt
    http_port 3128 transparent    #Squid默认端口 
    acl baimingdansite url_regex -i "/etc/squid/baimingdan.site"    #定义白名单 
    acl heimingdansite url_regex -i "/etc/squid/heimingdan.site"    #定义黑名单 
    acl liwai src "/etc/squid/liwai_ip"    #定义例外IP 
    acl lingdao src "/etc/squid/lingdao_ip"        #定中层领导IP(受控,使用黑名单人员) 
    acl zhiyuan src "/etc/squid/zhiyuan_ip"        #定义职员IP(受控,使用白名单人员)
    
    http_access allow liwai        #首先允许例外IP 
    http_access deny heimingdansite        #拒绝黑名单 
    http_access allow lingdao    #允许中层领导(黑名单用户)上网 
    http_access deny !baimingdansite    #拒绝不在白名单内的网站 
    http_access allow zhiyuan    #职员IP(白名单用户)上网
    
    cache_mem 512 MB    #分配内存 
    maximum_object_size 4 MB    #不存储超过4MB的文件 
    maximum_object_size_in_memory 4096 KB    #超过4M的文件内存不进行缓存 
    cache_dir ufs /var/spool/squid 4096 16 256    #缓存文件夹路径和参数,4096表示4G,目录分16组,每组256个目录 
    cache_effective_user squid    #用户,默认的 
    cache_effective_group squid    #用户组 
    access_log /var/log/squid/access.log    #日志 
    cache_log /var/log/squid/cache.log    #日志 
    cache_store_log /var/log/squid/store.log    #日志 
    logfile_rotate 10    #一般LOG文件轮换,用处不大,小型网络可以设置10-20,中型5-10,大型1-2 
    visible_hostname mail.iewb.nett    #服务器名 
    cache_mgr jimmy@iewb.net    #你的邮箱 
    http_access deny all    #拒绝不在ACL控制列表中的所有访问
  • 相关阅读:
    【Educational Codeforces Round 101 (Rated for Div. 2) C】Building a Fence
    【Codeforces Round #698 (Div. 2) C】Nezzar and Symmetric Array
    【Codeforces Round #696 (Div. 2) D】Cleaning
    【Codeforces Round #696 (Div. 2) C】Array Destruction
    【Educational Codeforces Round 102 D】Program
    【Educational Codeforces Round 102 C】No More Inversions
    【Good Bye 2020 G】Song of the Sirens
    【Good Bye 2020 F】Euclid's nightmare
    使用mobx入门
    requestAnimationFrame 控制速度模拟setinterval
  • 原文地址:https://www.cnblogs.com/vijayfly/p/6550182.html
Copyright © 2011-2022 走看看