I've read through a bunch of documentation but I'm not sure of a few things, so I'm looking for some tips before I mess up my office. Thanks in advance!
Here's our setup in a small office:
1. Internet comes in to an ASUS RT-AC1900P WIFI router and then to a simple switch. We have 5 Windows workstations plus employees bring in their own laptops and connect to the WIFI.
2. I built a FreeBSD 11.4 box with Apache, PHP, MySQL and it runs backup versions of several web sites. The main web sites are hosted elsewhere in a data center.
- domain1.com goes to the main site and backup.domain1.com goes to the FreeBSD box in our office. Both sites are available publicly.
- same with domain2.com and domain3.com
3. The internet in the building goes out frequently. We're working on solutions for that, but I'm gonna stay on topic. =)
- MY GOAL is for backup.domain1.com, backup.domain2.com, etc to still work in our office when the internet is down.
- I know I can edit the hosts file on each workstation but that won't fix the laptops brought in from outside
- I also don't want to worry about keeping all the hosts files updated and so on
So, I was thinking of doing the following on the FreeBSD box:
- add the following to /etc/resolv.conf:
- install unbound and enable it in rc.conf
Finally, in the ASUS router, put 192.168.1.12 (the local IP of the FreeBSD box) in LAN > DHCP Server > DNS Server
Am I on the right track? Did I forget anything?
Since all of the backup.domain*.com sites are on the FreeBSD box AND they are registered domains and subdomains, I shouldn't need to add the domains to any hosts files right? Or do I need to add them in the FreeBSD box's hosts file like:
and so on??
Thanks!!
Here's our setup in a small office:
1. Internet comes in to an ASUS RT-AC1900P WIFI router and then to a simple switch. We have 5 Windows workstations plus employees bring in their own laptops and connect to the WIFI.
2. I built a FreeBSD 11.4 box with Apache, PHP, MySQL and it runs backup versions of several web sites. The main web sites are hosted elsewhere in a data center.
- domain1.com goes to the main site and backup.domain1.com goes to the FreeBSD box in our office. Both sites are available publicly.
- same with domain2.com and domain3.com
3. The internet in the building goes out frequently. We're working on solutions for that, but I'm gonna stay on topic. =)
- MY GOAL is for backup.domain1.com, backup.domain2.com, etc to still work in our office when the internet is down.
- I know I can edit the hosts file on each workstation but that won't fix the laptops brought in from outside
- I also don't want to worry about keeping all the hosts files updated and so on
So, I was thinking of doing the following on the FreeBSD box:
- add the following to /etc/resolv.conf:
Code:
search domain1.com domain2.com domain3.com
nameserver 127.0.0.1
nameserver 8.8.8.8
- install unbound and enable it in rc.conf
Finally, in the ASUS router, put 192.168.1.12 (the local IP of the FreeBSD box) in LAN > DHCP Server > DNS Server
Am I on the right track? Did I forget anything?
Since all of the backup.domain*.com sites are on the FreeBSD box AND they are registered domains and subdomains, I shouldn't need to add the domains to any hosts files right? Or do I need to add them in the FreeBSD box's hosts file like:
Code:
127.0.0.1 backup.domain1.com
Thanks!!