Hi,
I’m stuck on building a correct NAT rule and hope someone smarter than I am can provide some guidance.
I have a service (several actually) that runs on my internal network and is accessed both from my internal network and the internet using my FQDN and some port. e.g. my.cooldomain.com:8080
If I do this, it routes all traffic on port 8080 regardless of destination to the same place:
add action=dst-nat chain=dstnat dst-port=8080 protocol=tcp to-addresses=10.10.10.90 to-ports=8080
but if I want to access something like google.com:8080 it redirects internally instead of passing me to google.com. I’ve tried putting an input specifier there such as:
add action=dst-nat chain=dstnat in-interface=ether1-gateway dst-port=8080 protocol=tcp to-addresses=10.10.10.90 to-ports=8080
but then I lose the ability to have internal sites going to my.cooldomain.com:8080 properly reach it.
I’m trying to find a way to build this ability into one NAT rule vs having a special one. My external IP changes so I can’t hardcode an IP in there. If I could put a FQDN in there it would be easy but I can’t see how to do that.
Ideas?
Thanks.