Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 25th January 2011, 13:18
florix.net florix.net is offline
Join Date: Oct 2010
Posts: 42
Thanks: 4
Thanked 1 Time in 1 Post
Default correct way of blocking an IP using Bastille Firewall

How can I block an IP or range of IP address using Bastille Firewall?

I am using ISPConfig 3 on centos 5.5

Reply With Quote
Sponsored Links
Old 25th January 2011, 14:17
till till is online now
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,651 Times in 4,461 Posts

The bastille Firewall is used to open / close ports on your server. If you want to block a IP, I would use the route command. See ISPConfig FAQ:

Till Brehm
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Old 25th January 2011, 17:32
mini14 mini14 is offline
Join Date: Oct 2010
Posts: 66
Thanks: 2
Thanked 3 Times in 3 Posts

Hi Till,

Using "man route" in Centos shows
reject install a blocking route, which will force a route lookup to fail.  This is for example used to mask out net-
              works before using the default route.  This is NOT for firewalling.
Why they say "not for firewalling" I'm not sure...but instead of that, I've been adding IP's to block to my pre-chain-split.sh file in the /etc/Bastille/firewall.d directory (ISPConfig2) and it works great.

For example to block a class C add the following:

iptables -A INPUT -s 123.456.789.0/24 -j DROP

and then restart Bastille: /etc/init.d/bastille-firewall restart

Hope this helps!
Reply With Quote
Old 26th January 2011, 01:34
florix.net florix.net is offline
Join Date: Oct 2010
Posts: 42
Thanks: 4
Thanked 1 Time in 1 Post


I do not see that file under ISPConfig 3 .. please let me know.

If I add the rules using command line, and if server restarts, will those rules be applicable?

Reply With Quote
Old 16th February 2011, 21:59
8omas 8omas is offline
Senior Member
Join Date: Jan 2011
Posts: 148
Thanks: 16
Thanked 35 Times in 26 Posts

If we want to use iptables, how can we add our own rules after the bastille rules applied?

Is there any file that we can paste our 'after' rules?
My solution so far is to use /etc/rc.local but is it ok?

I am using debian 6, Ispconfig
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with bastille firewall on OVH RPS servers SupuS Installation/Configuration 12 3rd June 2010 17:20
Bastille Firewall problems itsnedkeren General 7 2nd May 2010 23:55
ISPconfig firewall blocking outgoing connections aglenday General 6 2nd August 2009 13:11
ISPConfig Firewall Bastille udp port range stefanr Installation/Configuration 6 31st January 2008 18:45
bastille firewall help needed daveb Server Operation 2 28th March 2007 21:27

All times are GMT +2. The time now is 20:32.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.