LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-07-2008, 07:52 PM   #1
argh2xxx
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Rep: Reputation: 0
Kernel tunable security parameter versus iptables


Kernel tunable security parameter versus iptables, which is prefer? Or can I use both methods? For example, to modify the /etc/sysctl.conf as to tune security parameter, otherwise use iptables. Some command lines I have modified in my system were:
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.rp_filter = 1
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.log_martians = 1

These seems to be acting like iptables, and this get me confuses that should I just use iptables only, or I can add those lines above to /etc/sysctl.conf for additional security measures? I think when done modify the /etc/sysctl.conf, you have to reboot to have your kernel activates those parameters, am I right? Thanks...
 
Old 09-08-2008, 08:14 AM   #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
Quote:
Originally Posted by argh2xxx View Post
Kernel tunable security parameter versus iptables, which is prefer? Or can I use both methods? (...) These seems to be acting like iptables, and this get me confuses that should I just use iptables only,
Both. They serve different purposes and complement each other.


Quote:
Originally Posted by argh2xxx View Post
or I can add those lines above to /etc/sysctl.conf for additional security measures?
Yes. In your kernel source documentation directory there's a nice text on sysctls explaining everything. Else it should be somewhere in the LQ FAQ: Security references or maybe search LQ.


Quote:
Originally Posted by argh2xxx View Post
I think when done modify the /etc/sysctl.conf, you have to reboot to have your kernel activates those parameters, am I right?
No reboot necessary: edit your sysctl.conf then 'sysctl -p' (uses "/etc/sysctl.conf" by default) to set the values (or single values manually with 'sysctl -w key=value') but only config changes in files like sysctl.conf survive a reboot.
 
Old 09-10-2008, 07:16 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
If you want your sysctls in different states you can put the changes in scripts. In fact, I have some sysctl statements in the first section of my iptables file.
 
Old 09-10-2008, 05:15 PM   #4
argh2xxx
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks guy!
 
  


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
/etc/sysconfig/iptables syntax/parameter question zerovice Linux - Security 1 11-08-2006 11:58 AM
iptables parameter explanation kpachopoulos Linux - Networking 1 03-01-2006 04:23 PM
Tunable Kernel Parameters lmillerp Linux - Networking 1 09-23-2005 08:41 AM
Re: SElinux and OpenBSD security versus other OS? wardialer Linux - Security 2 09-10-2004 11:58 PM
Configuring IPTABLES/Kernel security Thomas M. Linux - Security 1 02-26-2004 11:10 AM

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

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