# 서버 방화벽 설정

게임 서버를 방화벽으로 보호할 경우 ProudNet의 정상 수행을 위해서는 다음 사항을 고려해야 합니다.

> * 서버 실행 시(<mark style="color:orange;">Proud.CNetServer.Start</mark>) <mark style="color:orange;">Proud.CStartServerParameter.m\_tcpPort</mark> 에서 지정한 UDP port들(<mark style="color:orange;">Proud.CStartServerParameter.m\_udpPorts</mark>)은 송수신 모두 열려 있어야 합니다.
> * 꼭 필요한 경우가 아니라면 ICMP 타입 IP 패킷의 송수신을 허용해야 간혹 발생하는 네트워크 장애를 방지할 수 있습니다.

## DDOS 공격에 대비한 방화벽 설정

ProudNet에서는 클라이언트와 연결되면 서버는 UDP 통신 하기 이전에 먼저 그 클라이언트에게 임의 패킷 1개를 던집니다. 그리고 그 클라이언트는 그 패킷을 받아서 그냥 버립니다.

어떤 서버용 방화벽들은 인터넷 주소가 A인 클라이언트에게 먼저 UDP 패킷을 쏜 후부터 A에 한해 A가 서버에 UDP 패킷을 보내는 것을 일정 시간동안은 받을 수 있게 허락하는 기능을 갖고 있습니다. 이 기능을 켜 둘 경우, ProudNet의 위 특징 덕에 UDP를 열어두면서도 DDOS 공격에 안전한 방화벽 설정이 가능합니다.

이러한 기능이 가능한 방화벽이면 <mark style="color:orange;">Proud.ServerUdpAssignMode\_PerClient</mark> 와 비어있는 <mark style="color:orange;">Proud.CStartServerParameter.m\_udpPorts</mark> 설정으로만 서버를 실행시킬 수 있으며, 동시접속자 제한을 최소화하여 서버를 실행할 수 있는 장점도 있습니다.

{% hint style="success" %}
**참고**

[**서버의 UDP 포트 사용 방식**](/proudnet/proudnet/usage_pn/tips.md#udp)
{% endhint %}

## ICMP 방화벽 설정

서버 시작 옵션에서 <mark style="color:orange;">Proud.ServerUdpAssignMode.ServerUdpAssignMode\_Static</mark>를 사용하는 경우 <mark style="color:orange;">ICMP host unreachable</mark> 패킷 수신을 차단하는 것을 권장합니다.&#x20;

다음은 Windows 방화벽 사용 시 설정 방법에 대한 예시입니다.

<figure><img src="/files/1kiPftHzCenRMjhGayj4" alt=""><figcaption><p>방화벽 사용 설정방법 예시</p></figcaption></figure>

<figure><img src="/files/0fwcJ4kCp1asoryViQvU" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/tpN83c9KsydTNyKK6OB1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/DFNLvBZSOYfAvGhGbGXq" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/H9hPQO8QvvOQVBPRo4MC" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/8cyRhf39kjmTwUOpTc9P" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/KaPJci2VvJbSxKm2jLA2" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/kvHCVLnOOXEaFHtBvCQO" alt=""><figcaption></figcaption></figure>

이 후부터는 '마침'이 나올 때까지 계속 '다음' 버튼을 누르시면 됩니다.

{% hint style="success" %}
**참고**

[**서버의 UDP 포트 사용 방식**](/proudnet/proudnet/usage_pn/tips.md#udp)
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.proudnet.com/proudnet/pn_reference_ko/notes/setting_firewall.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
