{"id":38,"date":"2017-10-09T12:36:00","date_gmt":"2017-10-09T12:36:00","guid":{"rendered":"https:\/\/linuxadmin.melberi.com\/uncategorized\/squid-time-based-access"},"modified":"2017-10-09T16:53:01","modified_gmt":"2017-10-09T16:53:01","slug":"squid-time-based-access","status":"publish","type":"post","link":"https:\/\/www.melberi.com\/linuxadmin\/squid\/squid-time-based-access","title":{"rendered":"Squid time based Access Control"},"content":{"rendered":"<p>How to Configure Time based access Control in squid proxy server<\/p>\n<p>Below you can find the squid time based access.<\/p>\n<p><b>Edit squid.conf and add the below mentioned lines<\/b><\/p>\n<h3><u><b>User Based restriction<\/b><\/u><\/h3>\n<div>acl USER1 proxy_auth raj<br \/>\nacl USER2 proxy_auth sam<br \/>\nacl DAY time 08:00-18:00<br \/>\nhttp_access allow USER1 DAY<br \/>\nhttp_access deny USER1<br \/>\nhttp_access allow USER2 !DAY<br \/>\nhttp_access deny USER2<\/div>\n<h3><u><b style=\"background-color: white;\">Special Access<\/b><\/u><\/h3>\n<div>acl After_Office time SMTWHFA 20:00-24:00<br \/>\nacl Before_Office time SMTWHFA 00:00-08:30<\/div>\n<div>acl Proxy_Afrer8 proxy_auth\u00a0 user1 user2<\/div>\n<div>http_access deny\u00a0 Before_Office #(Deny access to all users)<\/div>\n<div>http_access deny After_Office !Proxy_Afrer8\u00a0 # (This will exclude user1,user2)<\/div>\n<div><\/div>\n<div>http_access allow ntlm_users<br \/>\nhttp_access deny all\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<b>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/b><\/div>\n<h3><u><b style=\"background-color: white;\">IP Based Restriction<\/b><\/u><\/h3>\n<p>acl IPGROUP01 src 10.1.2.3 10.1.2.4<br \/>\nacl WORKINGHOUR time MTWHF 08:30-17:30<br \/>\nhttp_access allow IPGROUP01 WORKINGHOUR<br \/>\nhttp_access deny IPGROUP01<\/p>\n<p><b>Restart squid<\/b><br \/>\n<strong>#service httpd restart<\/strong><\/p>\n<p>Tags: squid time acl, squid time based access, squid time restriction, squid time based acl, squid time limit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Configure Time based access Control in squid proxy server Below you can find the squid time based access. Edit squid.conf and add the below mentioned lines User Based&#8230; <a href=\"https:\/\/www.melberi.com\/linuxadmin\/squid\/squid-time-based-access\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[99,84],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/38"}],"collection":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":4,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":611,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/38\/revisions\/611"}],"wp:attachment":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}