Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 6245  / 3 Years ago, sun, november 14, 2021, 6:13:50

I'd like to use juju on my server at home to get to know juju and play with it. I have multiple computers and would like to access what's on the server from any of them. When I went through the tutorial it setup juju okay, but only exposed the services to the local machine. I want to expose them to the whole network. How can I do this?



Note: my server already exists and is running 12.04, I don't want to reinstall it using maas just to get juju working. I also don't want to run this "in the cloud" on ec2 or any other provider because I want to try this out on my own machine under my control on my network.



Edit:-




  • No firewall

  • No blocking, all ports open

  • Yes. All computers on the LAN (192.168.1.0/24) can see the server (homeserver.local) on 192.168.1.2

  • Pretty standard wired and wifi with one DHCP server dishing out IP addresses in the above range

  • Setup correctly (just started again from scratch) and followed tutorial Luis directed me to, here's the results:- http://paste.ubuntu.com/5714640/

  • juju status showed above.



So, all running okay, but the main issue is that the containers have IP addresses locally assigned on the server, which are only accessible on the server itself. While I could go around setting up ssh port forwarding all over the place to access the 10.x IP addresses from the 192.168.1.0/24 range, this seems overcomplicated and unnecessary. I'd like the containers exposed over my LAN.


More From » networking

 Answers
2

Ok, solved!



Setup bridged network br0 in /etc/network/interfaces.



auto eth1
iface eth1 inet manual

auto br0
iface br0 inet static
bridge_ports eth1
address 192.168.1.2
broadcast 192.168.1.255
netmask 255.255.255.0
gateway 192.168.1.1
bridge_stp off
bridge_fd 0
bridge_maxwait 0


Edit /etc/lxc/lxc.conf and set lxc.network.link=br0



lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up


Edit /etc/default/lxc and set LXC_BRIDGE, LXC_ADDR, LXC_NETMASK, LXC_NETWORK, LXC_DHCP_RANGE & LXC_DHCP_MAX appropriately for my LAN (192.168.1.0/24 type settings)
now juju status shows 192.168.1.0/24 addresses for my units and I can access them over the LAN from another machine



LXC_BRIDGE="br0"
LXC_ADDR="192.168.1.2"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="192.168.1.0/24"
LXC_DHCP_RANGE="192.168.1.50,192.168.1.99"
LXC_DHCP_MAX="49"

[#31758] Monday, November 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ousear

Total Points: 395
Total Questions: 114
Total Answers: 89

Location: Jordan
Member since Thu, Aug 5, 2021
3 Years ago
ousear questions
Tue, Sep 27, 22, 03:29, 2 Years ago
Thu, Nov 25, 21, 00:51, 3 Years ago
Tue, Feb 22, 22, 17:47, 2 Years ago
;