Re: Can I use iptables instead of hosts to block adservers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 14/10/2017 à 03:02, Walter Dnes a écrit :
3) Any suggestions for improvements?
Using ipset to store the list of IPs/prefixes is better suited than using an iptables rule for each IP, it would work like this :

ipset -N adblocklist iphash
ipset -A -exist adblocklist <ipaddress1>
ipset -A -exist adblocklist <ipaddress2>
iptables -A OUTPUT -m set --match-set adblocklist dst -j DROP
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux