LinuxQuestions.org
Review your favorite Linux distribution.
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-12-2003, 05:33 PM   #1
kobartek
LQ Newbie
 
Registered: Jun 2003
Posts: 6

Rep: Reputation: 0
portsentry - KILL_ROUTE question


Hello,

my portsentry`s default dropping rule is

KILL_ROUTE="iptables -I INPUT -s $TARGET$ -j DROP"

and it works fine but...
Since I dont use iptables-save/restore options (iptables rules are loaded from file) I would like to save portsenty`s dropping rules into a txt file.

I thougt it might be something like:

KILL_ROUTE="iptables -I INPUT -s $TARGET$ -j DROP >> /etc/rc.d/rc.masq_denied"

but the new rule is not being added into the file.

Any hints?
 
Old 06-12-2003, 07:52 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Use the custom command an echo/logger the line.
 
Old 06-13-2003, 02:17 AM   #3
kobartek
LQ Newbie
 
Registered: Jun 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you for your input.

Finally i tested below line and it seems it works ok.

KILL_ROUTE="iptables -I INPUT -s $TARGET$ -j DROP | echo 'iptables -I INPUT -s $TARGET$ -j DROP' >> /etc/rc.d/rc.masq_denied"
 
Old 06-13-2003, 02:30 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Excellent. Only make it use a semicolon instead of a pipe sign.
 
Old 06-13-2003, 03:26 AM   #5
kobartek
LQ Newbie
 
Registered: Jun 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Do you mean | should be replaced with ; ?
 
Old 06-13-2003, 06:28 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Uhuh.
 
  


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
portsentry skoot Linux - Security 18 11-21-2005 06:29 AM
how to change notification email for portsentry and how to test portsentry roorings Linux - Security 1 11-04-2003 10:36 AM
PortSentry Question lub0 Linux - Security 6 10-17-2003 09:54 AM
Portsentry question sumber Linux - Security 1 09-17-2003 01:48 PM
portsentry Jase Linux - Security 1 07-24-2001 07:49 AM

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

All times are GMT -5. The time now is 12:58 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