Connecting between Azure VMs by name - azure

I have two Azure Windows VMs on the same Vnet.
The second is a clone restored from a backup of the first, and I have changed its computer name, let's say I have called them vmOriginal (10.0.0.4) and vmClone (10.0.0.5).
I am testing communications between them using telnet to an open port on the other, as the simplest case.
This is successful in both directions using their local IP addresses.
vmOriginal can also telnet to vmClone by name.
But vmClone cannot telnet to vmOriginal by name (Could not open connection to the host, Connect failed).
How do I go about troubleshooting this?

Well this almost unbelievable. Turns out the problem was the Computer Name was too long (the ones I used above were for clarity only).
For Azure VMs, the computer name must actually be a maximum of 12 characters (even though Windows allows 15 when you set it in the Control Panel).
There is no warning about this from Azure.
For vNet DNS, Azure adds a domain to the computer names that is 51 characters long, which I guess represents the local vNet. It looks something like:
rifmvhdprmqxsebj4n0m6vnd2d.qx.internal.cloudapp.net
Adding the separator dot, there is only 12 spare characters allowed for the computer name.
Any longer than that, and the total expression will exceed the 64 character limit of DNS entries, meaning the computer will not be found in DNS and cannot be referenced by name on the network.
There is a feedback submission here which explains this exact situation, it's the only thing I found after hours of searching that put me on the right track.
https://feedback.azure.com/forums/216843-virtual-machines/suggestions/10197480-the-azure-vm-internal-dns-domain-names-are-too-lon
I don't understand why this problem isn't more widely known. Or better still, alerted in the Azure portal.
Or best of all, as the responder above points out, it should not be allowed to happen at all.

Related

What's the danger in DNS nameserver downtime?

I am thinking about hosting my own nameservers.
Two different IPs are required for this, and generally it is expected that these will be two different machines because downtime of one's DNS nameservers is evidently "bad".
But I can't find anywhere that will actually tell me the consequences.
If I am running a number of domains on a single server that has close to 100% uptime, is it really a big deal if I run my nameserver on that machine (I have two+ IP addresses that point to that server).
Can someone tell me what the worst case failure is, apart from possibly the DNS being down for a few hours after a downtime for the machine?
If all your name servers are unavailable for a longer period than your zone TTL, your zone will disappear from the Internet. Until at least one name server is brought back online, the zone will not exist. Mail sent to your domain will bounce, attempts to reach your web servers will make the browser go "Nope, no such site" and so on.
Since most people have a domain because they want to use it for something, it ceasing to exist is generally regarded as a problem.

Windows Active Directory Domain setup remotely through univention using samba4

I have a slight problem bit of the back story. recently ive been trying to test out univention which is a linux distribution with the goal of being able to replace Microsoft active directory.
I tested it locally and all went reasonably well after a few minor issues i then decided to test it remotely as the company wants to allow remote users to access this so i used myhyve.com to host it and its now been setup successfully and works reasonably well.
however
my main problem is DNS based as when trying to connect to the domain the only way windows will recognize it is by editing the network adapter and setting ip v4 dns server address to the ip address of the server hosting the univention active directory replacement. although this does allow every thing to work its not ideal and dns look up on the internet are considerably longer. i was wondering if any one had any ideas or have done something similar and encountered this problems before and know a work around. i want to avoid setting up a vpn if possible.
after initially registering the computer on the domain i am able to remove the dns server address and just use a couple of amendments to the HOST file to keep it running but this still leads to having issues connecting to the domain controller sometimes and is not ideal. any ideas and suggestions would be greatly received.
.Michael
For the HOST entries, the most likely issue is, that there are several service records a computer in the domain needs. I'm not sure, whether these can be provided via the HOST file or not but you'll definitely have authentication issues if they are missing. To see the records your domain is using issue the following commands on the UCS system.
/usr/share/univention-samba4/scripts/check_essential_samba4_dns_records.sh
For the slow resolution of the DNS records there are several points where you could start looking. My first test would be whether or not you are using a forwarder for the web DNS requests and whether or not the forwarder is having a decent speed. To check if you are using one, type
ucr search dns/forwarder
If you get a valid IP for either of the UCR Variables, dns/forwarder1, dns/forwarder2 or dns/forwarder3, you are forwarding your DNS requests to a different Server. If all of them are empty or not valid IPs then your server is doing the resolution itself.
Not using a forwarder is often slow, as the DNS servers caching is optimized for the AD operations, like the round robin load balancing. Likewise a number of ISPs require you to use a forwarder to minimize the DNS traffic. You can simply define a forwarder using ucr, I use Google on IPv4 for the example
ucr set dns/forwarder1='8.8.8.8'
The other scenario might be a slow forwarder. To check it try to query the forwarder directly using the following command
dig univention.com #(ucr get dns/forwarder1)
If it takes long, then there is nothing the UCS server can do, you'll simply have to choose a different forwarder from the ucr command above.
If neither of the above helps, the next step would be to check whether there are error messages for the named daemon in the syslog file. Normally these come when you are trying to manually remove software or if the firewall configuration got changed.
Kevin
Sponsored post, as I work for Univention North America, Inc.

Azure virtual network - How to change localnetworksite address space?

I need to change the address space prefix in my virtual network configuration. How can I do this?
<LocalNetworkSites>
<LocalNetworkSite name="xxx-xxx-DC">
<AddressSpace>
<AddressPrefix>xx.xx.15.0/24</AddressPrefix>
<AddressPrefix>xx.xx.67.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>xx.xxx.xx.xx</VPNGatewayAddress>
</LocalNetworkSite>
</LocalNetworkSites>
Your extract shows the local network definition whilst your question seem to refer to the virtual network itself, but actually it doesn't really matter as the answer is the same - You can't change the address space for either on a created network.
You will have to
Export the configuration
Make the changes you require (make sure to change subnets as well)
Delete the network
Re-create the network by importing the modified configuration
Re-deploy your services
Yossi,
Is this a Microsoft supported solution?. The reason I ask is apart from having to create the vm's I also have to change the config on the local vpn side as the IP address of the gateway and shared key changes. Fortunately I only have 3 vm's but lets say I had 20, this would not be a sustainable solution at all.
I agree with user3120398 that this is not a viable and sustainable solution and it still seems to be modus operandi more than a year later :-(

Slow website even though VPS is up and running

Sorry if this is a bit of a newbie question, but I am quite new to VPS and the relatively more complicated set up. I have a VPS set up, and every day or twice a day the site loads for a bout 10 minutes with no luck. Then when it comes back on line its fine after that. Upon logging on to Plesk, the server is up and running, very low CPU usage (0.10 and drops to 0.00 after a few minutes) and around 18% RAM usage.
The MySQLAdmin loads up fine.
So it seems the VPS is running fine.
Is there maybe another reason? The domain is with Daily.co.uk and the VPS is with LCN.com. Could there be another problem somewhere? On daily.co.uk, there are two nameservers set. ns0.etc*** and ns1.etc***. I did a tracert on windows cmd, this traced down to the server, with two timeouts.
I also tried a check on http://dnscheck.pingdom.com/ while the site was slow and this came back fine, except this: Too few IPv4 name servers (1). Only one IPv4 name server was found for the zone. You should always have at least two IPv4 name servers for a zone to be able to handle transient connectivity problems.
Any help would be appreciated. I have tried searching but with no luck.
The recommended diagnostic check for the issue you are experiencing is called a DIG.
On your Windows system, this check is not intrinsically available, but it can be downloaded from http://members.shaw.ca/nicholas.fong/dig/
Once you have installed it, you'll want to run it from the command prompt with the following syntax:
C:> dig -insert your domain here- +trace
This will show you how DNS resolution is happening from your location to the requested end point. Chances are, the error you received is correct. Most DNS setups have several name servers to assign to your domain registration to allow the round-robining of delegated name servers in the event that one becomes unresponsive.
My personal recommendation would be to outsource the DNS to a managed provider. Doing so will increase the availability of the zone, and reduce latency.

Random DNS Client Issue with BIND9/Windows Server 2003 DNS

Within our office, we have a local server running DNS, for internal related "domains", (e.g. .internal, .office, .lan, .vpn, etc.). Randomly, only the hosts configured with those extensions will stop resolving on the Windows-based workstations. Sometimes it'll work for a couple weeks without issue on one machine, then suddenly stop working, or it'll happen on another 15 times per day. It's completely random for all workstations.
When troubleshooting, I have opened up a command prompt, and issued various nslookup commands for some of these hosts, and they resolve, however I've been told that nslookup uses different "libraries" for name resolution than other applications such as web browsers, email clients, etc.
The only solution thus far, is manually restarting the Windows DNS Client on each workstation when this happens. Issuing the ipconfig /flushdns command multiple times helps every now and then, but is not successful enough to even attempt before restarting the DNS Client.
I have tried two different DNS servers; BIND9, and Windows Server 2003 R2 DNS, and the behavior is the same.
We have a single Netgear JGS524 switch all workstations and servers are connected to within the office, and a Linksys SR224G switch in another department with workstations attached.
In this particular situation, it appears that Windows will randomly start using a secondary name server instead of the primary, even if the primary is available.
My solution: remove the secondary. This is not a great solution as it obviously will kill the whole name resolution if this single name server goes down, but given this network is small and name resolution isn't mission critical (read: it can go down for an hour), this solution is acceptable.

Resources