LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 03-23-2005, 06:12 PM   #1
gezzam
LQ Newbie
 
Registered: Mar 2005
Posts: 2

Rep: Reputation: 0
Configuring iptables at start up


Hi,

I have just configured my first ever Linux proxy server for work and all seems to be working well as all clients can connect to the Internet O.K. It has been an enjoyable challenge and I look forward to working with Linux more.

What I want to learn how to do now is configure iptables so I am able to lock down my network a little more.

What I am having problems with is setting up the startup scripts to do this. I have found some iptables scrips on the net and I want them to run at startup.

What is the correct syntax to run a script called - for example - start.sh (located in /root) from the /etc/rc.local file. Do I put the script in the /root directory or do I place it somewhere else?

Once this has been done, is it possible to confirm that the script has been run?

I hope this makes some kind of sense

I am running Mandrake 10.1

Cheers,

Gerald
 
Old 03-23-2005, 10:30 PM   #2
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
You should really install the Shorewall and webmin rpm's...

Then you can easily configure all of this via the WEB interface.

Shorewall is a "front end" for IPtables, and webmin is it's GUI, so to speak.

The documentation is a little sparse but what I did is I initally edited the existing config files until I had something that worked, then went into the Web interface to fine tune the stuff.

This let me see where the web interface changes affected the files and taught me all about ACL's...

Give it a shot...
 
Old 03-24-2005, 01:12 AM   #3
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
Otherwise the "proper way" is to run your script once, then run 'iptables-save > /etc/sysconfig/iptables'
This saves the running rules to a file in /etc/sysconfig.
Run 'chkconfig iptables on' , reboot, run 'iptables -L -n' and watch your rules in action.

- Peder
 
  


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
configuring iptables to allow ping notolerance Linux - Security 2 01-10-2005 07:01 PM
Newbie needs help configuring iptables imsam Linux - Security 1 10-30-2004 06:05 AM
need help configuring IPTables to allow Samba through Hockeyfan Linux - Networking 2 05-31-2004 09:47 PM
configuring IPtables e1000 Slackware 8 11-09-2003 02:51 AM
Configuring IPTABLES goldfish Linux - Newbie 6 10-15-2003 04:14 PM

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

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