Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-24-2007, 02:21 PM
|
#1
|
Member
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152
Rep:
|
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
|
|
|
04-24-2007, 02:25 PM
|
#2
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep:
|
Your iptables rules drop all packets: ":INPUT DROP [51:13070]"
|
|
|
04-24-2007, 02:38 PM
|
#3
|
Member
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152
Original Poster
Rep:
|
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
|
|
|
04-24-2007, 02:52 PM
|
#4
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep:
|
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.
|
|
|
04-24-2007, 02:52 PM
|
#5
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
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.
|
|
|
04-24-2007, 03:18 PM
|
#6
|
Member
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 06:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|