gstanden / orabuntu-lxc

Developer and User Guide
https://gstanden.github.io/
GNU General Public License v3.0
46 stars 15 forks source link

Need to start building the GUI #70

Closed gstanden closed 3 years ago

gstanden commented 7 years ago

So I have the basic approach for adding custom networks worked out show below These steps accomplish the goal of establishing DNS lookups for an arbitrary new network xxx.xxx.xxx.xxx so that forward and reverse lookups will work. These steps will be part of the GUI being planned which will be used for adding new containers, networks, storage, etc. - the usual things.

The basic steps are:

(1) Add zone files in olive NS for the domain xxxxx.com (fwd.xxxxx.com / rev.xxxxx.com) (a) Can add the new static entries using "nsupdate" tool programmatically from the GUI. More information on how to use nsupdate is here: https://sites.google.com/site/nandydandyoracle/tools/nsupdate (2) Optionally these can be handled by dynamic DNS/DHCP but I haven't worked through that case yet. For now, this will be functionality for adding static networks where all IP assignments are static. (3) Once the zone files are added and have been checked with named-checkzone:

named-checkzone xxxxx.com /var/lib/bind/fwd.xxxxx.com named-checkzone xx.xx.10.in-addr.arpa rev.xxxxx.com

and all is verified working inside olive ns, then can move to the next step. (4) Add the domain (xxxxx.com) to the following files: (a) /etc/NetworkManager/dnsmasq.d/local for example add the following entries to the local file:

server=/xxxxx.com/10.207.39.2 server=/xx.xx.xx.in-addr.arpa/10.207.39.2

(b) Add the domain name to the crt_ovs_sw1.sh file For example it can be added to a variable SEARCHLIST which is used in the if-then as shown below. This could be done from a GUI to add new networks to Orabuntu-LXC.

SEARCHLIST="'xxxxx.com urdomain1.com urdomain2.com gns1.urdomain1.com'"

if [ $LinuxFlavor = 'Ubuntu' ] then sudo sed -i '/search/d' /etc/resolv.conf sudo sh -c "echo $SEARCHLIST >> /etc/resolv.conf"

fi

(5) Once all these steps are done, a reboot can be done for them to all take effect. Optionally, although I haven't tried this out yet, it should be possible to have the settings take effect by simple restarting openvswitch service sw1 as shown below.

sudo service sw1 restart

which should update the /etc/resolv.conf with the added domain xxxxx.com in the "search" parameter of /etc/resolv.conf file.

Once this is all done, the DNS forward and reverse for the new network xxx.xxx.xxx.xxx is completed and forward and reverse lookups should be tested.

If now containers are going to be put on this new network, then it is also necessary to create a new switch on the LXC host that will provide the networking on that subnet. Those steps are basically to take the crt_ovs_sx1.sh and modify it to support a new network.

I'm still working on how to get WAN www networking established on these new networks (not working yet - even with iptables setup).

gstanden commented 3 years ago

Closing.