Quote from
cetasam on August 6, 2019, 7:50 am
Hi all,
We had a shared MySQL server (MariaDB) running Ubuntu 18 that we wanted to port to an Antlet on our EdgeLinux host. This was actually quite trivial, other than a change to Ubuntu which I wasnt prepared for.
Let me know if there is a better way / best practice in the comments.
Thanks!
Expose Antlet to LAN
If you are creating an Ubuntu 18 container and want to expose it to your LAN, there are a few changes you need to consider. Basically, the /etc/network/interfaces file is no longer used - and it is replaced with something called netplan.
Below are the instructions you need to follow to get your Ubuntu 18.04 container on to your LAN.
- Log in to AntMan
- Add a Bridged Network Adapter to the Container
- Force Stop the Container (stopping the container does not seem to work)
- Re-start the Container
- Log into the Container via SSH
- Check the names of all network devices and remember the name of the new device (eg. eth1). To do this, run the command
ip a
- Add the following text to this file:
/etc/netplan/20-br.yaml
network:
version: 2
renderer: networkd
ethernets:
eth1:
addresses:
- 192.168.5.200/24
gateway4: 192.168.5.1
nameservers:
addresses: [192.168.5.1, 8.8.8.8]
- Remember to replace the device name (
eth1
) and address (192.168.5.200
) - also change the gateway and DNS if required.
- Save changes to the file
- Test the file using
netplan try
- If this works, apply your changes using
netplan apply
If this worked, you should now be able to access the container from your host LAN.
Remember, if you are trying to access MySQL or similar, you will need to make the service listen on all IP addresses - as it defaults to just localhost.
Hi all,
We had a shared MySQL server (MariaDB) running Ubuntu 18 that we wanted to port to an Antlet on our EdgeLinux host. This was actually quite trivial, other than a change to Ubuntu which I wasnt prepared for.
Let me know if there is a better way / best practice in the comments.
Thanks!
Expose Antlet to LAN
If you are creating an Ubuntu 18 container and want to expose it to your LAN, there are a few changes you need to consider. Basically, the /etc/network/interfaces file is no longer used - and it is replaced with something called netplan.
Below are the instructions you need to follow to get your Ubuntu 18.04 container on to your LAN.
- Log in to AntMan
- Add a Bridged Network Adapter to the Container
- Force Stop the Container (stopping the container does not seem to work)
- Re-start the Container
- Log into the Container via SSH
- Check the names of all network devices and remember the name of the new device (eg. eth1). To do this, run the command
ip a
- Add the following text to this file:
/etc/netplan/20-br.yaml
network:
version: 2
renderer: networkd
ethernets:
eth1:
addresses:
- 192.168.5.200/24
gateway4: 192.168.5.1
nameservers:
addresses: [192.168.5.1, 8.8.8.8]
- Remember to replace the device name (
eth1
) and address (192.168.5.200
) - also change the gateway and DNS if required.
- Save changes to the file
- Test the file using
netplan try
- If this works, apply your changes using
netplan apply
If this worked, you should now be able to access the container from your host LAN.
Remember, if you are trying to access MySQL or similar, you will need to make the service listen on all IP addresses - as it defaults to just localhost.
lancem has reacted to this post.