diff --git a/README.md b/README.md index 1921c9b..e81884c 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ You can find all the original instructions from the author of this solution here ## How to use +First, check that you have all necessary packages: `sudo apt-get install iptables-persistent` and `sudo apt-get install rsyslog` if you want to keep logs. Clone this repo to your server and run `sudo ./install.sh` To enable logging of all requests from forbidden ips run `sudo ./install.sh --log` instead. This requires rsyslogd to be up and running. If you are unsure - install it without logs. All the logs are in the file /var/log/rugov_blacklist/blacklist.log . Keep in mind - if your target could be interesting, you can get a lot of disk space used by this log! diff --git a/install.sh b/install.sh index 831ba07..291400e 100755 --- a/install.sh +++ b/install.sh @@ -16,14 +16,14 @@ if [[ "$FMTCURID" != "0" ]]; then fi if [[ ! -d "/etc/iptables/" ]]; then - echo "The script is intended to be used with iptables" + echo "The script is intended to be used with iptables. Are you sure all the necessary packages are installed? Run: 'sudo apt-get install iptables-persistent'" exit 2 fi if [[ "$FMTDOLOGS" ]]; then echo "Installing rsyslogd config..." if [[ ! -f "/etc/rsyslog.d/50-default.conf" ]]; then - echo "rsyslog.d/50-default.conf not found, there is no place to put the new config file" + echo "rsyslog.d/50-default.conf not found, are you sure rsyslogd is installed? Run: 'sudo apt-get install rsyslog'" exit 1 fi