To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here

http://justlinux.com/   Fri, 03-Sep-2010 14:41:32 GMT
         internet.com

Go Back   JustLinux Forums > Community Help: Check the Help Files, then come here to ask! > Networking

Networking DNS, Samba, IP masquerading, etc. related questions.

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-16-2005, 01:29 AM
srnerkar srnerkar is offline
Registered User
 
Join Date: Nov 2005
Posts: 17
[SOLVED] Iptables not working

hello everybody....
I am using RedHat 9. I want to build firewalls using IPTABLES... for writing the rules i have to create /etc/sysconfig/iptables file which is not initially present. and i had choosen the option "no firewalls" while installation.
So my question is that " Where should I write iptables rules so that those would get reflected in file '/etc/sysconfig/iptables'"?????

Waitting for quick reply..............Best regards.....
Reply With Quote
  #2  
Old 11-16-2005, 08:36 AM
crow2icedearth crow2icedearth is offline
Registered User
 
Join Date: Sep 2005
Posts: 681
write a script then chmod it to make it X. you should be able to have the iptable script anywhere as long as it its called up during boot. i havnt used redhat since version 5.0 . so i have no idea man
__________________
"Software is like sex: it's better when its free."
-LINUS TORVALDS
Reply With Quote
  #3  
Old 11-16-2005, 12:42 PM
yellowdog yellowdog is offline
Registered User
 
Join Date: Mar 2004
Location: national city
Posts: 23
need to be a lil more explicit

so how do you make X on boot up? on your .login?
or in your /etc/*?
Reply With Quote
  #4  
Old 11-16-2005, 01:00 PM
Sepero's Avatar
Sepero Sepero is offline
Modurator Wannabe
 
Join Date: Mar 2003
Location: Tampa, FL USA
Posts: 2,193
To make the script executable, type:
chmod +x filename

Then you will need to put it as a startup file. I don't know where they are on redhat, though.
Reply With Quote
  #5  
Old 11-17-2005, 11:50 AM
serz's Avatar
serz serz is offline
Registered User
 
Join Date: Apr 2003
Location: Buenos Aires, Argentina
Posts: 4,221
I think that they need to be in /etc/sysconfig/iptables. Also, you'd need to add iptables to the runlevel that you're using so it starts the service on boot time, you do this by doing "chkconfig --add iptables", as root.
__________________
djserz.com.ar
"All the drugs in this world won't save you from yourself..."
Reply With Quote
  #6  
Old 11-17-2005, 11:09 PM
Jinx's Avatar
Jinx Jinx is offline
SpearGrassHopper
 
Join Date: Sep 2000
Location: Darwin, NT, Australia
Posts: 156
Redhat/Fedora actually runs IPTABLES as a startup service. One of the service options is to "save" the current state of your Iptables firewall rules into the script that is read when the service starts.

Generally, you create a script as mentioned above. You run the script manually until you're happy that all the rules are working. Once you're happy with the script, you run it manually( ./script.sh ), then run the "service iptables save" command. This saves all of the Iptables rules currently running into a file (think it might even be /etc/sysconfig/iptables).

When your computer boots again, it should start the iptables service and run through the saved rules.

Hope that made some sort of sense.

Cya round
Jinx
__________________
"... and the truth shall set you free"

========================
Two fish are in a tank.
One says to the other "I'll man the cannon, you drive."
Reply With Quote
  #7  
Old 11-18-2005, 07:52 AM
srnerkar srnerkar is offline
Registered User
 
Join Date: Nov 2005
Posts: 17
Thanks Everyone there,


I made it run finally....
Thanks for ur valuable time..................
Reply With Quote
  #8  
Old 12-19-2005, 09:41 AM
STORMPROOF's Avatar
STORMPROOF STORMPROOF is offline
Registered User
 
Join Date: Aug 2002
Posts: 227
Couldn't he put the script in his rc.local and it would run on boot up as well.

I remember my times of using redhat 9 that the rc.local was similar to the startup folder in windows.

Correct me if I am wrong.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 10:41 AM.

Help File Library
Miscellaneous
Programming
Software
Audio Hardware
Shells
More



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers
Free Newsletter
Server Daily


More Free Newsletters




internet.commerce
Be a Commerce Partner












Linux is a trademark of Linus Torvalds.

Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.