I am trying to set up a reverse proxy on my ubuntu 14.04 host so that I can run multiple websites, each in their own LXC container (one day docker but one step at a time). In this example the sites/hostnames are:
The containers were created with the names ubuntu1 and ubuntu2.
When I try to set up iptables to forward to these hostnames with the following command:
sudo iptables -t nat -A PREROUTING -d ubuntu1.mydomain.com -j DNAT --to-destination 10.0.3.xxx
(10.0.3.xxx is the ip address of the container on the lxc bridge 10.0.3.1) I get the following error:
iptables v1.4.21: host/network `ubuntu1.mydomain.com' not found
Is there a way to workaround this?