Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-21-2007, 07:09 AM
|
#1
|
Member
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128
Rep:
|
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
|
|
|
06-21-2007, 07:49 AM
|
#2
|
Member
Registered: Jun 2007
Posts: 359
Rep:
|
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.
|
|
|
06-22-2007, 05:04 AM
|
#3
|
Member
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128
Original Poster
Rep:
|
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
|
|
|
06-28-2007, 07:54 AM
|
#4
|
Member
Registered: Aug 2006
Location: Allahabad,India
Distribution: Fedora Core 5
Posts: 41
Rep:
|
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.
|
|
|
07-04-2007, 02:39 AM
|
#5
|
Member
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128
Original Poster
Rep:
|
hi vijay, there is no use..still not saving!
whn we are restarting all the rules are flushing
|
|
|
07-06-2007, 07:49 AM
|
#6
|
Member
Registered: Aug 2006
Location: Allahabad,India
Distribution: Fedora Core 5
Posts: 41
Rep:
|
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.
|
|
|
07-09-2007, 12:54 AM
|
#7
|
Member
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128
Original Poster
Rep:
|
hi vijay! still no use!! i donno what is happening! but whn i restarted the system all rules are flushing!!
|
|
|
All times are GMT -5. The time now is 11:32 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|