LinuxQuestions.org
Visit Jeremy's Blog.
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, 07: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, 07:19 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
http://www.linuxquestions.org/questi...rewall-461587/
 
Old 10-23-2009, 01:19 AM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

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

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
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, 08: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, 06:42 PM   #6
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
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 07: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 09:48 PM
disable firewall? dyool Ubuntu 5 08-17-2006 11:32 AM
Disable Firewall dvong3 Linux - Networking 1 04-30-2004 08:27 AM
Cannot disable firewall rnturn Linux - Security 6 03-19-2003 08:55 PM
how do you disable a firewall ? ICEAGE Linux - General 7 01-02-2003 12:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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