Community discussions

just joined
Topic Author
Posts: 1
Joined: Mon Aug 20, 2018 10:27 pm

WAN to LAN NAT based on subdomain via DDNS!!!

Mon Aug 20, 2018 10:51 pm

Hi, this might not be something that can be done using a MikroTik router but this forum is full of cleaver people who will be able to tell me yes or no.

I replaced my BT HomeHub with a Mikrotik and loving it so far. I have a dynamic IP address so I have a script that updates with my WAN IP ( ... _No-IP_DNS).

I've also setup the IP/Cloud feature but the DNS name is a little hard to remember!

I've set up NAT rules to forward specific ports to my devices on my LAN but, want to simplify the port numbers in the address to names. I could do this in the no-ip interface but you only get 3 address and I have more devices that that.

I have my own domain name and want to use subdomain names to forward the traffic to specific ports. For example: -> -> my.public.ip.address:6000 -> -> my.public.ip.address:6001

My domain name supplier can't resolve the subdomain to an address and port in the cPanel so can the Mikrotik look at the original requested subdomain address and forward it to a specific port or is all that information removed in the CNAME step?

Attached is a diagram to show my setup, obviously trying to do this on the cheap!

Thanks for reading this and any help you can offer.
You do not have the required permissions to view the files attached to this post.
User avatar
Posts: 2982
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: WAN to LAN NAT based on subdomain via DDNS!!!

Tue Aug 21, 2018 12:13 pm

I've also setup the IP/Cloud feature but the DNS name is a little hard to remember!
Use IP > Cloud.
Purchase a domain, say my
Setup as many CNAMEs on that domain pointing to the ip > cloud FQDN.

From here onwards, no DNS query is gonna "resolve" to a port AFAIK; to manipulate based on requested address, to specific address/port (e.g. if client asks for forward to , you need a reverse proxy (if it were http/s), Nginx is typically used for this.

If you want this to be able to access your files/movies while on the go, I wouldn't set it this way.

What I would do instead, as your Mikrotik router actually has the public IP:

1.- Set up the VPN service on your Mikrotik router
2.- Add that VPN account using your ip > cloud FQDN on your phone, laptop, etc
3.- When required, enable the VPN to dial "into" your router: you'll then access your network NAS or PVR as if you were there, as you'll actually be inside your network.

Simpler and more secure than forwarding ports to internet. Easier to manage too: as you add network devices there's no need for more port forwarding mess.
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum

Who is online

Users browsing this forum: Google [Bot] and 37 guests