I'd like to create a single rule in iptables (if possible) that uses multiple source IP addresses. Is this possible?
|
feedback
|
|
This is only possible if you can aggregate the source IP's you want into a contiguous range. eg
If you cannot find a common netmask that covers the IP's you want, you'll have to write several identical rules to do what you want. There are several iptables frameworks around which can deal with the low level of writing the iptables rules, allowing you to define your rules at a more symolic level. Shorewall is a common one that ships with most current linux distributions. | |||
|
feedback
|
|
You can define multiple chains such that you can combine independent lists of requirements. I doubt this is exactly what you want, but it's still pretty handy. We use this to define lists of valid user-types by IP, and then apply port restrictions to the source networks. So, for instance:
| |||
|
feedback
|