-->
Apache has two directives that can be used to block (or allow) an IP address. Traditionally, Apache used the Allow, Deny and Order directives, which are part of the mod_access_compat module. You can still use the directives, and there are plenty of tutorials that recommend them. However, the module has been deprecated in favour of mod_authz_host. I strongly recommend using the latter module’s directives, as the old ones will stop working in a future Apache version.
To block an IP address you can use a rule like this:
<RequireAll> Require all granted Require not ip 1.2.3.4 </RequireAll>
The <RequireAll>
directive specifies that none of the nested directives should fail. The two nested rules are fairly easy to understand. First, we allow all and sundry to access our website, and we next specify that the rule does not apply to the IP address 1.2.3.4.
You can add multiple IPs and use CIDR notation. For instance, here I block three IP addresses:
<RequireAll> Require all granted Require not ip 1.2.3.4 9.8.7.6 5.5.4.4 </RequireAll>
And here I block all IPs in the range 1.2.3.0 to 1.2.3.255:
<RequireAll> Require all granted Require not ip 1.2.3.4/24 </RequireAll>
Denying all traffic apart from one or more specific IP addresses uses the same logic. You first deny all IP addresses and then specify which IP address(es) are allowed:
<RequireAll> Require all denied Require ip 1.2.3.4 </RequireAll>
You can use this technique to block or allow entire countries. However, there are problems with that approach. In particular, your .htaccess file will include a humongous list with CIDR ranges which you will need to keep up to date. If you really want to go down that route, you can get a list with IPv4 addresses at countryipblocks.net.
By catalyst2 Team
Finding the right server for your business can be a challenge. You need to find the one that meets all of your needs without compromising your budgetary restrictions. This can seem like a lot of criteria to fill, but fortunately for you, you’re here with us at catalyst2 and we can help introduce you to …
By catalyst2 Team
Having an entire server dedicated to your internet presence is a great choice for your business. Our most popular solution, the dedicated server allows you a whole server to be dedicated to your business, unlike the other options available, which only offer a partial server that may be congested by other businesses. If you’re experiencing …
By catalyst2 Team
There is a lot to say about VPS. This Virtual Private Server from the team at catalyst 2 is designed to offer you the infrastructure that you need to build a strong online presence. All of our VPS’s are fully managed by our team at catalyst2, ensuring that they are tailored to the needs of …
By catalyst2 Team
Getting your business online is a big step forward and you don’t want to make a wrong decision right at the start. Starting off on the wrong foot with your internet presence can take a really long time for you to rectify, which will be costly and frustrating. But there’s no need to panic about …
By catalyst2 Team
Go, also referred to as Golang, is an open-source, statically typed programming language. It was developed by Google for simplicity, high performance, efficiency and readability. The reasons for its development are rooted in a desire to simplify the more complex codebases within Google. The fact that this language seemingly has two names can be confusing, …
By catalyst2 Team
The internet is one of those things that are always changing and evolving, and every so often, someone comes up with an idea that will truly revolutionise the online world. Easy to build web packages from places like WordPress are just one example of this. If you’ve got the next great idea that will transform …
By catalyst2 Team
Whether you’re planning on starting a business, writing a blog or if you’re looking to secure a corner of the internet for future work, you’ll want to register your domain in the UK. This is the process of acquiring a domain name, which is a vital step in the creation of your online presence. Your …
By catalyst2 Team
If you’re planning on setting up your own website, then you’ve probably heard about web hosting. Web hosting is the service that platforms offer to host your website on the internet. And if you’re new to the world of websites and having an online presence, it can be tricky to know exactly what web hosting …
By catalyst2 Team
A private cloud is a flexible, secure, scalable infrastructure that you can use solely for your business. This gives you the chance to build up a reliable computer system without having to share your resources with other organisations. A private cloud can be either hosted internally by an organisation or it can be managed by …
By catalyst2 Team
cPanel and Plesk are two of the most popular online hosting services. Both have a different approach to creating and managing websites, email accounts, databases and more – but which one is right for you? In this blog post, our team takes a deeper look into what both interfaces are, how they can make your …
Great real person support – direct phone number, usually the same individual so any problems are handled by the same people. Excellent.
Cookie | Duration | Description |
---|---|---|
bcookie | 2 years | LinkedIn sets this cookie from LinkedIn share buttons and ad tags to recognize browser ID. |
bscookie | 2 years | LinkedIn sets this cookie to store performed actions on the website. |
lang | session | LinkedIn sets this cookie to remember a user's language setting. |
lidc | 1 day | LinkedIn sets the lidc cookie to facilitate data center selection. |
UserMatchHistory | 1 month | LinkedIn sets this cookie for LinkedIn Ads ID syncing. |
Cookie | Duration | Description |
---|---|---|
_ga | 2 years | The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors. |
_gat_gtag_UA_5562310_11 | 1 minute | Set by Google to distinguish users. |
_gid | 1 day | Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously. |
CONSENT | 2 years | YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data. |
Cookie | Duration | Description |
---|---|---|
_fbp | 3 months | This cookie is set by Facebook to display advertisements when either on Facebook or on a digital platform powered by Facebook advertising, after visiting the website. |
fr | 3 months | Facebook sets this cookie to show relevant advertisements to users by tracking user behaviour across the web, on sites that have Facebook pixel or Facebook social plugin. |
IDE | 1 year 24 days | Google DoubleClick IDE cookies are used to store information about how the user uses the website to present them with relevant ads and according to the user profile. |
test_cookie | 15 minutes | The test_cookie is set by doubleclick.net and is used to determine if the user's browser supports cookies. |
VISITOR_INFO1_LIVE | 5 months 27 days | A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface. |
YSC | session | YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages. |
yt-remote-connected-devices | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
yt-remote-device-id | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
Cookie | Duration | Description |
---|---|---|
_ashkii | session | No description available. |
_wicasa | 3 months | No description available. |
AnalyticsSyncHistory | 1 month | No description |
cookid | 3 months | No description available. |
cookietest | session | No description |
crisp-client/domain-detect/1644827320973 | session | No description |
crisp-client/domain-detect/1644827348275 | session | No description |
crisp-client/domain-detect/1644827428415 | session | No description |
crisp-client/domain-detect/1644827479357 | session | No description |
crisp-client/domain-detect/1644827596454 | session | No description |
crisp-client/domain-detect/1644827724838 | session | No description |
crisp-client/domain-detect/1644827824383 | session | No description |
crisp-client/domain-detect/1644827878659 | session | No description |
crisp-client/domain-detect/1644828716243 | session | No description |
crisp-client/domain-detect/1644828846246 | session | No description |
crisp-client/domain-detect/1644829369013 | session | No description |
crisp-clientsession30cc6953-ebcf-4bc6-b649-c44eb446409e | 6 months | No description |
dbmFP | 3 months | No description available. |
dbmPK | 3 months | No description available. |
li_gc | 2 years | No description |