This page was created when I physically moved my FreeBSD server from a lower-speed DSL connection in my home, to a high-speed data center co-location service. The assumption is that the box will be locked in a closet once configured, accessible only via the Intenet/ssh. This included new internet/DNS configurations.
We're assuming we're simply moving the machine from one IP
address to another, and changing it's name at the same time. We
are NOT changing the domain, only the server name within the domain.
Basically just a different IP.
However, the page has since been updated to handle basically the same
move as above, but now from an existing "almost" twin to the co-lo,
meaning a name change as well.
I'm choosing to change the name as I already have a name for that
co-lo address established in DNS. The idea is to minimize the
downtime during the move. I have a secondary, newer machine, which
has been configured as a twin of the primary, but with the latest
software, and a different subdomain name. I'll be moving this
secondary to the co-lo, and once it's all happy, then change it
over to being the primary, thus minimal interuption.
A few days before making the move:
dig PTR [your ip in reverse].in-addr.arpa/etc/namedb/<your-machine-hosts-file> and lower
TTL, expire, and refresh values to a few hours.A record everywhere for the
new IP address.include.)/etc/rc.conf with new gateway:defaultrouter=<ip-of-upstream-gateway>ifconfig_<device>=<your-new-ip>ifconfig_lo0_alias0="inet <your-old-ip>"./etc/resolv.conf with new DNS server(s).domain=<your-domain-name>nameserver=<your-server-ip>
Followed by the DNS server supplied by your upstream provider:nameserver=<upstream-provider-server-ip>/etc/resolv.conf file. (I think this is only an
issue if you are using DHCP which will not be the case in a co-lo'ed
public facing server.) If so, look for /etc/resolvconf.conf.
/etc/rc.firewall. If you're using a more
complex config. you may need to update onet
and oip.cd /etc/namednamed.conf: new IP into
sections allow-recursion, allow-transfer,
allow-query, listen-on, query-source,
initial 'controls inet' block.cd /etc/named/primarygrep <new-ip-addr> * (be sure to double-backslash the dots)named-checkconf -z | more/etc/mail/<your-system-name.mc>. You will almost certainly be changing:define(`confDOMAIN_NAME',
`<testdomain.example.com>') to drop the
'testdomain' part (assumes of course we're the new master). There
may also be DAEMON_OPTIONS; be sure to regenerate and place .cf file.access, local-host-names, relay-domains, aliases./usr/sbin/makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable/usr/sbin/makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable/usr/bin/newaliasescd /usr/local/etc/apachehttpd.conf; at the very least you'll be dropping
the test-subdomain name from the ServerName
declaration./* layers until you've checked
all files including below this dir (don't forget to double-backslash
on dot), and fix anything. You'll certainly be changing the IP
address in all virtual domains.httpd -Scd /usr/local/etc andgrep <old-ip-addr> *cd /etc and do the same grep'ing there./etc/passwd (use vipw) I put my system
name into the root entry instead of that stupid "charlie"/etc/ftpchroot and
possibly /etc/ftpuser may need to be brought
across.service sendmail stopservice imapd stopservice mailman stopservice saslauthd stopservice mysql-server stopbring down: /usr/local/etc/mail/spamassassin/local.cf This file need not be merged, just ftp in/var/spool/ (imap email store) imap howto/usr/local/etc/sasldb2.db (see imap howto)shutdown -h nowHowever, if things don't go perfectly... through a monitor and keyboard at the console:
ifconfig commands.ping somebody in the
outside world (or in some way prove that the network is
working).ssh inbound./etc/rc.conf with the final
ifconfig.ssh in remotely, even after a powerfail reboot.