Things that need doing
So I left for awhile. I've had 2 hard drive failures taking out my media server and my main internet box. Everything is dead. None of the stuff I have listed as working is in fact working anymore. I've decided to throw up my hands and start over from scratch. I'm going to publish this blog and start another.
freeipa - winner although it has been a pain to get workingldapdnshome directories- establish network
dhcp- upnp
- services
- exim
- imap
- mailing lists
- spamassassin
- media
- torrent
- plex
- web
- ssh
- yubikey
- external
- news
- social
- mastodon
- freenet
- diaspora
Router
The NAT stuff is kinda a pain on my mikrotik. But setting up NAT is from ip->firewall->nat Remember src-nat is outgoing dst-nat is incoming. Also annoyingly you have to know the IP, so you'll need to set up the dhcp with the IP hard wired.
DNS
*finally* I've been trying for days to get dhcp and dns to play nicely. The breakthrough was a couple of things.
- Make sure your permissions are correct on the key file.
include "/etc/bind/rndc.key"; needs to be readable by both dhcp and dns. And that belongs in the named.conf file. freeipa isn't enough. - The update permission is in the zone configuration of the dns zones. This is the magic config that makes it work:
grant rndc-key zonesub; - Don't be afraid to dump the leases on dhcp. To do that you:
- systemctl stop isc-dhcp-server
- rm /var/lib/dhcp/dhcpd.leases
- touch /var/lib/dhcp/dhcpd.leases
- chown dhcpd /var/lib/dhcp/dhcpd.leases
Adding a client to freeipa
- apt install -y freeipa-client sssd-tools autofs nfs-kernel-server
- ipa-client-install
- ipa service-add nfs/<client>.deepthot.int
- ipa-getkeytab -s services.deepthot.int -p nfs/<client>.deepthot.int -k /etc/krb5.keytab
- ipa-client-automount
- echo automount: files sss >>/etc/nsswitch.conf
- edit /etc/nsswitch.conf and put the sss first (there should be a better way)
Snapshots
- mount /dev/sda2 /mnt # mount root of btrfs on /mnt
- mkdir /mnt/snapshots
- btrfs subvolume snapshot -r @ snapshots/whatever
@ is the root file system's subvolume. This makes a read-only subvolume that is the state of the filesystem when the snapshot is taken. You could snapshot anything actually like @/etc to save just the etc before you do something unwise
- mount /dev/sda2 /mnt
- cd /mnt
- mv @ to @.bak
- btrfs subvolume snapshot snapshots/whatever @
I haven't tried this yet, but you probably would have to do a mount -o remount,rw / or something similar. Maybe a reboot to be safe.
DHCP
Since I set up a second IPA server I thought it would be good to make the dhcp redundant as well. https://kb.isc.org/docs/aa-00502 is what I'm going to follow.
After a bunch of grief due to me not paying close attention to the configuration (the peer ports change as well as the peer names) I got it working. Seems to work okayish.
After a bunch of grief due to me not paying close attention to the configuration (the peer ports change as well as the peer names) I got it working. Seems to work okayish.
No comments:
Post a Comment