https://github.com/goto-eof/ares-guard
Ares Guard is a java application which allows you to automatically configure Apache2 to allow only authorized indexing bots to access your website.
https://github.com/goto-eof/ares-guard
security
Last synced: 17 days ago
JSON representation
Ares Guard is a java application which allows you to automatically configure Apache2 to allow only authorized indexing bots to access your website.
- Host: GitHub
- URL: https://github.com/goto-eof/ares-guard
- Owner: goto-eof
- Created: 2024-07-06T23:19:30.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-07T02:15:02.000Z (about 2 years ago)
- Last Synced: 2025-10-24T05:47:59.575Z (9 months ago)
- Topics: security
- Language: Java
- Homepage:
- Size: 25 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is Ares Guard?
Ares Guard is a java application which allows you to automatically configure Apache2 to allow only authorized indexing
bots to access your website.
# How does it work?
The software, executable from the command line, after specifying the path to the root folder of your site,
makes a REST call to the official GoogleBot and BingBot sites (functionality easily extendable to
other search engines). After having retrieved the list of official IP addresses from **official sources**, the
application adds authorization rules for these IPs in the .htaccess file, **without overwriting** the file.
If the authorized IPs have been previously added by the software, the software will rewrite them, leaving the contents
added by the user intact.
After modifying the `.htaccess` file, the application **overwrites** the `robots.txt` file, allowing access only to
GoogleBot and BingBot. As I said, this feature could be extended to other bots.
# How can the software be used?
My idea is to take advantage of Linux's crontab to run the jar periodically. The application would then be executed
automatically, updating the list of allowed IP addresses.
In order to generate or regenerate Apache2 rules it is necessary to simply pass the path to the root of the website as a
single parameter of the jar. For example:
In order to print the new rules on the screen:
```
java -jar ares-guard.jar "/var/www/my-website.com"
```
In order to print on the screen and **write** the new rules on file (PLEASE BACKUP `.htaccess` AND `robots.txt` FILES
FIRST):
```
java -jar ares-guard.jar "/var/www/my-website.com" -w
```
# Download
The jar file can be downloaded from [here](https://github.com/goto-eof/ares-guard/blob/master/jar).
