> For the complete documentation index, see [llms.txt](https://ed4m4s.blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ed4m4s.blog/master-1/ports-open-close.md).

# Ports Open/Close

{% hint style="info" %}
With **BOLD** is the attacker/client send flags
{% endhint %}

### TCP Connect&#x20;

open: **SYN**, SYN/ACK, ACK, **RST**&#x20;

close: **SYN**, RST

### Stealth Scan(Half Open)&#x20;

open: **SYN**, SYN/ACK, **RST**&#x20;

close: **SYN**, RST

### Inverse TCP flag&#x20;

open: **FIN/URG/PSH/NULL**, No Response&#x20;

close: **FIN/URG/PSH/NULL**, RST/ACK

### Xmas Scan&#x20;

open: **FIN+URG+PSH**, No Response&#x20;

close: **FIN+URG+PSH**, RST/ACK

### Null Scan&#x20;

open: No Response&#x20;

close: RST

### ACK flag Probe Scanning&#x20;

Attacker/client sends only ACK package. If he receives on **RST** flag that means the port is there and **open**. Also on "NO RESPONSE" means that a stateful firewall is present. On a RST flag means no firewall is in place.

### IDLE Scan(sends packets from IDLE zombie)

### UDP Scanning(No flags sent, No 3-way Handshake made)&#x20;

open: No Response&#x20;

close: ICMP port unreadable UDP port scanning is often unreliable, as firewalls and routers may drop ICMP packets. This can lead to false positives in your scan, and you will regularly see UDP port scans showing all UDP ports open on a scanned machine. People often forget to scan for UDP services, and stick only to TCP scanning, thereby seeing only half of the equation.

###

### FIN Scanning&#x20;

open: No Response&#x20;

close: RST

###

### ACK Scanning&#x20;

open: RST&#x20;

close: No Response


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ed4m4s.blog/master-1/ports-open-close.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
