Skip to main content

Portforwarding from Magenta Fiberbox through another Router (Ubiquiti EdgeRouter 6p)

338 words·
Router Port Forwarding Ubiquiti Magenta Homelab
Table of Contents

In this tutorial I set up a port forwarding from my Magenta Fiber Box to my Edge Router 6p and from the EdgeRouter to an Ubuntu server with an Nginx webserver.

Magenta Fiber Box Network: 192.168.0.1/24
Ubiquiti EdgeRouter 6p VLAN Network: 192.168.30.1/24
Ubuntu VM: 192.168.30.1


Magenta Fiber Box
#

Prerequisites
#

By default it is not possible to use port forwarding with the Magenta Fiber Box. To use this function it is necessary to call the Magenta support and ask for the assignment of an static IPv4 address.


Connected Devices
#

Go to the “Connected Devices” section and find the IPv4 and MAC addresses of the EdgeRouter in the Magenta Fiber Box network:

In my case the network is 192.168.0.1/24 and the IP of the EdgeRouter is 192.168.0.59.


DHCP
#

Let’s build a clearer address scheme by changing the default settings of the DHCP server.

Create a new rule and assign a new static IP the to EdgeRouter 6p, use the MAC address that was listed in the “Connected devices” section. I use the IP address 192.168.0.10.


Port Forwarding
#

Go to: Advanced settings / Security / Port forwarding

Add a new Port Forwarding rule:

Create a Port Forwarding rule that points to the IP of the EdgeRouter:

Save the new rule:


Ubiquiti EdgeRouter 6p
#

LAN & VLAN
#

In my example I want to forward into the 192.168.30.1/24 VLAN network that I have already created:


Port Forwarding
#

Go to: Firewall/NAT > Port Forwarding

In my case WAN (Magenta Fiber Box) is connected to port eth0 and port eth1 goes to an Ubiquiti EdgeSwitch 10x that tags the VLANs.

Add a port forwarding rule: I use an Ubuntu VM that is connected to the 192.168.30.1/24 VLAN with the IP 192.168.30.4. For this example I have installed a Nginx server to test the port forwarding.

Make sure “Enable auto firewall” is checked:

Google “whats my IP” to find the public IPv4 address of your Fiber Box and open it in an browser to check if everything works.