Community discussions

MikroTik App
 
daveloper
just joined
Topic Author
Posts: 5
Joined: Sat Mar 28, 2020 7:27 pm

Redirecting static domain to ip:port

Fri Jun 26, 2020 9:27 pm

Hello,

I have a server running a lot of docker containers and it is getting hard for me to remember all the port numbers to access all the services.
I did setup some static domains in my mikrotik router but I still have to remember port numbers :
192.168.0.10:9000 becomes portainer.mydomain.lan:9000

How can I redirect requests pointing to portainer.mydomain.lan to 192.168.0.10:9000 ?
I'd like to avoid setting up a reverse proxy just for internal address resolution and basic routing

Thanks in advance !!
 
Sob
Forum Guru
Forum Guru
Posts: 5590
Joined: Mon Apr 20, 2009 9:11 pm

Re: Redirecting static domain to ip:port

Fri Jun 26, 2020 10:20 pm

Short answer: no

Long answer: Where there's a will, there's a way, but not necessarily nice one. If you'd point hostnames to random unused addresses (some private range you don't use anywhere), different one for each port, then you could use dstnat to redirect connection attempts going to these vitual addresses to some internal address and different port. Downside is that all this traffic would unnecessarily go through router. So it could be ok for something less demanding like some admin interface, but not very good for transfering large data.
People who quote full posts should be spanked with ethernet cable. Some exceptions for multi-topic threads may apply. Not intended as incentive for masochists.
 
daveloper
just joined
Topic Author
Posts: 5
Joined: Sat Mar 28, 2020 7:27 pm

Re: Redirecting static domain to ip:port

Sat Jun 27, 2020 9:10 pm

Hello,

I setup a quick reverse proxy and got the desired flow.

Thanks for your answer !

Who is online

Users browsing this forum: Pea and 71 guests