LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 11-06-2007, 06:56 PM   #1
sportsman667
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Rep: Reputation: 0
converting IP tables to a chart


Hello,
I am trying to convert my IP tables into a chart-like format to better understand what is going on. Only problem is im not sure if the table I have created is set up correctly. Could someone take a look at this and either varify it for me or tell me where I have made a possible mistake.

Thanks again,
Thomas

MY IP TABLES: (permit all outgoing connections (including response packets), incoming ICMP, incoming ssh, and incoming finger connections. Reject all other packets.)
# iptables -F
# iptables -A INPUT -i 1o -j ACCEPT
# iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
# iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
# iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 79 -j ACCEPT
# iptables -A INPUT -p icmp -j ACCEPT
# iptables -A INPUT -j REJECT


MY CHART:

direction source protocols source port destination port Action
OUTGOING INTERNAL Any Any Any ACCEPT
OUTGOING INTERNAL TCP >1023 22 ACCEPT
INCOMING EXTERNAL TCP 22 >1023 ACCEPT
OUTGOING INTERNAL TCP >1023 79 ACCEPT
INCOMING EXTERNAL TCP 79 >1023 ACCEPT
INCOMING EXTERNAL ICMP Any Any ACCEPT
EITHER ANY Any Any Any Deny



Last edited by sportsman667; 11-06-2007 at 06:58 PM.
 
Old 11-06-2007, 07:15 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
iptables -L

will give you a chart

You seem to have a default ACCEPT policy ...
... don't do this - instead, set up a drop policy on all chains. Then explicitly accept what you plan to. Then your input chains will work as expected if you remove the last one and you need to add all an output accept-all line.
 
Old 11-06-2007, 08:22 PM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
And even more charty (chartier?) output can be obtained with:
Code:
iptables -nvL --line-numbers
 
Old 11-06-2007, 09:13 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Also spotted typo:
Quote:
# iptables -A INPUT -i 1o -j ACCEPT
# iptables -A INPUT -i lo -j ACCEPT
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Organizational Chart program linx win Debian 2 10-28-2007 12:17 AM
how to make a chart with holes? caminoix Linux - Software 2 05-24-2005 08:10 AM
flow chart sw allelopath Linux - General 1 04-06-2004 06:02 AM
C RT Chart of data DaFrEQ Programming 0 02-18-2004 09:44 AM
/dev chart chrismiceli Linux - General 2 03-29-2003 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration