LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 07-17-2004, 12:13 AM   #1
yat
LQ Newbie
 
Registered: Mar 2004
Location: HongKong
Posts: 13

Rep: Reputation: 0
Exclamation How to trace the error of an iptables setting


Is any body so kind to teach me how to trace the error of the iptables.

Thank you !

I recently start to set up my fire-wall.
firstly I set all tables' (including: nat, mangle, filter) "--policy" to drop all input, output, forwarding.
and than I add to more entry. The content is something like that :
#iptables -A INPUT -i eth0 -p icmp --icmp-type --echo-request -s 192.168.X.X -j ACCEPT.
#iptables -A OUPUT -o eth0 -p icmp --icmp-type --echo-reply -d 192.168x.x -j ACCEPT.

after that I :#ping XXX.XXX.XXX.XXX
the system return the an error message .
" ping : sendmsg not permitted. "

At this stage, I have two questions.
The first one:
how can I check any log for debug.

The second thing is :
according to my learning materials, I had open the required channels for the "ping" program to work. why I got the above respone.

Please tell me, why !

Thank you !
 
Old 07-17-2004, 06:11 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
Quote:
#iptables -A INPUT -i eth0 -p icmp --icmp-type --echo-request -s 192.168.X.X -j ACCEPT.
#iptables -A OUPUT -o eth0 -p icmp --icmp-type --echo-reply -d 192.168x.x -j ACCEPT.
You are only letting pings in... and replies to it out.
You need to allow ping out and replies in, for example

Code:
iptables -t filter -A OUTPUT -p icmp -s 192.168.x.x -j ACCEPT
iptables -t filter -A INPUT -p icmp -d 192.168.x.x -j ACCEPT

Last edited by ppuru; 07-17-2004 at 06:12 AM.
 
Old 07-18-2004, 07:51 AM   #3
yat
LQ Newbie
 
Registered: Mar 2004
Location: HongKong
Posts: 13

Original Poster
Rep: Reputation: 0
Correction

Thank you for your kindness

I am sorry to tell you that I have something to mistype. The ERROR message should be :
Ping :sendsmg : Operation not permitted

On the other hand, my command should be :
#iptabels -A OUTPUT -o eth0 -p icmp -s 192.168.X.X --icmp-type echo-request -j ACCEPT
#iptables -A INPUT -i eth0 -p icmp --icmp-type echo-reply -d 192.168.X.X -j ACCEPT

And after I add -t filter before -A, the error message is the same.

I tried to consult the problem with some friends. They considered that the problem is due to the activating of SELinux option when I install the Fedora Core 2. If that the reason how can I disable this SELinux ?
 
  


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
An error occured getting IPtables status from the command /etc/rc.d/init.d/iptables s CrazyMAzeY Linux - Newbie 10 08-12-2010 05:25 AM
can't trace frequent apache crash/automagic restart error I_AM Linux - General 1 04-09-2005 08:13 AM
setting iptables bijuhpd Linux - Newbie 4 03-17-2005 12:24 PM
How to trace Metacity/GDM greeter error? kstarks Linux - Software 2 12-12-2003 10:51 AM
setting up iptables Mydal Linux - Security 3 01-03-2003 02:59 PM


All times are GMT -5. The time now is 09:53 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
Open Source Consulting | Domain Registration