]>
Commit | Line | Data |
---|---|---|
7c4cc0d8 CS |
1 | #!/bin/sh |
2 | ||
3 | # this is a sample block script for guardian. This should work with ipchains. | |
4 | # This command gets called by guardian as such: | |
057249ba | 5 | # guardian_block.sh <source_ip> <interface> |
7c4cc0d8 CS |
6 | # and the script will issue a command to block all traffic from that source ip |
7 | # address. The logic of weither or not it is safe to block that address is | |
8 | # done inside guardian itself. | |
9 | source=$1 | |
057249ba | 10 | interface=$2 |
7c4cc0d8 | 11 | |
057249ba | 12 | /sbin/iptables -I GUARDIAN -s $source -i $interface -j DROP |