LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-18-2014, 10:41 AM   #1
hezoka92
LQ Newbie
 
Registered: May 2014
Posts: 1

Rep: Reputation: Disabled
Question A Question about iptables


Im new to linux and this is my first post here and i looking for answers for some of my questions
Here is the defaults of my iptables:

target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

i know how iptables work in general but what i cant understand is:
1- why are the source and destination 0.0.0.0/0?

2- what does the following mean:
2.1- reject-with icmp-host-prohibited
2.2- state RELATED,ESTABLISHED
2.3-state NEW tcp dpt:22

3- what is icmp? i know it is an iternet protocol but what is the use of it/when do i use it, Which applications of services use it?.

i tried googling this but i got lost
Thanks in advance and i will really appreciate detailed answers
 
Old 05-18-2014, 11:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
1 - it means "everything". literally it represents a subnet on 0.0.0.0 with a 0 bit subnet mask, which will match everything.

2.1 - drop the connection and send an ICMP Host Prohibited message back
2.2 - allow connections which are already established or related to established connections
2.3 - allow new connections on TCP port 22 (that's SSH)

3 - it's Internet Control Message Protocol, it's what protocol Pings are, and are used to send low level technical messages.

SO SO much more on wikipedia and the likes, just have a search.
 
  


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
iptables question msasson Linux - Security 4 09-15-2011 02:36 PM
Question regarding iptables lassik Linux - Newbie 2 02-15-2009 06:54 PM
iptables question stny Linux - Security 7 03-04-2006 05:34 AM
Iptables question.. pembo13 Linux - Networking 2 09-24-2003 05:54 PM
IPTABLES Question RecoilUK Linux - Networking 2 09-24-2001 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:40 PM.

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