Skip to main content
All CollectionsRouter ConfigurationUbiquity
How to set up Port Forwarding for UniFi devices
How to set up Port Forwarding for UniFi devices

Learn how to set up Port Forwarding for UniFi devices. Follow this guide to enable remote access to your UniFi controller.

M
Written by Matija Farkaš
Updated over 2 months ago

Why and when to use Port Forwarding?

For setting up a Spotipo captive portal with UniFi controllers, Port forwarding is necessary as it directs traffic from your public IP address to your UniFi controller using its private IP address and port number.

Setting up static IP address for UniFi controller?

Find the Device's MAC Address:

  • Go to the UniFi Controller and navigate to UniFi Devices.

  • Select the device you need to configure. The MAC address will be displayed in the panel on the right.

Router with Graphical Interface:

  • Log into your router's web interface.

  • Find the Static IP, DHCP Reservation or similar option (name varies by router).

  • Add a new entry with the device's MAC address and assign the desired static IP address.

Router with CLI-Based Interface (Example for Cisco IOS):

enable
configure terminal

ip dhcp pool <pool_name>
network <ip address> <mask>
default-router <router_ip>
dns-server <dns-server_ip>

host <ip_address> <mask>
hardware-address <MAC_Address>

exit

write memory

Setting up port forwarding

  1. Prepare Your Router:

    • Ensure that your UniFi device has a static IP address assigned.

  2. Configure Port Forwarding on Your Router:

    • Graphical Interface:

      • Find the Port Forwarding, Port Mapping, Virtual Server, or NAT option (name varies by router).

      • Add a new rule to forward traffic to the UniFi device's IP address.

      • Use TCP protocol and port 443 (used by UniFi controllers).

  • CLI based interface (example for Cisco IOS)

enable
configure terminal

interface <Outside_Interface>
ip nat outside

interface <Inside_Interface>
ip nat inside

ip nat inside source static tcp <UniFi_ip> 443 interface <Outside_Interface> 8080

write memory

Verify the Configuration:

Check that the port forwarding rule is active and working.

Did this answer your question?