LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-13-2009, 09:31 AM   #1
Deewanagan
Member
 
Registered: Sep 2008
Posts: 57

Rep: Reputation: 15
Policies are gone after rebooting.


hi
i was trying to use iptables for blocking sites. it did work, but after the reboot the policies were gone! i didn't find anywhere saying that the policies were temporary, so i guess something else is wrong, can anyone help.
i used the following policy:
Code:
iptables -A OUTPUT -d www.somesite.com -j REJECT
Thanks,
 
Old 12-13-2009, 09:35 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

I believe that whatever you execute with regards to iptables is for the running session. You need to use the commands
Code:
iptables-save
iptables-restore
Check out these links:
Here on LQ
Or for example here

Kind regards,

Eric
 
1 members found this post helpful.
Old 12-13-2009, 10:30 AM   #3
nimnull22
Senior Member
 
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571

Rep: Reputation: 92
Quote:
Originally Posted by Deewanagan View Post
hi
i was trying to use iptables for blocking sites. it did work, but after the reboot the policies were gone! i didn't find anywhere saying that the policies were temporary, so i guess something else is wrong, can anyone help.
i used the following policy:
Code:
iptables -A OUTPUT -d www.somesite.com -j REJECT
Thanks,
That is absolutely right.
All your rules have to go to file, which firewall reading when it is starting up.
For example, in opensuse 11.1 there is a file in:
/etc/sysconfig/scripts/SuSEfirewall2-custom - for the custom rules.
This location is describe in /etc/sysconfig/SuSEfirewall2 - main config for firewall

In your system should be something the same. Read man page.
 
1 members found this post helpful.
Old 12-13-2009, 11:01 AM   #4
Deewanagan
Member
 
Registered: Sep 2008
Posts: 57

Original Poster
Rep: Reputation: 15
thank you everybody, it now works. i added the rules in a script and made the script to run at startup.

Regards
 
Old 12-13-2009, 11:04 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Glad you got it working.

Kind regards,

Eric
 
  


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
Passsword Policies sachinh Linux - General 4 02-06-2008 05:51 AM
how to implement MLS policies? gaurav gupta Linux - Security 2 09-25-2007 11:24 PM
Slashdot policies question vharishankar General 2 08-02-2005 10:03 PM
W2K policies kasols1 Linux - Networking 1 11-29-2002 02:43 AM
Windows Policies TheSockMonster Linux - Networking 0 07-16-2002 03:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:23 AM.

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