Community discussions

MikroTik App
 
moron
just joined
Topic Author
Posts: 2
Joined: Mon Apr 25, 2022 11:05 am

subdomain

Fri May 13, 2022 11:01 am

I want my virtual machine with the cloud to be visible on the Internet. How to do it.
I have to create a subdomain and redirect it to my external address but can I also redirect to a specific port. Because even if he redirects to his public ip, then how to redirect to a given address in the local network. Please explain as simply as possible I am new.
 
rbuserdl
Member Candidate
Member Candidate
Posts: 270
Joined: Thu Mar 22, 2018 1:53 pm

Re: subdomain

Fri May 13, 2022 10:31 pm

Hello Moron!

I am not sure I could understand you well.
Do you want to create a port fordward? Do you need that some connection origined outside could reach the VM?
In this case, if you have a VM with an IP in the same subnet than your router, you just need to create a dst-nat as follows:
* Through gui should be easier I think, so open winbox and connect to the router
* Go to IP -> Firewall -> Click on the "NAT" tab
* Click in the plus signal to create a new destination nat
- In "Chain" select "dstnat"
- In "Protocol" select the protocol you will use (Probably TCP)
- In "Dst. Port" write the port number you need to use to connect from outside
- In "In Interface" or "In Interface List" select your WAN interface
Go to "Action" tab
- In "Action" select dst-nat
- In "To Addresses" write the private IP of your VM
- Keep "To Ports" empty if you want to use the same port in "Outside -> Router" than in "Router -> VM", if not you can set there the internal port
* Click "Ok" to create the dst-nat rule
* Test

Regards,
Damián

Who is online

Users browsing this forum: BioMax, Farid0085, GoogleOther [Bot] and 46 guests