Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Ping does it establish a connection? no
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
schmeggahead
Guru
Guru


Joined: 25 Feb 2003
Posts: 314
Location: Columbus, Ohio

PostPosted: Fri Apr 24, 2009 9:29 pm    Post subject: [solved] Ping does it establish a connection? no Reply with quote

From shorewall's standpoint, if I allow one system to ping another, will that allow any subsequent communication if I have allows established connections?

(When I added dhcpd, it seems to be pinging the dns server and going back for a renew of the lease if the ping is not allowed).


Last edited by schmeggahead on Mon May 25, 2009 2:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
aceFruchtsaft
Guru
Guru


Joined: 16 May 2004
Posts: 438
Location: Vienna, Austria

PostPosted: Fri Apr 24, 2009 9:51 pm    Post subject: Reply with quote

Of course not. That would defeat the purpose of a firewall if you were allowed to connect to any services after establishing a connection to some service which is permitted.

Statefull packet inspection matches established connections according to at least the layer 4 protocol (TCP, UDP, ICMP) and the source and destination ports and addresses used.
For example, on a statefull firewall which blocks all incoming and outgoing traffic except for SSH (port 22), if you connect from 192.168.0.2:5000 to an ssh server at 192.168.0.1:22 then the TCP
connection from 192.168.1.2:5000 <-> 192.168.0.1:22 is considered established and the firewall passes through packets belonging to this connection without a specific outbound rule which permits this.

Still, the firewall would not allow you to ping 192.168.0.1 from 192.168.0.2 even if the ssh connection is established.
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sat Apr 25, 2009 8:39 am    Post subject: Reply with quote

aceFruchtsaft wrote:
...

Statefull packet inspection matches established connections according to at least the layer 4 protocol (TCP, UDP, ICMP)


I think ping (ICMP) is layer 3, not layer 4.
Back to top
View user's profile Send private message
defenderBG
l33t
l33t


Joined: 20 Jun 2006
Posts: 817

PostPosted: Sat Apr 25, 2009 8:44 am    Post subject: Reply with quote

is layer 3, because it is part of the ip (l3)
ICMP [1] relies on IP to perform its tasks, and it is an integral part of IP. It differs in purpose from transport protocols such as TCP and UDP in that it is typically not used to send and receive data between end systems. It is usually not used directly by user network applications, with some notable exceptions being the ping tool and traceroute.
http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol
Back to top
View user's profile Send private message
aceFruchtsaft
Guru
Guru


Joined: 16 May 2004
Posts: 438
Location: Vienna, Austria

PostPosted: Sat Apr 25, 2009 8:50 am    Post subject: Reply with quote

magic919 wrote:
aceFruchtsaft wrote:
...

Statefull packet inspection matches established connections according to at least the layer 4 protocol (TCP, UDP, ICMP)


I think ping (ICMP) is layer 3, not layer 4.


It's something in between. It uses IP for the network layer, so you cannot say it's a layer 3 protocol in its own right like, e.g., IPv4, IPX or IPv6.
However, unlike TCP and UDP it does not use ports and would not be considered a pure layer 4 protocol either.

BTW, ping is an application, not a protocol. ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum