Everything is working again as it was before
This is how I manage to login with my domain-name
I’ve been using the default DNS Server for years so the setup was relatively easy for me.
This can only be done if you already have the DNS Server running otherwise you need to setup DNS Server first.
A simple walk through
1. create a view call and it e.g. LAN
2. Limit source IP service with your NAS IP range (e.g. 192.168.1.0/255.255.255.0)
3. Tab Select Zone, select your Zone ID (the first master zone you already have)
4. Go back to Zone and create a new master zone for your domain, but this time with the IP range of the VPN e.g. (10.8.0.1)
5. Then go back to Views and create a second view e.g. VPN
6. Tab Select Zone, select your Zone ID (the second master zone you just created)
7. Limit source IP service with your NAS IP range (e.g. 10.8.0.1/255.255.255.0)
8. Next you need to add the IP of your VPN Server to the config file (see example)
Code:
dev tun
tls-client
<your_remote_server> 1194
# The "float" tells OpenVPN to accept authenticated packets from any address,
# not only the address which was specified in the --remote option.
# This is useful when you are connecting to a peer which holds a dynamic address
# such as a dial-in user or DHCP client.
# (Please refer to the manual of OpenVPN for more information.)
#float
# If redirect-gateway is enabled, the client will redirect it's
# default network gateway through the VPN.
# It means the VPN connection will firstly connect to the VPN Server
# and then to the internet.
# (Please refer to the manual of OpenVPN for more information.)
redirect-gateway def1
# dhcp-option DNS: To set primary domain name server address.
# Repeat this option to set secondary DNS server addresses.
dhcp-option DOMAIN example.com #<<<==== add here your domain
dhcp-option DNS 10.8.0.1 #<<<==== add here your vpnservers ip
pull
9. import the new config file to your clients and if al goes well you can now login with your domain-name instead of the IP address.
Hope this helps