We’re a small company, and we have 100/100 fiber at the site now. We have a bunch of low-traffic services that we’d like to run on-site, but the price of a static IP from the local telco is a fortune.
So I’m thinking of doing a hybrid setup:
$5/mo VPS with:
- Postfix that receives mail and holds it until fetched via POP3.
- Nginx that serves static web pages, but not media or anything database.
- Authoritative Name Server for our domain, that gets updated when the server at the office pings it.
On the local network:
- IMAP server that holds mail forever after fetching from the VPS with Fetchmail. Public access at imap.company.com for iPhones, laptop at a coffee shop etc.
- Web server that serves media to the public.
- Database / Web Application server that serves dynamic content to the public (PHP/MySQL).
- LDAP (LAN Access Only)
- NFS (LAN Access only)
- Asterisk/Phones. Public access at sip.company.com.
- A local DNS Server? Authoritative?
So we need a couple things for DNS to work out with this:
We need a DNS server that can run on the offsite VPS and get some of it’s IPs updated from a ping.
We need a DNS server that runs on the LAN and returns internal addresses. ie. 192.168.1.1 for nfs.company.com.
The LAN DNS server should return different IPs for things that are both LAN and public. ie. when imap.company.com is queried from outside, return the public IP of the fiber modem, but when queried from on the LAN, return the local address.
So I’m trying to figure out:
- What software choices are best for this? (FOSS/Linux)
- What configuration makes sense. Try to mess with views on BIND for private/public? Sync with Master/Slave? Or is it less work to have two DNS servers that are unaware of each other, one on the LAN (for LAN IPs) and one public (for public)?