1#!/bin/bash 2 3source="172.18.1.5" 4 5iptables -t raw -I PREROUTING -s "$source" -j LOG --log-prefix "target in raw.prerouting>" 6iptables -t mangle -I PREROUTING -s "$source" -j LOG --log-prefix "target in mangle.prerouting>" 7iptables -t nat -I PREROUTING -s "$source" -j LOG --log-prefix "target in nat.prerouting>" 8iptables -t mangle -I INPUT -s "$source" -j LOG --log-prefix "target in mangle.input>" 9iptables -t filter -I INPUT -s "$source" -j LOG --log-prefix "target in filter.input>" 10iptables -t raw -I OUTPUT -s "$source" -j LOG --log-prefix "target in raw.output>" 11iptables -t mangle -I OUTPUT -s "$source" -j LOG --log-prefix "target in mangle.output>" 12iptables -t nat -I OUTPUT -s "$source" -j LOG --log-prefix "target in nat.output>" 13iptables -t filter -I OUTPUT -s "$source" -j LOG --log-prefix "target in filter.output>" 14iptables -t mangle -I FORWARD -s "$source" -j LOG --log-prefix "target in mangle.forward>" 15iptables -t filter -I FORWARD -s "$source" -j LOG --log-prefix "target in filter.forward>" 16iptables -t mangle -I POSTROUTING -s "$source" -j LOG --log-prefix "target in mangle.postrouting>" 17iptables -t nat -I POSTROUTING -s "$source" -j LOG --log-prefix "target in nat.postrouting>" 18