There is an interesting way of knowing what kind of filters are placed in the gateway of a specific host. It is called firewalk and it is based on IP TTL expiration. The algorithm goes as follows:
The entire route is determined using any of the traceroute techniques available
A packet is sent with the TTL equal to the distance to the target
If the packet times out, it is resent with the TTL equal to the distance to the target minus one.
If an ICMP type 11 code 0 (Time-to-Live exceeded) is received, the packet was forwarded and so the port is not blocked.
If no response is received, the port is blocked on the gateway.
Letts see this with a real example.
more here.............https://isc.sans.edu/diary/Testing+for+opened+ports+with+firewalk+technique/18761
The entire route is determined using any of the traceroute techniques available
A packet is sent with the TTL equal to the distance to the target
If the packet times out, it is resent with the TTL equal to the distance to the target minus one.
If an ICMP type 11 code 0 (Time-to-Live exceeded) is received, the packet was forwarded and so the port is not blocked.
If no response is received, the port is blocked on the gateway.
Letts see this with a real example.
more here.............https://isc.sans.edu/diary/Testing+for+opened+ports+with+firewalk+technique/18761