aircoreboy
Regular Contributor
Is it possible to use iptables to create inbound packet loss per ip address?
Can you explain your scenario a bit more.
Also, what do you mean by "per IP address", an IP address on your LAN? Unsolicited traffic from the internet will be dropped by iptables FORWARD chain. That's 100% packet loss for the sender.
vi ~/asuswrt-merlin/release/src-rt-6.x.4708/linux/linux-2.6.36/config_base.6a
OLD LINE: # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
NEW LINE: CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
make clean
make {target-platform}
find ~/asuswrt-merlin -type f -name "xt_statistic.ko"
### here it is: ~/asuswrt-merlin/release/src/router/arm-uclibc/target/lib/modules/2.6.36.4brcmarm/kernel/net/netfilter/xt_statistic.ko
insmod /jffs/bin/xt_statistic.ko
modprobe xt_statistic
iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP
iptables -A OUTPUT -m statistic --mode random --probability 0.1 -j DROP
iptables -D INPUT -m statistic --mode random --probability 0.1 -j DROP
iptables -D OUTPUT -m statistic --mode random --probability 0.1 -j DROP
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!