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-21-2007, 07:09 AM   #1
venki
Member
 
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128

Rep: Reputation: 15
to save iptables in suse


Hi all,

I am using suse-10.2.
I wrote an rule to block gmail.com (https--443)
iptables -I OUTPUT -p tcp --dport 443 -d gmail.com -j REJECT
it is blocking perfectly.
but when i am rebooting it is flushing.
plz help me to save this rule permanently

I googled it but they are given only for redhat.
there is no /etc/init.d/iptables, /etc/init.d/rc.local
so i cannot start service

thks and regards
 
Old 06-21-2007, 07:49 AM   #2
rossonieri#1
Member
 
Registered: Jun 2007
Posts: 359

Rep: Reputation: 34
hi venki,

SuSE iptables based on script /etc/sysconfig/SuSEfirewall2 -- so can you script?
or for the manual loading - just put your command in /etc/init.d/boot.local

HTH,
cheers.
 
Old 06-22-2007, 05:04 AM   #3
venki
Member
 
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128

Original Poster
Rep: Reputation: 15
Hi,
thks for replying !
but there is no use
whn i am rebooting all the rules are flushing!
i have stored my rule in /etc/init.d/boot.local

still no use!
plz help me
 
Old 06-28-2007, 07:54 AM   #4
rs_vijay
Member
 
Registered: Aug 2006
Location: Allahabad,India
Distribution: Fedora Core 5
Posts: 41

Rep: Reputation: 15
hi venki,

i didn't use suse ever but try if there is /etc/rc.d/rc.[0-6].d and if it exists u can just put up that rule in a script in rc3.d or rc5.d directory as appropriate so that it would get executed at every reboot..
plzz correct me if i'm wrong..

vijay,
cheers.

Last edited by rs_vijay; 06-28-2007 at 07:56 AM.
 
Old 07-04-2007, 02:39 AM   #5
venki
Member
 
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128

Original Poster
Rep: Reputation: 15
hi vijay, there is no use..still not saving!
whn we are restarting all the rules are flushing
 
Old 07-06-2007, 07:49 AM   #6
rs_vijay
Member
 
Registered: Aug 2006
Location: Allahabad,India
Distribution: Fedora Core 5
Posts: 41

Rep: Reputation: 15
hi venki,
i use fc5 and in my /etc/rc.d/rc3.d ( i use runlevel 3 ) a file starting with 'S' is executed , the stated service is started..
so u can do this:
Code:
             (as root)
 $ echo "/sbin/iptables -I OUTPUT -p tcp --dport 443 -d gmail.com -j REJECT" > /etc/rc.d/rc3.d/S34block_gmail.com
 $ chmod +x /etc/rc.d/rc3.d/S34block_gmail.com # Add execute permission
"iptables" generally resides in /sbin and i think since root isn't logged in PATH isn't created , so we should specify complete path to execute it..
i think now on rebooting it should work..
plzz correct me if i am wrong..

cheers,
vijay

Last edited by rs_vijay; 07-06-2007 at 07:59 AM.
 
Old 07-09-2007, 12:54 AM   #7
venki
Member
 
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128

Original Poster
Rep: Reputation: 15
hi vijay! still no use!! i donno what is happening! but whn i restarted the system all rules are flushing!!
 
  


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
how to save iptables ? renaissance Ubuntu 2 07-21-2006 08:27 AM
how to save iptables ricnoah Red Hat 8 02-19-2006 10:48 PM
Save iptables filters yhus Red Hat 3 07-30-2005 04:01 AM
Where should I save this iptables? wardialer Linux - Newbie 2 02-12-2005 04:10 AM
Iptables-save ??? gruger Linux - Security 3 05-23-2003 06:23 PM

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

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