Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been blocking by ip with shorewall and the blacklist file. I have decided to block a few country entirely and the blacklist file is huge!

So my question is this:

Is it possible to have multiple blacklist files for shorewall? If so how would you go about loading them?

If not, is there another alternative?

share|improve this question
up vote 0 down vote accepted

According to this, you could save your "adresses non gratae" as ipsets and reference these sets from your blacklist file.

You'd need to write a script though that feeds the list into shorewall though at least once.

Note that this requires at least shorewall 4.4.0.

share|improve this answer
Thanks for the info. Im going to give this a shoot. I'm fairly new to shorewall and iptables so this will give me some added experience working with both. – jphreak Feb 10 '13 at 6:17

Under recent shorewall versions, all configuration files accept the INCLUDE directive, so you could set up those files and include them from the master blacklist file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.