I have a host (10.21.45.160) and a lxc container (10.118.64.55). The container is running a NodeJS server at port 7001. On host console I can do the following with the correct response:
ubuntu@ubuntu-virtual-machine:~$ curl 10.118.64.55:7001/getProfiles
[“Pusher”,“admin”,“Fiscal de Sonda”,“Fiscal de Turno”,“Fiscal de SMS”]
I have to send http requests to the container, but I need to send such request by using host IP (10.21.45.160). It is just like a NAT from the host to the container, so in host I did:
lxc config device add tegra myport7001 proxy listen=tcp:0.0.0.0:7001 connect=tcp:127.0.0.1:7001
Now I can send http request, but it seams that the response is not coming back. On host console I receive the following:
ubuntu@ubuntu-virtual-machine:~$ curl 10.21.45.160:7001/getProfiles
curl: (52) Empty reply from server
Does any one has any tip of what might be going wrong?