mirror of
https://github.com/freemedia-tech/iptables-rugov-block.git
synced 2026-01-24 20:16:12 +03:00
fix: more details about necessary packages. Closes #4
This commit is contained in:
@@ -8,6 +8,7 @@ You can find all the original instructions from the author of this solution here
|
|||||||
|
|
||||||
## How to use
|
## 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`
|
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.
|
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!
|
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!
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ if [[ "$FMTCURID" != "0" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d "/etc/iptables/" ]]; then
|
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
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$FMTDOLOGS" ]]; then
|
if [[ "$FMTDOLOGS" ]]; then
|
||||||
echo "Installing rsyslogd config..."
|
echo "Installing rsyslogd config..."
|
||||||
if [[ ! -f "/etc/rsyslog.d/50-default.conf" ]]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user