When you want to access a local server in your home network, it's handy to use domain names for that. Unfortunately, in some cases, the same server has a public and private IP both sharing the same domain name. Thus, defining them in your public DNS with your public IP, could make it impossible to access the same server locally. Still, if you want to use the FQDN instead of the IP name, you can define the domain name with local IP in your Unifi Security Gateway.
- Login via SSH to your Unifi (SG) and enter your admin password.
ssh -l admin 192.168.x.1
- Switch to become root
sudo -i
- Edit the hosts file and add an entry for the local server
vi /etc/hosts
192.168.x.10 yourserver.domain.name
- Test on another machine if the domain name gets resolved as expected
MacBook-Pro:~ user$ nslookup host.domain.name
Server: 192.168.x.1
Address: 192.168.x.1#53
Name: host.domain.name
Address: 192.168.x.10
No comments:
Post a Comment