How to Configure Port Forwarding (DST-NAT) on MikroTik for Local Servers & CCTV
Introduction
Once your Mozfactor Static Public IP tunnel (WireGuard, L2TP, or SSTP) is active on your MikroTik router, configure Port Forwarding (DST-NAT) so external users can reach your local Web Server, CCTV/NVR, Mikhmon, or business applications.
Prerequisites
- Your Mozfactor Public IP tunnel is Online on MikroTik.
- Know your target device's Local LAN IP (e.g.,
192.168.88.10) and Port (e.g.,80,443or CCTV port8000). - Ensure the target device uses your MikroTik router as its Default Gateway.
Step 1: Add DST-NAT Rules on MikroTik
Example 1: Forward Web Server (Ports 80 & 443)
/ip firewall nat
add chain=dstnat in-interface=wg-mozfactor protocol=tcp dst-port=80,443 action=dst-nat to-addresses=192.168.88.10 comment="Forward Web Server"
Example 2: Forward CCTV / NVR (Port 8000)
/ip firewall nat
add chain=dstnat in-interface=wg-mozfactor protocol=tcp dst-port=8000 action=dst-nat to-addresses=192.168.88.20 to-ports=8000 comment="Forward NVR CCTV"
Replace wg-mozfactor with your actual Mozfactor tunnel interface name (e.g., L2TP-Mozfactor).
Step 2: Understanding NAT Mode (ON vs. OFF) in Client Area
- NAT ON (Default — Recommended): Incoming traffic is automatically source-NATed so your local server replies seamlessly without needing extra Mangle/Routing rules on MikroTik.
- NAT OFF (No-NAT / Real Visitor IP): Enable only if your server needs the visitor's real source IP. When NAT is OFF, you must apply the Mangle & Route Script from your Client Area Service Detail page so return packets route back through the Mozfactor tunnel.
Verification
Test accessing http://YOUR_PUBLIC_IP (or YOUR_PUBLIC_IP:PORT) from an external mobile network and verify that the Packets/Bytes counter increases on your DST-NAT rule in WinBox.