LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-04-2005, 07:11 PM   #1
w1ley
LQ Newbie
 
Registered: May 2005
Posts: 6

Rep: Reputation: 0
bastille and host blocks


Bastille works.
when I do
/etc/rc.d/init.d/bastille-firewall start
it starts.
when I do
iptables --list
it lists.
all good.
but what I cant figure out is this:
what is the recommended process for adding hosts to deny access? I have found a very roundabout screwy way of doing it, but whats the preferred/recommended way?
 
Old 06-05-2005, 04:41 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
You can use iptables to deny all access from a specific host with:
iptables -I INPUT -s xxx.xxx.xxx.xxx -j DROP

If you would like to deny access to only certain services, then you will need to provide more details about what you are trying to accomplish. You can alternatively use host.deny, however it only is functional for certain services.
 
Old 06-05-2005, 05:45 PM   #3
w1ley
LQ Newbie
 
Registered: May 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the reply.
sorry, I wasnt clear.
If I run the iptables command line that you suggested, it works. But if I then startup bastille, it flushes the iptables before it loads its own. I could then run the command line you suggest, but I was wondering if there is a best practice for this? Is the best practice just having a script run all of my iptables blocks after I start bastille?

edit:
one more thing...
if I run
/etc/rc.d/init.d/iptables start
it will load my iptables that I saved, but this flushes what bastille put in.


Last edited by w1ley; 06-05-2005 at 05:48 PM.
 
Old 06-05-2005, 06:24 PM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
I don't use bastille that much, so I'm not really that familiar with it. But I would imagine that you could do this several ways. The easiest would be to take a look at the bastille-firewall script in initd and see if you can find the location that it grabs the firewall rules from. Then just append your desired rules to the bottom of it (though make sure to use -I option). Alternatively you could put all your rules in a separate executable file and modify the bastille script to execute that file after it finishes loading its own rules.
 
Old 06-05-2005, 08:23 PM   #5
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Looking at the bastille docs, it looks like it pulls the rules from /etc/Bastille/bastille-firewall.cfg.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bastille nemopaice Ubuntu 4 11-17-2005 11:08 PM
Bastille Sc0pE Linux - Software 0 05-22-2005 11:27 AM
Bastille! XLinux Linux - Security 1 02-23-2005 07:15 PM
Bastille Obie Mandriva 3 08-23-2004 06:43 AM
Bastille? BajaNick Linux - Security 3 08-08-2003 05:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration