Adding A Proxy Device

I would like to expose Juju GUI running in a container to the local network. To do that I need to proxy traffic coming to the host interface connected to the local network to the container interface on which Juju GUI is listening.

I added a proxy device without a problem but nobody is listening. :confused:

snap install
tracking:        edge
installed:       git-8c3633c (5451) 44MB -

Create a container lxc launch ubuntu:xenial xen1
Add proxy device lxc config device add xen1 proxy0 proxy listen=tcp:192.168.50.196:80 connect=tcp:10.0.10.88:80 bind=host
Check if device is there

$ lxc config device show xen1
proxy0:
  bind: host
  connect: tcp:10.0.10.147:443
  listen: tcp:192.168.50.196:443
  type: proxy

Connection refused

$ wget https://192.168.50.196/
--2018-01-20 01:06:38--  https://192.168.50.196/
Connecting to 192.168.50.196... failed: Connection refused.

Nobody is listenining on 443

$ sudo netstat -tulp | grep 443
tcp6       0      0 [::]:8443               [::]:*                  LISTEN      24878/lxd       

I canโ€™t find any meaningful information in logs.

From log:

tail: /var/snap/lxd/common/lxd/logs/juju-1caef8-1/proxy.proxy0.log: file truncated
Listening on tcp:192.168.50.196:443 in 24878, forwarding to tcp:10.0.10.147:443 from 12226
Re-executing proxy process
lxd: error while loading shared libraries: liblxc.so.1: cannot open shared object file: No such file or directory

Bug report: https://github.com/lxc/lxd/issues/4186

This might be the issue.

I tried as well the same, and got the exact error.

i dont prefer proxy.

You can merely not not create a proxy device and thatโ€™s it.
You can continue using iptables as always.

fixed in f30b697

1 Like