Is there any way to forward ports into local dynamic IP-s?
for example, how to forward port 8291 to a routerboard
which gets dynamic ip address from PPPoE?
further more, how to make routes to dynamic IP-s?
/ip firewall nat
add chain=dst-nat dst-address=80.70.xx.xx protocol=tcp port=8291 action=dst-nat
to-addresses= (dynamic IP Address)
/ip route
add dst-address=192.168.1.0/24 gateway=(dynamic IP address)
You are correct in this statement, however, the “problem” is in how to create a NAT to a device that has a dynamic address., which the posted solution does. If you want, I can create for you a script that WILL create this NAT to an actual dynamic IP address, but THAT is not a “free” solution.
Post subject: How to nat local dynamic IP addresses
Read the post to see the original question. The question pertained to dynamic IP addresses, but the “problem” that needed to be solved is solved by my solution.
I am not sure how you have this set up. Is the challenge just the device needs dhcp rather than setting a static IP? If the device that provides the dhcp server service is a MikroTik box, you can make a dynamic lease a static lease. It is still dhcp, but It always gets the same IP. Then you can point stuff at it. I do this with network printers. Would that help?
He (she?) said it’s pppoe. Either way, the solution I posted is one I’ve used for various situations and it does work. Your solution works for the purpose you stated (printers, computers, etc). He could, also, set static IPs for the pppoe account, but if he wants to keep it dynamic, then my solution works.