There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
UNIX/Linux
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > UNIX/Linux >
iptables


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
aineo's Avatar
Senior Member with 273 posts.
 
Join Date: May 2003
Location: Kentucky, USA
Experience: Advanced
07-Nov-2003, 09:09 PM #1
iptables
I have an iptables question from a class at school that is driving me crazy. I am supposed to explain the entries in this iptables file. I know what they all mean, but I do not know the specifics. Here is the file:

*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
:INICMP - [0:0]
:OUTICMP - [0:0]
[0:0] -A INPUT -i lo -j ACCEPT
[0:0] -A OUTPUT -o lo -j ACCEPT
COMMIT

I understand that it is saying the INPUT, FORWARD, and OUTPUT chains are all set to drop and the loopback is set to accept, but I do not understand the significance of the numbers following each of these lines. Also, why are INICMP and OUTICMP in there? They weren't in the rules I defined. By the way, here is the ruleset that is running:

#!/bin/sh
# Remove any existing rules
iptables --flush
# Set up the default policy for each of the chains
iptables --policy INPUT DROP
iptables --policy OUTPUT DROP
iptables --policy FORWARD DROP
# Unlimited traffic on the loopback interface
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

The man pages do not seem to give the specifics I am looking for. If someone can either explain this to me, or point me to a reference that explains it, I would be very grateful. Thanks!
__________________
Has someone's advice here helped you? If so, return the favor and post a reply acknowledging that the problem has been solved.
HKOldGuy's Avatar
Junior Member with 19 posts.
 
Join Date: Jul 2003
Location: Hong Kong
10-Nov-2003, 12:37 AM #2
Let me try.
INICMP means incoming ping
OUTICMP means outgoing ping
I don't know what is meant by "- [0,0]".
Assume that "- [0,0]" means DROP.
The following is my iptables commands
:
iptables -A INPUT -p icmp -j DROP
iptables -A OUTPUT -p icmp -j DROP
aineo's Avatar
Senior Member with 273 posts.
 
Join Date: May 2003
Location: Kentucky, USA
Experience: Advanced
10-Nov-2003, 02:19 AM #3
A friend of mine just found a link that explained some of this. The [0,0] is actually [packet counter:byte counter]. The reason these were 0 must have been because the rules had not been tested. The INICMP and OUTICMP would relate to pings, but I don't know how they got in there because they weren't defined in my rules. Anyway, the [0:0] was my main problem and now I know what it is. Thanks for the input HKOldGuy!

The link is case you are interested is http://www.faqs.org/docs/iptables/iptables-save.html
__________________
Has someone's advice here helped you? If so, return the favor and post a reply acknowledging that the problem has been solved.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:35 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.