{"id":246,"date":"2021-03-08T20:13:55","date_gmt":"2021-03-08T19:13:55","guid":{"rendered":"http:\/\/zimplicity.hopto.org\/?p=246"},"modified":"2021-03-08T20:13:55","modified_gmt":"2021-03-08T19:13:55","slug":"restricting-access","status":"publish","type":"post","link":"https:\/\/zimplicity.hopto.org\/?p=246","title":{"rendered":"Restricting access"},"content":{"rendered":"\n<p>Important for restricting access:<\/p>\n\n\n\n<p><a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/howto\/access.html\">https:\/\/httpd.apache.org\/docs\/2.4\/howto\/access.html<\/a><\/p>\n\n\n\n<p>Added conf file to the extra folder: block-offending-ips.conf<\/p>\n\n\n\n<p>Here: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/local\/etc\/httpd\/extra<\/pre>\n\n\n\n<p>Code to add to file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;LocationMatch \"\/.*\"><br>&lt;RequireAll><br>Require all granted<br>Require not ip 39.94.137.167<br>#Repeat the \"Require not ip ...\" for each IP you want to block<br>&lt;\/RequireAll><br>&lt;\/LocationMatch><\/pre>\n\n\n\n<p>The linked to httpd.conf with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Include \/usr\/local\/etc\/httpd\/extra\/block-offending-ips.conf<\/pre>\n\n\n\n<p>Other methods are available for limiting access including hosts and domains.  But, I was seeing some hacking attempts and want a method to block IP addresses that are appearing in the tail commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tail -n 200 -f \/usr\/local\/var\/log\/httpd\/access_log\ntail -n 200 -f \/usr\/local\/var\/log\/httpd\/error_log<\/pre>\n\n\n\n<p>I feel like I can control things more effectively now.  Wish there were a simple tool to add IP addresses rather than editing this file.  Would make life easier.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Important for restricting access: https:\/\/httpd.apache.org\/docs\/2.4\/howto\/access.html Added conf file to the extra folder: block-offending-ips.conf Here: \/usr\/local\/etc\/httpd\/extra Code to add to file: &lt;LocationMatch &#8220;\/.*&#8221;>&lt;RequireAll>Require all grantedRequire not ip 39.94.137.167#Repeat the &#8220;Require not ip &#8230;&#8221; for each IP you want to block&lt;\/RequireAll>&lt;\/LocationMatch> The linked to httpd.conf with: Include \/usr\/local\/etc\/httpd\/extra\/block-offending-ips.conf Other methods are available for limiting access including hosts &hellip; <a href=\"https:\/\/zimplicity.hopto.org\/?p=246\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Restricting access<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-246","post","type-post","status-publish","format-standard","hentry","category-techproj"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p81R5K-3Y","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/zimplicity.hopto.org\/index.php?rest_route=\/wp\/v2\/posts\/246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zimplicity.hopto.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zimplicity.hopto.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zimplicity.hopto.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zimplicity.hopto.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=246"}],"version-history":[{"count":0,"href":"https:\/\/zimplicity.hopto.org\/index.php?rest_route=\/wp\/v2\/posts\/246\/revisions"}],"wp:attachment":[{"href":"https:\/\/zimplicity.hopto.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zimplicity.hopto.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zimplicity.hopto.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}