LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-30-2001, 08:02 AM   #1
Shoki
LQ Newbie
 
Registered: May 2001
Posts: 11

Rep: Reputation: 0
Question


I added some ipchains #ipchains -A .... but when I reboot they are gone. I need these to be loaded at startup how/where/what do I need to do to save these changes? Also I did a /sbin/route add -net ...and when I reboot that change is gone too. What do I need to do to save it? I am kind of new at this so I need some pretty explicit instructions as "you need to place these files in a location where they will be executed" isn't much help since I don't know much about Linux.
thanks,
jim
 
Old 05-30-2001, 08:36 AM   #2
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
U can put all this command in /etc/rc.d/c.local with proper path.

Another methos to save ipchains refer IP Chains howto
siddqiu.T
 
Old 05-30-2001, 08:42 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
First of all u have the command "history" which is a log of the last x commands executed. If it isnt cut off to the last say 10 commands, executing "history > history.log" (w/o quotes) will output it all to a file named history.log.
look up the valid IPChains rules and save em in another file, dont forget to dump the line numbers which are a part of the history command.

Now to add the chains uve got to find where it is started from which is usually from /etc/rc.d. look for an executable script called something like "rc.firewall" names differ per distro. Open it and add the lines u saved previously.
Execute the firewall script to see if it is working correct.

The routes can be found in (again different per distro I guess) /etc/sysconfig/static-routes, add em there.
 
Old 05-30-2001, 08:44 AM   #4
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
Thumbs up

U can put all the commands in rc.fw and call the program from rc.local
siddiqu.T
 
Old 05-30-2001, 12:32 PM   #5
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Quote:
Originally posted by siddiqu
U can put all this command in /etc/rc.d/c.local with proper path.

Another methos to save ipchains refer IP Chains howto
siddqiu.T
I have all my rules in /etc/rc.d/rc.masq that is executed at boot time. The HOWTO mentions using
Code:
ipchains-save > somefile
and
Code:
ipchains-restore < somefile
. Have a look at http://linuxdocs.org/HOWTOs/IPCHAINS-HOWTO-4.html#ss4.2 for more details. (scroll down a little to find the ipchains-save bit...)

HTH

Jamie..
 
Old 05-30-2001, 01:24 PM   #6
Shoki
LQ Newbie
 
Registered: May 2001
Posts: 11

Original Poster
Rep: Reputation: 0
Smile

Thanks for all your help. I will look into your suggestions.
jim
 
Old 05-31-2001, 02:01 PM   #7
Shoki
LQ Newbie
 
Registered: May 2001
Posts: 11

Original Poster
Rep: Reputation: 0
Question

Well...I am not sure if I am doing something wrong or what. I am very new to Linux and I have been reading the howto's and trying to follow the suggestions but I am missing something. When I edited the rc.firewall file under the PPTP section(there were already ipchains there for the 192.168.1.x subnet) and rebooted the changes were there. However, when I did a ipchains -L forward, they did not show up under the listing.
Is there a reason that the ipchains that I added to the rc.firewall are not showing up when I do a ipchains -L forward?
thanks,
jim
 
  


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
ipchains aolis Debian 1 02-08-2004 11:23 AM
saving and not saving sessions on desktop ergo_sum Linux - Newbie 2 09-26-2003 07:27 AM
Ipchains Deepakm Linux - Software 6 06-20-2003 12:14 PM
ipchains gigya Linux - Networking 2 09-21-2002 07:18 AM
ipchains mika9372 Linux - Newbie 6 03-29-2002 12:03 PM

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

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