add debug for blacklist
This commit is contained in:
parent
34076c243e
commit
f258895234
@ -47,9 +47,14 @@ do
|
||||
echo ${j} >> ${BLACKLIST}
|
||||
/usr/sbin/iptables -A BLACKLIST -s ${j} -j DROP
|
||||
done
|
||||
for j in ${list_sender}
|
||||
for j in ${list_sender[@]}
|
||||
do
|
||||
scp -i /home/valentin/.ssh-blacklist/id_rsa -P ${SSH} ${BLACKLIST} blacklist_user@${j}:/tmp/blacklist_${IP}
|
||||
echo "Blacklist envoye a ${j}" >> ${MAIL}
|
||||
echo "scp -i /home/valentin/.ssh-blacklist/id_rsa -P ${SSH} ${BLACKLIST} blacklist_user@${j}:/tmp/blacklist_${IP}" >> ${MAIL}
|
||||
scp -i /home/valentin/.ssh-blacklist/id_rsa -P ${SSH} ${BLACKLIST} blacklist_user@${j}:/tmp/blacklist_${IP}i
|
||||
if [ ${?} -ne 0 ]; then
|
||||
echo "Error SCP for ${j}" >> ${MAIL}
|
||||
fi
|
||||
done
|
||||
echo "IP dejà blacklisté : " >> ${MAIL}
|
||||
cat ${BLACKLIST} >> ${MAIL}
|
||||
|
@ -15,6 +15,11 @@
|
||||
src: virtualhost.j2
|
||||
dest: /etc/sentinel/virtualhost
|
||||
mode: "0444"
|
||||
with_items:
|
||||
- virtualhost
|
||||
- ip
|
||||
- ssh_port
|
||||
- exclude
|
||||
vars:
|
||||
ansible_become: yes
|
||||
ansible_become_method: sudo
|
||||
|
Loading…
x
Reference in New Issue
Block a user