Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu May 17, 2012 9:04 pm 
Offline
Senior Newbie

Joined: Thu May 17, 2012 7:24 pm
Posts: 7
Hi,

I'm trying to edit my iptables but am getting an error when I try to restart the service...

I've pasted the commands and output here: http://paste.linode.com/6689

The rule seems to save and apply ok but the error always comes up when I restart the service

Appreciate any help you guys can give with this :D, thanks


Last edited by linod3 on Thu May 17, 2012 9:12 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Thu May 17, 2012 9:10 pm 
Offline
Senior Member
User avatar

Joined: Thu Nov 24, 2011 12:46 pm
Posts: 139
Location: Mesa AZ
Should have just added it to your other thread...

Not a CentOS guy... but a quick Google showed:

The issue you are experiencing with iptables is happening due to paravirt kernel having a "security" chain compiled into it, and the default "iptables" init script included with CentOS does not know how to handle it. You can resolve this issue by downloading an amended version of the "iptables" init script.

_________________
Kevin a.k.a. Dweeber


Top
   
 Post subject:
PostPosted: Thu May 17, 2012 9:17 pm 
Offline
Senior Newbie

Joined: Thu May 17, 2012 7:24 pm
Posts: 7
Thanks for the reply Dweeber

The paste on http://epoxie.net/12023.txt doesn't exists though

I tried chmodding the iptables file anyway and restarting the service, but the error still comes up...


Top
   
 Post subject:
PostPosted: Thu May 17, 2012 9:31 pm 
Offline
Senior Member
User avatar

Joined: Thu Nov 24, 2011 12:46 pm
Posts: 139
Location: Mesa AZ
i updated my post apparently after you saw it. I don't have a link to the updated init script but it should be on one of the CentOS forums.

_________________
Kevin a.k.a. Dweeber


Top
   
 Post subject:
PostPosted: Thu May 17, 2012 10:29 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
Ignore the error, it's not important. It's just a consequence of not using the vendor kernel. It still works.

Code:
# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ssh-drop  tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 flags:0x17/0x02 recent: UPDATE seconds: 60 hit_count: 5 name: ssh side: source
           tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 flags:0x17/0x02 recent: SET name: ssh side: source

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain ssh-drop (1 references)
target     prot opt source               destination         
LOG        all  --  0.0.0.0/0            0.0.0.0/0           limit: avg 2/min burst 5 LOG flags 0 level 4 prefix `FIREWALL:SSH-DROPPED '
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable

# service iptables restart
Flushing firewall rules:                                             [  OK  ]
Setting chains to policy ACCEPT: security raw nat mangle filter      [FAILED]
Unloading iptables modules:                                          [  OK  ]
Applying iptables firewall rules:                                    [  OK  ]
Loading additional iptables modules: ip_conntrack_netbios_ns         [FAILED]

# iptables -L -n         
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ssh-drop  tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 flags:0x17/0x02 recent: UPDATE seconds: 60 hit_count: 5 name: ssh side: source
           tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22 flags:0x17/0x02 recent: SET name: ssh side: source

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain ssh-drop (1 references)
target     prot opt source               destination         
LOG        all  --  0.0.0.0/0            0.0.0.0/0           limit: avg 2/min burst 5 LOG flags 0 level 4 prefix `FIREWALL:SSH-DROPPED '
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Fri May 18, 2012 4:00 pm 
Offline
Senior Newbie

Joined: Thu May 17, 2012 7:24 pm
Posts: 7
Thanks for the reply sweh, appreciate the help!

Good to know it's not a 'real' error...

Any way to suppress it though, me no like errors!!!


Top
   
 Post subject:
PostPosted: Fri May 18, 2012 4:03 pm 
Offline
Sysop

Joined: Sat Nov 27, 2010 3:32 am
Posts: 180
Website: https://blog.timheckman.net/
Location: San Francisco, CA
This should do the needful:

Code:
cd /etc/init.d/
cp iptables ~/iptables.backup
wget http://epoxie.net/14857.txt
patch -p1 < 14857.txt   # if prompted, specify /etc/init.d/iptables as the file to be patched
rm 14857.txt


-Tim


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group