How can one forward a port to a hostname and port. I was looking at this post: Iptables forward all traffic to a specified port, to another device and see how to do it port to ip but what if I need to do port to hostname? Tried putting in a host as the destination but it throws in error in iptables
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination ehb-us-redis-001.ehb-usredis.u1.cache.com:6379
iptables v1.4.21: Bad IP address "ehb"
Try `iptables -h' or 'iptables --help' for more information.