LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 05-26-2005, 12:20 PM   #1
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Rep: Reputation: 30
IPTable rules


Hi guys

Have a question about IPTABLES I hope someone can help me with.

Here is my current firewall script...

Code:
#!/bin/sh

IPT=/sbin/iptables

# Close all ports by default.
$IPT -P INPUT DROP
$IPT -P OUTPUT DROP
$IPT -P FORWARD DROP

# Flush all rules.
$IPT -F

# Allow SSH traffic.
$IPT -A INPUT  -p tcp --dport 22 -j ACCEPT
$IPT -A OUTPUT -p tcp --sport 22 -j ACCEPT

#Allow DNS Traffic
$IPT -A INPUT -p udp --sport 53 -j ACCEPT
$IPT -A OUTPUT -p udp --dport 53 -j ACCEPT
Now when I rerun the script, none of my connections that are allready established get disconnected.

How can I first, make all connections close, and secondly prevent connections from being closed? as I have a static IP and want to prevent disconnection from that.

Thankyou.
 
Old 05-27-2005, 08:25 PM   #2
JrLz
Member
 
Registered: Mar 2004
Location: Jakarta
Posts: 164

Rep: Reputation: 30
you need to restart the service (run a script named iptables)
$./iptables restart
this script is usually located /etc/rc.d or in my system, it's /etc/init.d
hope it helps

Last edited by JrLz; 05-27-2005 at 08:27 PM.
 
  


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
Remove iptable rules greenthing Linux - Networking 11 03-03-2005 09:15 AM
Verifying IPTable rules... Ateo Linux - Networking 1 02-02-2005 04:33 PM
Help with IPtable Rules aqoliveira Linux - Security 3 12-10-2003 11:00 AM
iptable-rules for eDonkey? grubjo Linux - Networking 2 08-01-2002 07:38 AM
Iptable rules for Gnutella al_erola Linux - Security 5 03-06-2002 04:21 AM


All times are GMT -5. The time now is 06:17 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration