Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-18-2014, 11:41 AM   #1
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 icmp --
ACCEPT all --
ACCEPT tcp -- state NEW tcp dpt:22
REJECT all -- reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- 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

2- what does the following mean:
2.1- reject-with icmp-host-prohibited
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, 12:18 PM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
1 - it means "everything". literally it represents a subnet on 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.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables question msasson Linux - Security 4 09-15-2011 03:36 PM
Question regarding iptables lassik Linux - Newbie 2 02-15-2009 07:54 PM
iptables question stny Linux - Security 7 03-04-2006 06:34 AM
Iptables question.. pembo13 Linux - Networking 2 09-24-2003 06:54 PM
IPTABLES Question RecoilUK Linux - Networking 2 09-24-2001 07:27 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration