# Abrir puertos en USG Security Gateway

Entorno:\
\- Unifi Controller v6.5.55\
\- USG Security Gateway, firmware v4.4.56

Entramos en nuestro UniFi Controller, y nos vamos a "Settings", en el menu lateral, una vez dentro, nos dirigimos al menu "Advanced Features", y en la parte derecha de la pantalla, "Advanced Gateway Settings"

![](/files/pCwpL5VWZxFwP7rPtbu9)

Una vez dentro, veremos varias opciones, click en "Create New Port Forwarding"

![](/files/bHtuLIm8rAoYEAxirbZo)

Ahora debemos rellenar el forulario, necesitaremos el puerto externo (el que estara visible desde internet), el interno que sera la maquina donde escuche, y la IP de la maquina y protocolo, TCP y/o UDP.

En "Name", ponemos el servicio que vamos a configurar, habilitamos la opcion "Enable Forward Rule" para que este disponible el puerto, si lo queremos deshabilitar, con desmarcar esa opcion, es suficiente, elegiremos el interface (por defecto WAN), puerto, IP, protocolo y si tenemos configurado una servicio de registro de log, podemos marcar la opcion para añadir el resultado de lo que pase por el servicio de log, ejemplo, rsyslog, kibana...

![](/files/L2EMXMXIpNurDJG57P1R)

Guardamos, y dejamos que aprovisione los cambios y ya tendremos listo el acceso.


---

# 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://blog.azagra.dev/unifi/abrir-puertos-en-usg-security-gateway.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.
