How to set external IP and set ports for devices

Hi guys. I need help on direction how to set this up. So i have a couple static ips I can assign with my plan but not enough for everything i need. I need to be able to access vms remotely from outside the network. Each vm will run different distros.I was told to assign the router an external ip then all vms behind it to a different port. now considering I will use RDP to access the vm, Im not sure how that would be configured since the rdp listens on its own port. Software I want to use to access it is Myrtille which is accessed "example.com/Myrtille" on port 8006. Easy to do with a single static ip but not sure with assessible port.

Using Cloudflare portzilla i figure i can use a domain.com/example to direct to the vm but is it possible to access the port needed for Myrtille to repsond? Thanks.

You just use port forwards:

  • external port will be one port (e.g. 9000, 9001, 9002)
  • you will forward to the same LAN IP/port (e.g. 192.168.1.2:8000, 192.168.1.3:8000, 192.168.1.4:8000)

(This can also be donr on the LuCI web GUI.)

config redirect
	option target 'DNAT'
	option src 'wan'
	option dest 'lan'
	option name 'Test1'
	option proto 'tcp'
	option dest_port '8000'
	option src_dport '9000'
	option dest_ip '192.168.1.2'

config redirect
	option target 'DNAT'
	option src 'wan'
	option dest 'lan'
	option name 'Test2'
	option proto 'tcp'
	option dest_port '8000'
	option src_dport '9001'
	option dest_ip '192.168.1.3'

config redirect
	option target 'DNAT'
	option src 'wan'
	option dest 'lan'
	option name 'Test3'
	option proto 'tcp'
	option dest_port '8000'
	option src_dport '9002'
	option dest_ip '192.168.1.4'

What is this?

RDP is 3398/tcp.

Not sure how this would work if you haven't specified the custom port to the software; but only you would know that.

2 Likes

Thanks. Cloudflare portzilla acts as a proxy to forward a url to certain port. https://www.cloudflare.com/apps/portzilla

Myrtille is a web interface to a standard rdp with html5 and much faster then windows rdp or other clients.
https://cedrozor.github.io/myrtille/ Myrtille uses port 8006 to connect. At least when installing it gives you the option of changing that. But on login you need to specify the port if not 3389.

1 Like