Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2015/11/14 20:06:13 kid1| Shutting down...
- 2015/11/14 20:06:13 kid1| Closing unlinkd pipe on FD 23
- 2015/11/14 20:06:13 kid1| storeDirWriteCleanLogs: Starting...
- 2015/11/14 20:06:13 kid1| Finished. Wrote 3495 entries.
- 2015/11/14 20:06:13 kid1| Took 0.00 seconds (2236084.45 entries/sec).
- CPU Usage: 0.112 seconds = 0.064 user + 0.048 sys
- Maximum Resident Size: 100192 KB
- Page faults with physical i/o: 2
- Memory usage for squid via mallinfo():
- total space in arena: 5648 KB
- Ordinary blocks: 5523 KB 28 blks
- Small blocks: 0 KB 5 blks
- Holding blocks: 36624 KB 7 blks
- Free Small blocks: 0 KB
- Free Ordinary blocks: 124 KB
- Total in use: 42147 KB 746%
- Total free: 124 KB 2%
- 2015/11/14 20:06:13 kid1| Logfile: closing log stdio:/sap/squid/log/store.log
- 2015/11/14 20:06:13 kid1| Logfile: closing log stdio:/sap/squid/log/access.log
- 2015/11/14 20:06:13 kid1| Open FD READ/WRITE 9 DNS Socket IPv6
- 2015/11/14 20:06:13 kid1| Open FD UNSTARTED 10 DNS Socket IPv4
- 2015/11/14 20:06:13 kid1| Open FD READ/WRITE 12 block.sh #1
- 2015/11/14 20:06:13 kid1| Open FD READING 14 block.sh #2
- 2015/11/14 20:06:13 kid1| Open FD READING 16 block.sh #3
- 2015/11/14 20:06:13 kid1| Open FD READING 18 block.sh #4
- 2015/11/14 20:06:13 kid1| Open FD READING 21 block.sh #5
- 2015/11/14 20:06:13 kid1| Squid Cache (Version 3.4.8): Exiting normally.
- 2015/11/14 20:06:14 kid1| Set Current Directory to /sap/var/spool/squid
- 2015/11/14 20:06:14 kid1| Starting Squid Cache version 3.4.8 for x86_64-pc-linux-gnu...
- 2015/11/14 20:06:14 kid1| Process ID 11318
- 2015/11/14 20:06:14 kid1| Process Roles: worker
- 2015/11/14 20:06:14 kid1| With 65535 file descriptors available
- 2015/11/14 20:06:14 kid1| Initializing IP Cache...
- 2015/11/14 20:06:14 kid1| DNS Socket created at [::], FD 7
- 2015/11/14 20:06:14 kid1| DNS Socket created at 0.0.0.0, FD 8
- 2015/11/14 20:06:14 kid1| Adding nameserver fd00::c225:6ff:fe71:2b from /etc/resolv.conf
- 2015/11/14 20:06:14 kid1| helperOpenServers: Starting 0/4 'basic_ncsa_auth' processes
- 2015/11/14 20:06:14 kid1| helperOpenServers: No 'basic_ncsa_auth' processes needed.
- 2015/11/14 20:06:14 kid1| helperOpenServers: Starting 5/5 'block.sh' processes
- 2015/11/14 20:06:14 kid1| Logfile: opening log /sap/squid/log/access.log
- 2015/11/14 20:06:14 kid1| WARNING: log name now starts with a module name. Use 'stdio:/sap/squid/log/access.log'
- 2015/11/14 20:06:14 kid1| Unlinkd pipe opened on FD 23
- 2015/11/14 20:06:14 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
- 2015/11/14 20:06:14 kid1| Logfile: opening log /sap/squid/log/store.log
- 2015/11/14 20:06:14 kid1| WARNING: log name now starts with a module name. Use 'stdio:/sap/squid/log/store.log'
- 2015/11/14 20:06:14 kid1| Swap maxSize 65536 + 8192 KB, estimated 5671 objects
- 2015/11/14 20:06:14 kid1| Target number of buckets: 283
- 2015/11/14 20:06:14 kid1| Using 8192 Store buckets
- 2015/11/14 20:06:14 kid1| Max Mem size: 8192 KB
- 2015/11/14 20:06:14 kid1| Max Swap size: 65536 KB
- 2015/11/14 20:06:14 kid1| Rebuilding storage in /sap/var/spool/squid (clean log)
- 2015/11/14 20:06:14 kid1| Using Least Load store dir selection
- 2015/11/14 20:06:14 kid1| Set Current Directory to /sap/var/spool/squid
- 2015/11/14 20:06:14 kid1| Finished loading MIME types and icons.
- 2015/11/14 20:06:14 kid1| HTCP Disabled.
- 2015/11/14 20:06:14 kid1| Pinger socket opened on FD 30
- 2015/11/14 20:06:14 kid1| Squid plugin modules loaded: 0
- 2015/11/14 20:06:14 kid1| Adaptation support is off.
- 2015/11/14 20:06:14 kid1| Accepting HTTP Socket connections at local=[::]:3129 remote=[::] FD 27 flags=9
- 2015/11/14 20:06:14 kid1| Accepting NAT intercepted HTTP Socket connections at local=[::]:3128 remote=[::] FD 28 flags=41
- 2015/11/14 20:06:14| pinger: Initialising ICMP pinger ...
- 2015/11/14 20:06:14| pinger: ICMP socket opened.
- 2015/11/14 20:06:14| pinger: ICMPv6 socket opened
- 2015/11/14 20:06:14 kid1| Done reading /sap/var/spool/squid swaplog (3495 entries)
- 2015/11/14 20:06:14 kid1| Finished rebuilding storage from disk.
- 2015/11/14 20:06:14 kid1| 3495 Entries scanned
- 2015/11/14 20:06:14 kid1| 0 Invalid entries.
- 2015/11/14 20:06:14 kid1| 0 With invalid flags.
- 2015/11/14 20:06:14 kid1| 3495 Objects loaded.
- 2015/11/14 20:06:14 kid1| 0 Objects expired.
- 2015/11/14 20:06:14 kid1| 0 Objects cancelled.
- 2015/11/14 20:06:14 kid1| 0 Duplicate URLs purged.
- 2015/11/14 20:06:14 kid1| 0 Swapfile clashes avoided.
- 2015/11/14 20:06:14 kid1| Took 0.03 seconds (128417.11 objects/sec).
- 2015/11/14 20:06:14 kid1| Beginning Validation Procedure
- 2015/11/14 20:06:14 kid1| Completed Validation Procedure
- 2015/11/14 20:06:14 kid1| Validated 3494 Entries
- 2015/11/14 20:06:14 kid1| store_swap_size = 58976.00 KB
- 2015/11/14 20:06:15 kid1| storeLateRelease: released 0 objects
- 2015/11/14 20:06:48 kid1| WARNING: Forwarding loop detected for:
- GET / HTTP/1.1
- Host: web.de
- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Language: de,en-US;q=0.7,en;q=0.3
- Accept-Encoding: gzip, deflate
- Referer: http://web.de/
- Cookie: ns_sample=84; optimizelySegments=%7B%22709261429%22%3A%22false%22%2C%22700120985%22%3A%22none%22%2C%22739820282%22%3A%22ff%22%2C%22700492383%22%3A%22referral%22%7D; optimizelyEndUserId=oeu1445532487322r0.35342935559980937; optimizelyBuckets=%7B%223274001224%22%3A%223282160948%22%7D; ui_cid=XOQNrOwJ4kchMtB1ELC3; SSID=CAD0Sx0OAAAAAAB7B0VWh7BBAHsHRVYHAAAAAAAAAAAAyWhGVgAXHQQAAAEIAAAAyWhGVgEA; SSRT=AHVGVgADAQ
- Via: 1.1 debian (squid/3.4.8)
- X-Forwarded-For: 192.168.178.79
- Cache-Control: max-age=259200
- Connection: keep-alive
- 2015/11/14 20:06:48 kid1| WARNING: Forwarding loop detected for:
- GET /Artwork/SN.png HTTP/1.1
- Host: www.squid-cache.org
- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
- Accept: image/png,image/*;q=0.8,*/*;q=0.5
- Accept-Language: de,en-US;q=0.7,en;q=0.3
- Accept-Encoding: gzip, deflate
- Referer: http://web.de/
- Via: 1.1 debian (squid/3.4.8)
- X-Forwarded-For: 192.168.178.79
- Cache-Control: max-age=259200
- Connection: keep-alive
- 2015/11/14 20:06:56 kid1| WARNING: Forwarding loop detected for:
- GET / HTTP/1.1
- Host: web.de
- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Language: de,en-US;q=0.7,en;q=0.3
- Accept-Encoding: gzip, deflate
- Referer: http://web.de/
- Cookie: ns_sample=84; optimizelySegments=%7B%22709261429%22%3A%22false%22%2C%22700120985%22%3A%22none%22%2C%22739820282%22%3A%22ff%22%2C%22700492383%22%3A%22referral%22%7D; optimizelyEndUserId=oeu1445532487322r0.35342935559980937; optimizelyBuckets=%7B%223274001224%22%3A%223282160948%22%7D; ui_cid=XOQNrOwJ4kchMtB1ELC3; SSID=CAD0Sx0OAAAAAAB7B0VWh7BBAHsHRVYHAAAAAAAAAAAAyWhGVgAXHQQAAAEIAAAAyWhGVgEA; SSRT=AHVGVgADAQ
- Via: 1.1 debian (squid/3.4.8)
- X-Forwarded-For: 192.168.178.79
- Cache-Control: max-age=0
- Connection: keep-alive
- 2015/11/14 20:06:56 kid1| WARNING: Forwarding loop detected for:
- GET /Artwork/SN.png HTTP/1.1
- Host: www.squid-cache.org
- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
- Accept: image/png,image/*;q=0.8,*/*;q=0.5
- Accept-Language: de,en-US;q=0.7,en;q=0.3
- Accept-Encoding: gzip, deflate
- Referer: http://web.de/
- Via: 1.1 debian (squid/3.4.8)
- X-Forwarded-For: 192.168.178.79
- Cache-Control: max-age=259200
- Connection: keep-alive
- 2015/11/14 20:06:59 kid1| WARNING: Forwarding loop detected for:
- GET / HTTP/1.1
- Host: web.de
- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
- Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- Accept-Language: de,en-US;q=0.7,en;q=0.3
- Accept-Encoding: gzip, deflate
- Referer: http://web.de/
- Cookie: ns_sample=84; optimizelySegments=%7B%22709261429%22%3A%22false%22%2C%22700120985%22%3A%22none%22%2C%22739820282%22%3A%22ff%22%2C%22700492383%22%3A%22referral%22%7D; optimizelyEndUserId=oeu1445532487322r0.35342935559980937; optimizelyBuckets=%7B%223274001224%22%3A%223282160948%22%7D; ui_cid=XOQNrOwJ4kchMtB1ELC3; SSID=CAD0Sx0OAAAAAAB7B0VWh7BBAHsHRVYHAAAAAAAAAAAAyWhGVgAXHQQAAAEIAAAAyWhGVgEA; SSRT=AHVGVgADAQ
- Via: 1.1 debian (squid/3.4.8)
- X-Forwarded-For: 192.168.178.79
- Cache-Control: max-age=259200
- Connection: keep-alive
- 2015/11/14 20:07:00 kid1| WARNING: Forwarding loop detected for:
- GET /Artwork/SN.png HTTP/1.1
- Host: www.squid-cache.org
- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
- Accept: image/png,image/*;q=0.8,*/*;q=0.5
- Accept-Language: de,en-US;q=0.7,en;q=0.3
- Accept-Encoding: gzip, deflate
- Referer: http://web.de/
- Via: 1.1 debian (squid/3.4.8)
- X-Forwarded-For: 192.168.178.79
- Cache-Control: max-age=259200
- Connection: keep-alive
- 2015/11/14 20:07:14 kid1| helperHandleRead: unexpected read from blockscript #Hlpr0, 3 bytes 'OK
- '
- 2015/11/14 20:07:14 kid1| helperHandleRead: unexpected read from blockscript #Hlpr0, 3 bytes 'OK
- '
- 2015/11/14 20:07:14 kid1| helperHandleRead: unexpected read from blockscript #Hlpr0, 3 bytes 'OK
- '
- 2015/11/14 20:07:14 kid1| helperHandleRead: unexpected read from blockscript #Hlpr0, 3 bytes 'OK
- // configuration script squid.conf
- auth_param basic program /usr/lib/squid3/basic_ncsa_auth /sap/squid/passwd
- auth_param basic children 4
- auth_param basic utf8 on
- auth_param basic realm Bitte geben Sie Ihren Benutzernamen und Passwort fuer die Internetberechtigung ein!
- auth_param basic credentialsttl 60 minutes
- auth_param basic casesensitive on
- external_acl_type blockscript ttl=3600 %DST /sap/squid/block.sh
- acl ncsa_users proxy_auth REQUIRED
- acl mysql_block external blockscript
- acl localnet src 127.0.0.1
- acl localnet src 192.168.178.79
- acl SSL_ports port 443 # https
- acl SSL_ports port 563 # snews
- acl SSL_ports port 873 # rsync
- 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 Safe_ports port 631 # cups
- acl Safe_ports port 873 # rsync
- acl Safe_ports port 901 # SWAT
- acl purge method PURGE
- acl CONNECT method CONNECT
- http_access allow manager localhost
- http_access deny manager
- http_access allow purge localhost
- http_access deny purge
- http_access deny !Safe_ports
- http_access deny CONNECT !SSL_ports
- http_access allow localhost
- # Deny requests to certain unsafe ports
- http_access deny !Safe_ports
- http_access deny CONNECT !SSL_ports
- http_access allow mysql_block
- http_access allow localhost manager
- http_access allow localnet ncsa_users
- http_access allow localhost
- icp_access allow localnet
- icp_access deny all
- http_access deny all
- http_port 3129
- http_port 3128 intercept
- cache_mgr jkallup@web.de
- cache_mem 8 MB
- cache_effective_user squid
- # We recommend you to use at least the following line.
- hierarchy_stoplist cgi-bin ?
- cache_dir ufs /sap/var/spool/squid 64 16 128
- cache_access_log /sap/squid/log/access.log
- cache_log /sap/squid/log/cache.log
- cache_store_log /sap/squid/log/store.log
- # Leave coredumps in the first cache dir
- coredump_dir /sap/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
- logformat squid %tl.%03tu %6tr %>a %un %Ss/%03>Hs %<st %rm %ru %Sh/%<A %mt
- // external helper.sh
- #!/usr/bin/php
- <?php
- $db = new mysqli("<server>", "<user>", "<password>", "<database>");
- if ($db->connect_error > 0) {
- die(fwrite(STDOUT,"ERR\n"));
- }
- while (!feof(STDIN))
- {
- $i = trim(fgets(STDIN));
- $s = explode(" ", $i);
- $dst = $s[0];
- $row = array();
- $query = "SELECT name,blocked FROM squid WHERE name = '$dst'";
- if ($res = $db->query($query)) {
- $row = $res->fetch_row();
- $rec = $res->num_rows;
- if (($row[1] == 1))
- fwrite(STDOUT,"ERR\n"); else
- fwrite(STDOUT,"OK\n");
- $res->close();
- continue;
- }
- }
- $db->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement