LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 10-22-2009, 08:13 AM   #1
velu M
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
disable the firewall


Hi

I am fasing a proble to disable the firewall in debian linux in command prompt


Pls

Send the commands

Thanking you
 
Old 10-22-2009, 08:19 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,235

Rep: Reputation: 132Reputation: 132
http://www.linuxquestions.org/questi...rewall-461587/
 
Old 10-23-2009, 02:19 AM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: Chicago
Distribution: CentOS
Posts: 1,277

Rep: Reputation: 53
iptables -L to list
iptables -F to clear
 
Old 10-23-2009, 04:00 AM   #4
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by abefroman View Post
iptables -L to list
iptables -F to clear
Keep in mind that only handles the filter table. If you really wanna wipe everything down you'll need to take care of the other tables too. FWIW, I've been using this script for years:
Code:
#!/bin/sh

IPT="/sbin/iptables"

$IPT -P INPUT ACCEPT
$IPT -P FORWARD ACCEPT
$IPT -P OUTPUT ACCEPT

$IPT -t nat -P PREROUTING ACCEPT
$IPT -t nat -P POSTROUTING ACCEPT
$IPT -t nat -P OUTPUT ACCEPT

$IPT -t mangle -P PREROUTING ACCEPT
$IPT -t mangle -P INPUT ACCEPT
$IPT -t mangle -P FORWARD ACCEPT
$IPT -t mangle -P OUTPUT ACCEPT
$IPT -t mangle -P POSTROUTING ACCEPT

$IPT -t raw -P PREROUTING ACCEPT
$IPT -t raw -P OUTPUT ACCEPT

$IPT -F
$IPT -F -t nat
$IPT -F -t mangle
$IPT -F -t raw

$IPT -X
$IPT -X -t nat
$IPT -X -t mangle
$IPT -X -t raw

$IPT -Z
$IPT -Z -t nat
$IPT -Z -t mangle
$IPT -Z -t raw
 
Old 10-23-2009, 09:59 AM   #5
Jim Bengtson
Member
 
Registered: Feb 2009
Location: Iowa
Distribution: Ubuntu 9.10
Posts: 164

Rep: Reputation: 38
Quote:
$IPT -P INPUT ACCEPT
$IPT -P FORWARD ACCEPT
$IPT -P OUTPUT ACCEPT
Just curious...why do you use "default accept" instead of "default deny"?
 
Old 10-23-2009, 07:42 PM   #6
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by Jim Bengtson View Post
Just curious...why do you use "default accept" instead of "default deny"?
Because the script's intention is to completely disable the firewall (or more precisely, to return it to a pristine state). It flushes all built-in chains, deletes all user-built chains, and sets all policies to ACCEPT.

Last edited by win32sux; 10-23-2009 at 08:00 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
How do I disable my firewall? nighttraindb Linux - Newbie 2 08-17-2008 10:48 PM
disable firewall? dyool Ubuntu 5 08-17-2006 12:32 PM
Disable Firewall dvong3 Linux - Networking 1 04-30-2004 09:27 AM
Cannot disable firewall rnturn Linux - Security 6 03-19-2003 09:55 PM
how do you disable a firewall ? ICEAGE Linux - General 7 01-02-2003 01:58 AM


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