LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-12-2003, 04:10 PM   #1
tigerflag
Member
 
Registered: Aug 2002
Location: Phoenix, AZ
Distribution: PCLinuxOS 2012.08
Posts: 430

Rep: Reputation: 30
iptables rules lost upon rebooting


First off, I searched and read a lot of threads about this in the forums, but nothing that worked for Slackware; the configuration files/locations mentioned were all different and I'm just learning Slackware.

I have a stand-alone box on a dial-up connection. I like to add this rule:

As root, I type: iptables
Then: /usr/sbin/iptables -A INPUT -p tcp --syn -j DROP

When I do this my ports show up as Stealth or Blocked in the grc.com and sygate.com probes. But when I reboot the settings are lost. How do I save the settings? How do I even check to see if iptables is running?

Suggestions or pointers are appreciated.
TIA,
Siri Amrit
 
Old 10-12-2003, 07:18 PM   #2
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
There are several ways to activate iptables rules at boot.
- use a rc.firewall script (/etc/rc.d/rc.firewall) . This will be started automaticly from rc.inet2;
- use 'iptables-save > anyfile' once and place a iptables-restore command in rc..local
- add your iptables command to rc.local

All these three ways will automaticly load your rules at boot .

You can check iptables rules with the command iptables -L .
 
Old 10-12-2003, 07:48 PM   #3
tigerflag
Member
 
Registered: Aug 2002
Location: Phoenix, AZ
Distribution: PCLinuxOS 2012.08
Posts: 430

Original Poster
Rep: Reputation: 30
quote:

"- use 'iptables-save > anyfile' once..."

What would I put in place of "anyfile"? I don't quite understand...

Thanks,
Siri Amrit
 
Old 10-12-2003, 07:59 PM   #4
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
man iptables-save and man iptables-restore will be a great help. You dump the ruleset of iptables once to a file using iptables-save and restore the settings reading that file with iptables-restore. But that's all in the manual pages
 
Old 10-13-2003, 12:43 AM   #5
tigerflag
Member
 
Registered: Aug 2002
Location: Phoenix, AZ
Distribution: PCLinuxOS 2012.08
Posts: 430

Original Poster
Rep: Reputation: 30
Thanks, Rotvogel.
Hi Ho! Hi Ho! It's off to read I go!
Siri Amrit
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 01:40 AM
MDK 10 CE & lost network after rebooting prodigal Mandriva 1 07-09-2004 04:31 PM
iptables rules Hegemon Linux - Networking 0 01-28-2004 02:20 AM
Can someone tell me why these rules don't work? I am lost. Pcghost Linux - Networking 0 03-11-2003 12:43 PM
iptables rules Darin Linux - Security 1 01-23-2003 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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