LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 06-18-2013, 06:05 PM   #1
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Rep: Reputation: Disabled
iptables strange behaviour (Slackware64-14.0)


Hi guys,

after reinstalling Slackware due to some partition changes, my iptables work really strange and I'm unable to determine why.

After install, all 3 chains have an ACCEPT policy. But when I change the INPUT to DROP via
Code:
iptables -P INPUT DROP
, not only all incoming traffic is being dropped, but outcoming as well. No outcoming traffic at all. I can't even ping my home router. But the OUTPUT chain still has an ACCEPT policy and there are no other rules (except for
Code:
iptables -A INPUT -i lo -j ACCEPT
, but it makes no difference whether it is or isn't there). When I change INPUT to ACCEPT, all is well again. But that's not the way it should be...

What troubles me most is that before reinstall, iptables were working correctly with these rules. They even work on my other computer with exactly the same rules.

I googled around but found nothing than iptables guides which basically tell me that all should be fine.

Help me please...
 
Old 06-18-2013, 06:38 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,821

Rep: Reputation: Disabled
Unless you have a rule dealing with return traffic (state ESTABLISHED and possibly RELATED), the INPUT policy will block everything. You can actually ping your router, but you never get to see the reply packet.

Try this:
Code:
iptables -A INPUT -m state --state ESTALISHED,RELATED -j ACCEPT
I think you must have had a rule like that previously, or perhaps the INPUT policy was ACCEPT? Because the behaviour you describe is correct.
 
1 members found this post helpful.
Old 06-19-2013, 05:24 AM   #3
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ser Olmy View Post
Code:
iptables -A INPUT -m state --state ESTALISHED,RELATED -j ACCEPT
I think you must have had a rule like that previously, or perhaps the INPUT policy was ACCEPT? Because the behaviour you describe is correct.
Thanks man, I don't know how I could forget I had this rule and also overlook it on my other computer. My brain, it seems, refuses to work late at nights . All's working now.

Thanks a lot.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange TC behaviour hesisaboury Linux - Networking 2 06-17-2012 02:20 AM
Strange Behaviour! joshuarowley LQ Suggestions & Feedback 1 12-08-2005 03:36 PM
Strange behaviour Anmol Suse/Novell 2 10-27-2005 11:05 PM
iptables - strange behaviour of nat?? shacky Linux - Networking 2 10-17-2004 10:44 AM
Strange Behaviour mikeyt_3333 Linux - General 4 08-06-2001 03:07 PM


All times are GMT -5. The time now is 01:41 AM.

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