> For the complete documentation index, see [llms.txt](https://docs.tcpshield.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tcpshield.com/vxlan/sentry-tunnel-for-rathena-ragnarok.md).

# Sentry Tunnel for rAthena/Ragnarok

This guide explains how to create and configure a Sentry/VXLAN tunnel, using a Ragnarok Online server as an example (rAthena emulator running on `108.61.149.182:6900`).&#x20;

## 1. Setup  <a href="#docs-internal-guid-482d80b6-7fff-88aa-23cb-464e847898da" id="docs-internal-guid-482d80b6-7fff-88aa-23cb-464e847898da"></a>

Follow the Sentry Tunnel General Setup guide [here](https://docs.tcpshield.com/vxlan/sentry-tunnel-general-setup#id-1.-tunnel-creation).

## 2. Whitelist VXLAN and Backend Ports

Your VPS/Dedicated server might have a firewall which is blocking outside connections by default (or a [Security Group](https://docs.tcpshield.com/vxlan/pages/631Mayag431M2l0f1dAD#id-1.2-firewall) put in place by your Cloud Provider). In this case, it's important to make sure your server port and the VXLAN's port are both accepting connections. This can be achieved by using `UFW` or `iptables`.&#x20;

#### Using UFW <a href="#using-ufw" id="using-ufw"></a>

```
ufw allow <port>/udp
ufw allow <port>/tcp
```

Then verify the status by running:

```
ufw status
```

#### Using iptables <a href="#using-iptables" id="using-iptables"></a>

```
iptables -A INPUT -p udp --dport <PORT> -j ACCEPT
iptables -A INPUT -p tcp --dport <PORT> -j ACCEPT
iptables -A OUTPUT -p tcp --sport <PORT> -j ACCEPT
iptables -A OUTPUT -p udp --sport <PORT> -j ACCEPT
```

Then verify your configuration by running:

```
iptables-save
```

## 3. Execution <a href="#docs-internal-guid-01454216-7fff-023d-1756-215a6f207bb2" id="docs-internal-guid-01454216-7fff-023d-1756-215a6f207bb2"></a>

Now you just need to run the provided script, once completed:

* Your server will now be reachable via the assigned public IP (e.g., 104.234.6.128).
* The server latency depends on the Anycast region and distance from your users.

You can verify that the tunnel was created by running:

```
ip -s link show vxlan_<insert vxlan ID>
```

Originally I have the Ragnarok server running on: `108.61.149.182:6900`

After running the setup script, the players can now connect using: `104.234.6.128:6900`

<figure><img src="/files/cYI4dT01GR7WEq2KWD3L" alt=""><figcaption><p>Example on the client's side connection</p></figcaption></figure>

As you can see, only the IP changes — <mark style="color:purple;">the service port remains the same</mark>. Only the address needs to be updated.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfpVrcJ2HBmyhYCaeJl66LgPFPoEKPgoel9joN-i-UU7kHxrKjqoku-ZljqV86akHfbeMroX00tEl-1o3afG9SrxYHxozDI62mJ6pVQDuA1bPTUqnxS81vkQkZbzZ2KxlG25wjbmA?key=YL1mFWFPSqgKGf9wt7fI0V67" alt=""><figcaption><p>Final result</p></figcaption></figure>

And that's it, your Sentry tunnel is now fully operational. Congratulations! You can now run your server with confidence, knowing that it's protected by TCPShield.

If you encounter any issues during setup or operation, please refer to our [Debugging Guide](/vxlan/common-issues-and-debugging.md) for troubleshooting tips and common pitfalls.
