Results 1 to 3 of 3
This isn't exactly of critical importance, but is there any way to block two entirely different addresses in the one rule, rather than writing individual rules for each of them? ...
- 05-18-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 3
IPTABLES: two unrelated source IPs in a single rule?
This isn't exactly of critical importance, but is there any way to block two entirely different addresses in the one rule, rather than writing individual rules for each of them? For example, if the addresses were 1.1.1.1 and 8.8.8.8, and I only wanted to block these two.
Or alternatively, if I wanted to block two subnets, say 1.1.1.0/24 and 8.8.8.0/24? Can this be done in one rule?
Thanks to anyone who can offer advice.
- 05-19-2010 #2
You may want to get familiar with chains of rules.
Usually in the PREROUTING chain you would add a reference to your IPSTOBEBLOCKED chain, which examines the IP and decides to forward it to a general BLOCK chain that does all blocking.
- 05-24-2010 #3
As far as I know, not, but I'm not close to an expert yet.
Maybe you may find the answer in here:
Iptables Tutorial 1.2.2


Reply With Quote