This shows you the differences between two versions of the page.
linux:iptables [2018/08/31 17:15] percy created |
linux:iptables [2018/08/31 17:16] (current) percy |
||
---|---|---|---|
Line 2: | Line 2: | ||
===== BlockIP ===== | ===== BlockIP ===== | ||
iptables -A INPUT -s IPADDRESS -j DROP | iptables -A INPUT -s IPADDRESS -j DROP | ||
- | | + | Remove the iptables rule |
+ | iptables -D INPUT -s IPADDRESS -j DROP | ||
===== Log the traffic ===== | ===== Log the traffic ===== | ||
- | | ||
iptables -A INPUT -s IPADDRESS -j LOG --log-prefix "Testing " | iptables -A INPUT -s IPADDRESS -j LOG --log-prefix "Testing " | ||
Then you find the log in /var/log/kern.log | Then you find the log in /var/log/kern.log | ||
- | | ||
- | |||