LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack Search this Thread
Old 04-24-2007, 02:21 PM   #1
phsythax
Member
 
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152

Rep: Reputation: 30
iptables behaviour: sendmsg: Operation mot permitted


I did a # emerge --sync && emerge -Du world

and suddenly, (or it was another caus) my internet connection froze, i tried to ping google but "host not found" or something like that was all i got, followed by "sendmsg: Operation mot permitted", So i turned off iptables and my connection got alive again.

I tried flushing (# iptables -F) and entering my firewall rules again, followed by a # /etc/init.d/iptables start then the connection froze again, so i turned off my firewall once more. I have no idea whatsoever what the cause might be. THis is my firewall configuration:

Code:
# cat /var/lib/iptables/rules-save
# Generated by iptables-save v1.3.5 on Tue Apr 24 18:03:48 2007
*raw
:PREROUTING ACCEPT [39627:21086534]
:OUTPUT ACCEPT [25503:1359984]
COMMIT
# Completed on Tue Apr 24 18:03:48 2007
# Generated by iptables-save v1.3.5 on Tue Apr 24 18:03:48 2007
*mangle
:PREROUTING ACCEPT [163:30511]
:INPUT ACCEPT [155:27739]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [218:11937]
:POSTROUTING ACCEPT [47:2081]
COMMIT
# Completed on Tue Apr 24 18:03:48 2007
# Generated by iptables-save v1.3.5 on Tue Apr 24 18:03:48 2007
*filter
:INPUT DROP [51:13070]
:FORWARD DROP [0:0]
:OUTPUT DROP [171:9856]
:INBOUND - [0:0]
:LOG_FILTER - [0:0]
:LSI - [0:0]
:LSO - [0:0]
:OUTBOUND - [0:0]
COMMIT
# Completed on Tue Apr 24 18:03:48 2007
 
Old 04-24-2007, 02:25 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 116Reputation: 116
Your iptables rules drop all packets: ":INPUT DROP [51:13070]"
 
Old 04-24-2007, 02:38 PM   #3
phsythax
Member
 
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Matir
Your iptables rules drop all packets: ":INPUT DROP [51:13070]"
How can that be? i ran the # iptables -F command
 
Old 04-24-2007, 02:52 PM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 116Reputation: 116
Where did you enter your rules? If you entered the iptables commands directly, then they were overwritten by /etc/init.d/iptables start, which loads from the locally stored ruleset.
 
Old 04-24-2007, 02:52 PM   #5
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by phsythax
How can that be? i ran the # iptables -F command
because flushing doesn't affect the chain's policy...

to really clean-out your iptables rules, use something like this:
Code:
#!/bin/sh

IPT="/sbin/iptables"

$IPT -P INPUT ACCEPT
$IPT -P FORWARD ACCEPT
$IPT -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 nat -P PREROUTING ACCEPT
$IPT -t nat -P POSTROUTING ACCEPT
$IPT -t nat -P OUTPUT ACCEPT

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

$IPT -X
$IPT -X -t nat
$IPT -X -t mangle
then set the iptables rules you want, and save new the config to wherever your distro's startup scripts look for it... for example:
Code:
iptables-save > /etc/sysconfig/iptables

Last edited by win32sux; 04-24-2007 at 02:56 PM.
 
Old 04-24-2007, 03:18 PM   #6
phsythax
Member
 
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Matir
Your iptables rules drop all packets: ":INPUT DROP [51:13070]"
Okey, so that was the problem, i wounder how it got there. Thanks for the help, my firewall works as it should now.
 
  


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
ping: sendmsg: operation not permitted br_sriram Linux - Networking 24 04-03-2011 11:12 AM
sendmsg: Operation not permitted error on wireless nic after failed routing attempt feitingen Linux - Wireless Networking 1 04-03-2007 09:16 PM
Operation not permitted jakkals Linux - General 3 09-26-2005 07:30 PM
su - operation not permitted jrtayloriv Linux - Newbie 2 06-09-2005 09:27 PM
operation not permitted jamaso Slackware 2 05-08-2004 05:55 AM


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