LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-03-2011, 09:52 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
After running iptables -F my server goes offline???


After running iptables -F my server goes offline???

Isn't that suppose to flush the iptables, so it will allow all traffic?
 
Old 01-03-2011, 10:43 PM   #2
kaushalpatel1982
Member
 
Registered: Aug 2007
Location: INDIA
Distribution: CentOS, RHEL, Fedora, Debian, Ubuntu, LinuxMint, Kali Linux, Raspbian
Posts: 166

Rep: Reputation: 10
Do you run this command from SSH Client or from the server only ?
do you able to ping after flushing IPTables?
 
Old 01-03-2011, 10:43 PM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by kaushalpatel1982 View Post
Do you run this command from SSH Client or from the server only ?
do you able to ping after flushing IPTables?
From an SSH client, I could not ping it afterwards.
 
Old 01-04-2011, 12:24 AM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by abefroman
After running iptables -F my server goes offline???

Isn't that suppose to flush the iptables, so it will allow all traffic?
Not if you've set the INPUT chain POLICY to DROP.

The iptables(8) -F option flushes only rules, not policies.
 
Old 01-04-2011, 12:28 AM   #5
alpha01
Member
 
Registered: Jul 2008
Location: Orange County
Distribution: Ubuntu/Debian, CentOS, RHEL, FreeBSD, OS X
Posts: 75

Rep: Reputation: 19
Quote:
Originally Posted by anomie View Post
Not if you've set the INPUT chain POLICY to DROP.

The iptables(8) -F option flushes only rules, not policies.
Your'e a genius anomie, I've experienced this exact issue before and couldn't figure out why I got locked out after running iptables -F
 
Old 01-04-2011, 12:30 AM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I'm certainly not that. But I have done enough stupid things (and locked myself out of enough servers) to have learnt me lesson.
 
Old 01-04-2011, 02:12 AM   #7
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Rep: Reputation: 53
Quote:
Originally Posted by abefroman View Post
After running iptables -F my server goes offline???

Isn't that suppose to flush the iptables, so it will allow all traffic?
Code:
service iptables stop
will do the trick.

The -F deletes all rules in the chain or all chains.
Worst scenario if you are logged in via ssh client.
 
Old 01-04-2011, 05:14 AM   #8
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by anomie View Post
Not if you've set the INPUT chain POLICY to DROP.

The iptables(8) -F option flushes only rules, not policies.
Thanks!
 
  


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
cannot save iptables configuration on opensuse 10.3 I have a server running opensuse lorry Linux - Newbie 2 09-26-2008 11:58 AM
Home PC offline Web Server ogfizzle Linux - Server 1 10-31-2007 10:44 AM
Determine casue of server going offline MrSako Linux - General 1 11-07-2006 03:26 PM
server offline page ankit_mcgill Linux - Newbie 5 03-10-2006 02:17 AM
FTP server stuck in passive with iptables running. TheRealDeal Linux - Security 5 02-24-2005 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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