Advertisement
Guest User

Untitled

a guest
Nov 14th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.53 KB | None | 0 0
  1. 2015/11/14 20:06:13 kid1| Shutting down...
  2. 2015/11/14 20:06:13 kid1| Closing unlinkd pipe on FD 23
  3. 2015/11/14 20:06:13 kid1| storeDirWriteCleanLogs: Starting...
  4. 2015/11/14 20:06:13 kid1| Finished. Wrote 3495 entries.
  5. 2015/11/14 20:06:13 kid1| Took 0.00 seconds (2236084.45 entries/sec).
  6. CPU Usage: 0.112 seconds = 0.064 user + 0.048 sys
  7. Maximum Resident Size: 100192 KB
  8. Page faults with physical i/o: 2
  9. Memory usage for squid via mallinfo():
  10. total space in arena: 5648 KB
  11. Ordinary blocks: 5523 KB 28 blks
  12. Small blocks: 0 KB 5 blks
  13. Holding blocks: 36624 KB 7 blks
  14. Free Small blocks: 0 KB
  15. Free Ordinary blocks: 124 KB
  16. Total in use: 42147 KB 746%
  17. Total free: 124 KB 2%
  18. 2015/11/14 20:06:13 kid1| Logfile: closing log stdio:/sap/squid/log/store.log
  19. 2015/11/14 20:06:13 kid1| Logfile: closing log stdio:/sap/squid/log/access.log
  20. 2015/11/14 20:06:13 kid1| Open FD READ/WRITE 9 DNS Socket IPv6
  21. 2015/11/14 20:06:13 kid1| Open FD UNSTARTED 10 DNS Socket IPv4
  22. 2015/11/14 20:06:13 kid1| Open FD READ/WRITE 12 block.sh #1
  23. 2015/11/14 20:06:13 kid1| Open FD READING 14 block.sh #2
  24. 2015/11/14 20:06:13 kid1| Open FD READING 16 block.sh #3
  25. 2015/11/14 20:06:13 kid1| Open FD READING 18 block.sh #4
  26. 2015/11/14 20:06:13 kid1| Open FD READING 21 block.sh #5
  27. 2015/11/14 20:06:13 kid1| Squid Cache (Version 3.4.8): Exiting normally.
  28. 2015/11/14 20:06:14 kid1| Set Current Directory to /sap/var/spool/squid
  29. 2015/11/14 20:06:14 kid1| Starting Squid Cache version 3.4.8 for x86_64-pc-linux-gnu...
  30. 2015/11/14 20:06:14 kid1| Process ID 11318
  31. 2015/11/14 20:06:14 kid1| Process Roles: worker
  32. 2015/11/14 20:06:14 kid1| With 65535 file descriptors available
  33. 2015/11/14 20:06:14 kid1| Initializing IP Cache...
  34. 2015/11/14 20:06:14 kid1| DNS Socket created at [::], FD 7
  35. 2015/11/14 20:06:14 kid1| DNS Socket created at 0.0.0.0, FD 8
  36. 2015/11/14 20:06:14 kid1| Adding nameserver fd00::c225:6ff:fe71:2b from /etc/resolv.conf
  37. 2015/11/14 20:06:14 kid1| helperOpenServers: Starting 0/4 'basic_ncsa_auth' processes
  38. 2015/11/14 20:06:14 kid1| helperOpenServers: No 'basic_ncsa_auth' processes needed.
  39. 2015/11/14 20:06:14 kid1| helperOpenServers: Starting 5/5 'block.sh' processes
  40. 2015/11/14 20:06:14 kid1| Logfile: opening log /sap/squid/log/access.log
  41. 2015/11/14 20:06:14 kid1| WARNING: log name now starts with a module name. Use 'stdio:/sap/squid/log/access.log'
  42. 2015/11/14 20:06:14 kid1| Unlinkd pipe opened on FD 23
  43. 2015/11/14 20:06:14 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
  44. 2015/11/14 20:06:14 kid1| Logfile: opening log /sap/squid/log/store.log
  45. 2015/11/14 20:06:14 kid1| WARNING: log name now starts with a module name. Use 'stdio:/sap/squid/log/store.log'
  46. 2015/11/14 20:06:14 kid1| Swap maxSize 65536 + 8192 KB, estimated 5671 objects
  47. 2015/11/14 20:06:14 kid1| Target number of buckets: 283
  48. 2015/11/14 20:06:14 kid1| Using 8192 Store buckets
  49. 2015/11/14 20:06:14 kid1| Max Mem size: 8192 KB
  50. 2015/11/14 20:06:14 kid1| Max Swap size: 65536 KB
  51. 2015/11/14 20:06:14 kid1| Rebuilding storage in /sap/var/spool/squid (clean log)
  52. 2015/11/14 20:06:14 kid1| Using Least Load store dir selection
  53. 2015/11/14 20:06:14 kid1| Set Current Directory to /sap/var/spool/squid
  54. 2015/11/14 20:06:14 kid1| Finished loading MIME types and icons.
  55. 2015/11/14 20:06:14 kid1| HTCP Disabled.
  56. 2015/11/14 20:06:14 kid1| Pinger socket opened on FD 30
  57. 2015/11/14 20:06:14 kid1| Squid plugin modules loaded: 0
  58. 2015/11/14 20:06:14 kid1| Adaptation support is off.
  59. 2015/11/14 20:06:14 kid1| Accepting HTTP Socket connections at local=[::]:3129 remote=[::] FD 27 flags=9
  60. 2015/11/14 20:06:14 kid1| Accepting NAT intercepted HTTP Socket connections at local=[::]:3128 remote=[::] FD 28 flags=41
  61. 2015/11/14 20:06:14| pinger: Initialising ICMP pinger ...
  62. 2015/11/14 20:06:14| pinger: ICMP socket opened.
  63. 2015/11/14 20:06:14| pinger: ICMPv6 socket opened
  64. 2015/11/14 20:06:14 kid1| Done reading /sap/var/spool/squid swaplog (3495 entries)
  65. 2015/11/14 20:06:14 kid1| Finished rebuilding storage from disk.
  66. 2015/11/14 20:06:14 kid1| 3495 Entries scanned
  67. 2015/11/14 20:06:14 kid1| 0 Invalid entries.
  68. 2015/11/14 20:06:14 kid1| 0 With invalid flags.
  69. 2015/11/14 20:06:14 kid1| 3495 Objects loaded.
  70. 2015/11/14 20:06:14 kid1| 0 Objects expired.
  71. 2015/11/14 20:06:14 kid1| 0 Objects cancelled.
  72. 2015/11/14 20:06:14 kid1| 0 Duplicate URLs purged.
  73. 2015/11/14 20:06:14 kid1| 0 Swapfile clashes avoided.
  74. 2015/11/14 20:06:14 kid1| Took 0.03 seconds (128417.11 objects/sec).
  75. 2015/11/14 20:06:14 kid1| Beginning Validation Procedure
  76. 2015/11/14 20:06:14 kid1| Completed Validation Procedure
  77. 2015/11/14 20:06:14 kid1| Validated 3494 Entries
  78. 2015/11/14 20:06:14 kid1| store_swap_size = 58976.00 KB
  79. 2015/11/14 20:06:15 kid1| storeLateRelease: released 0 objects
  80. 2015/11/14 20:06:48 kid1| WARNING: Forwarding loop detected for:
  81. GET / HTTP/1.1
  82. Host: web.de
  83. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
  84. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  85. Accept-Language: de,en-US;q=0.7,en;q=0.3
  86. Accept-Encoding: gzip, deflate
  87. Referer: http://web.de/
  88. 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
  89. Via: 1.1 debian (squid/3.4.8)
  90. X-Forwarded-For: 192.168.178.79
  91. Cache-Control: max-age=259200
  92. Connection: keep-alive
  93.  
  94.  
  95. 2015/11/14 20:06:48 kid1| WARNING: Forwarding loop detected for:
  96. GET /Artwork/SN.png HTTP/1.1
  97. Host: www.squid-cache.org
  98. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
  99. Accept: image/png,image/*;q=0.8,*/*;q=0.5
  100. Accept-Language: de,en-US;q=0.7,en;q=0.3
  101. Accept-Encoding: gzip, deflate
  102. Referer: http://web.de/
  103. Via: 1.1 debian (squid/3.4.8)
  104. X-Forwarded-For: 192.168.178.79
  105. Cache-Control: max-age=259200
  106. Connection: keep-alive
  107.  
  108.  
  109. 2015/11/14 20:06:56 kid1| WARNING: Forwarding loop detected for:
  110. GET / HTTP/1.1
  111. Host: web.de
  112. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
  113. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  114. Accept-Language: de,en-US;q=0.7,en;q=0.3
  115. Accept-Encoding: gzip, deflate
  116. Referer: http://web.de/
  117. 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
  118. Via: 1.1 debian (squid/3.4.8)
  119. X-Forwarded-For: 192.168.178.79
  120. Cache-Control: max-age=0
  121. Connection: keep-alive
  122.  
  123.  
  124. 2015/11/14 20:06:56 kid1| WARNING: Forwarding loop detected for:
  125. GET /Artwork/SN.png HTTP/1.1
  126. Host: www.squid-cache.org
  127. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
  128. Accept: image/png,image/*;q=0.8,*/*;q=0.5
  129. Accept-Language: de,en-US;q=0.7,en;q=0.3
  130. Accept-Encoding: gzip, deflate
  131. Referer: http://web.de/
  132. Via: 1.1 debian (squid/3.4.8)
  133. X-Forwarded-For: 192.168.178.79
  134. Cache-Control: max-age=259200
  135. Connection: keep-alive
  136.  
  137.  
  138. 2015/11/14 20:06:59 kid1| WARNING: Forwarding loop detected for:
  139. GET / HTTP/1.1
  140. Host: web.de
  141. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
  142. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  143. Accept-Language: de,en-US;q=0.7,en;q=0.3
  144. Accept-Encoding: gzip, deflate
  145. Referer: http://web.de/
  146. 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
  147. Via: 1.1 debian (squid/3.4.8)
  148. X-Forwarded-For: 192.168.178.79
  149. Cache-Control: max-age=259200
  150. Connection: keep-alive
  151.  
  152.  
  153. 2015/11/14 20:07:00 kid1| WARNING: Forwarding loop detected for:
  154. GET /Artwork/SN.png HTTP/1.1
  155. Host: www.squid-cache.org
  156. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0
  157. Accept: image/png,image/*;q=0.8,*/*;q=0.5
  158. Accept-Language: de,en-US;q=0.7,en;q=0.3
  159. Accept-Encoding: gzip, deflate
  160. Referer: http://web.de/
  161. Via: 1.1 debian (squid/3.4.8)
  162. X-Forwarded-For: 192.168.178.79
  163. Cache-Control: max-age=259200
  164. Connection: keep-alive
  165.  
  166.  
  167. 2015/11/14 20:07:14 kid1| helperHandleRead: unexpected read from blockscript #Hlpr0, 3 bytes 'OK
  168. '
  169. 2015/11/14 20:07:14 kid1| helperHandleRead: unexpected read from blockscript #Hlpr0, 3 bytes 'OK
  170. '
  171. 2015/11/14 20:07:14 kid1| helperHandleRead: unexpected read from blockscript #Hlpr0, 3 bytes 'OK
  172. '
  173. 2015/11/14 20:07:14 kid1| helperHandleRead: unexpected read from blockscript #Hlpr0, 3 bytes 'OK
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180. // configuration script squid.conf
  181. auth_param basic program /usr/lib/squid3/basic_ncsa_auth /sap/squid/passwd
  182. auth_param basic children 4
  183. auth_param basic utf8 on
  184. auth_param basic realm Bitte geben Sie Ihren Benutzernamen und Passwort fuer die Internetberechtigung ein!
  185. auth_param basic credentialsttl 60 minutes
  186. auth_param basic casesensitive on
  187.  
  188. external_acl_type blockscript ttl=3600 %DST /sap/squid/block.sh
  189.  
  190. acl ncsa_users proxy_auth REQUIRED
  191. acl mysql_block external blockscript
  192.  
  193. acl localnet src 127.0.0.1
  194. acl localnet src 192.168.178.79
  195.  
  196. acl SSL_ports port 443 # https
  197. acl SSL_ports port 563 # snews
  198. acl SSL_ports port 873 # rsync
  199. acl Safe_ports port 80 # http
  200. acl Safe_ports port 21 # ftp
  201. acl Safe_ports port 443 # https
  202. acl Safe_ports port 70 # gopher
  203. acl Safe_ports port 210 # wais
  204. acl Safe_ports port 1025-65535 # unregistered ports
  205. acl Safe_ports port 280 # http-mgmt
  206. acl Safe_ports port 488 # gss-http
  207. acl Safe_ports port 591 # filemaker
  208. acl Safe_ports port 777 # multiling http
  209. acl Safe_ports port 631 # cups
  210. acl Safe_ports port 873 # rsync
  211. acl Safe_ports port 901 # SWAT
  212. acl purge method PURGE
  213. acl CONNECT method CONNECT
  214.  
  215. http_access allow manager localhost
  216. http_access deny manager
  217. http_access allow purge localhost
  218. http_access deny purge
  219. http_access deny !Safe_ports
  220. http_access deny CONNECT !SSL_ports
  221. http_access allow localhost
  222.  
  223. # Deny requests to certain unsafe ports
  224. http_access deny !Safe_ports
  225. http_access deny CONNECT !SSL_ports
  226.  
  227. http_access allow mysql_block
  228.  
  229. http_access allow localhost manager
  230. http_access allow localnet ncsa_users
  231. http_access allow localhost
  232.  
  233. icp_access allow localnet
  234. icp_access deny all
  235. http_access deny all
  236.  
  237. http_port 3129
  238. http_port 3128 intercept
  239.  
  240. cache_mgr jkallup@web.de
  241. cache_mem 8 MB
  242.  
  243. cache_effective_user squid
  244.  
  245. # We recommend you to use at least the following line.
  246. hierarchy_stoplist cgi-bin ?
  247.  
  248. cache_dir ufs /sap/var/spool/squid 64 16 128
  249.  
  250. cache_access_log /sap/squid/log/access.log
  251. cache_log /sap/squid/log/cache.log
  252. cache_store_log /sap/squid/log/store.log
  253.  
  254. # Leave coredumps in the first cache dir
  255. coredump_dir /sap/var/spool/squid
  256.  
  257. # Add any of your own refresh_pattern entries above these.
  258. refresh_pattern ^ftp: 1440 20% 10080
  259. refresh_pattern ^gopher: 1440 0% 1440
  260. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  261. refresh_pattern . 0 20% 4320
  262.  
  263. logformat squid %tl.%03tu %6tr %>a %un %Ss/%03>Hs %<st %rm %ru %Sh/%<A %mt
  264.  
  265.  
  266.  
  267. // external helper.sh
  268. #!/usr/bin/php
  269. <?php
  270. $db = new mysqli("<server>", "<user>", "<password>", "<database>");
  271. if ($db->connect_error > 0) {
  272. die(fwrite(STDOUT,"ERR\n"));
  273. }
  274.  
  275. while (!feof(STDIN))
  276. {
  277. $i = trim(fgets(STDIN));
  278. $s = explode(" ", $i);
  279. $dst = $s[0];
  280.  
  281. $row = array();
  282. $query = "SELECT name,blocked FROM squid WHERE name = '$dst'";
  283.  
  284. if ($res = $db->query($query)) {
  285. $row = $res->fetch_row();
  286. $rec = $res->num_rows;
  287.  
  288. if (($row[1] == 1))
  289. fwrite(STDOUT,"ERR\n"); else
  290. fwrite(STDOUT,"OK\n");
  291.  
  292. $res->close();
  293. continue;
  294. }
  295. }
  296.  
  297. $db->close();
  298. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement