IP address set to static, cannot get connection to server - azure

I set my server with static IP address from the Network and Sharing Center. My server is an Azure VM. After setting it with static IP, i lost connection to my Machine. I check from the portal.azure.com, the server status is running but i realize that the network out dropped to 0MB.
I can't remote desktop to the server, I tried restart the server from Azure, but it doesn't come back alive (At this point i mean i can't remote desktop to it).
What can i do next? Is that's all? I just screw up my server?
Please help! I believe there's some miracle to let it get back to life.

This link describes the correct way to set internal private static IP addresses to azure VMs (using Powershell). You can try the step "How to remove a static internal IP from a VM" but I'm not sure if it will undo the change you've made within the OS - did you try shutting down the VM completely and restarting it?
ps- this question probably suits Server Fault rather than Stack Overflow.

Sorry for late reply. Didn't notice this question until now.
Actually, the server is no longer accessible after setting the IP address. Later then I found out you shouldn't set a static IP for an Azure VM. It should be assigned by DHCP.
So.. lesson learn i guess.. :I

Related

Switching VMs and The Static IP

I recently changed the VM im running CentOS on to a new one, and everything works fine. Except that recently i face problems starting gogs, a self hosted git server, with the following error. As the erorr states, there is a problem with ip, apparently my old VM ip is still hardcoded somewhere in the VM, and this is the old ip im getting below.
Are there any linux configuration i should be aware of to update my new ip on the VM, knowing that ifconfig gets me the right ip, the new one.
Take a look at http://gogs.io/docs/advanced/configuration_cheat_sheet.html
You'll need to edit the file custom/conf/app.ini and change the value of HTTP_ADDR
Thanks to #Etan Reisner, I checked the /etc/hosts file on the system and made sure that host and dig from the new system return the correct IP address.

Windows Server 2012 with IIS can't connect to it's own public IP

I encountered a very strange issue I've seen more often but could workaround. A VPS with Windows Server 2012 on it and IIS installed is unable to access its own webpages by its public IP.
When I open up Internet Explorer on the VPS and goto localhost, I see the default IIS page. Whenever I try the public IP, it times out.
If I access the same IP from another PC, I can also see the IIS page.
I've tried pinging to my public IP from the VPS, this works. I then tried to disable my firewall all to no avail.
Has someone encountered this before? And more importantly: Did you manage to fix it and if so, how?
Most likely then this is a NAT issue caused by how the NAT gateway/router is configured your connections go via. I'd recommend talking to your host and confirming whether this is the reason and if they are willing to do anything to resolve it. That might be difficult if it is a limitation of the router or done for security reasons that they are unwilling to change.
Running some Wireshark traces should be able to confirm what is happening.
You may be able to resolve it your self with Split DNS and the use of a domain name rather than direct to an IP address. Why do you need to use the IP specifically?
Read serverfault.com/questions/216569/cant-ping-static-ip-from-internal-network-only-from-outside for some further insight.

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.

Windows Azure VM RDP issue

I followed this
http://blogs.technet.com/b/keithmayer/archive/2013/04/17/step-by-step-build-a-free-sharepoint-2013-lab-in-the-cloud-with-windows-azure-31-days-of-servers-in-the-cloud-part-7-of-31.aspx#.UX_iF7XvvQI
I created a VM using the datacentre Image it created successfully and the status shows Its running. I am trying to RDP It says
Remote Desktop cant connect to the remote computer for one of these reasons:
1) Remote access to the server is not enabled
2) The remote computer is turned off
3) The remote computer is not available on the network
make sure the remote computer is turned on and conencted to the network and that remote access is enabled.
I did check the endpoints the public port is open and also 3389 private port is open too. I did try with different release one with latest patch and the other with the second latest OS patch but I am still not able to RDP.
Thanks
Yeah I already figured out firewall in my organization is blocking it. I did update the answer but it did not show up I am trying again :)
Make sure your VM has reached the "Running" status. If it's still in one of its pre-running statuses (such as Provisioning), you won't be able to RDP.
Also: Be sure you don't try logging in with 'Administrator' (the default in the rdp login box). Choose localhost\yourusername.
I had a similar problem the other day. It was solved by going to the Azure Portal, selecting the VM Dashboard, then clicking "Connect" in the grey toolbar at the bottom. This will download an RDP file that contains the correct connection settings. You can then send that rdp file to others who you would like to give access to.
I just opened one of the files used to connect, and it looks like the only real difference is the port used.
full address:s:[vm name].cloudapp.net:62808
username:s:Administrator
prompt for credentials:i:1
I am not sure if all Azure VM's use 62808, but the default RDP port is 3389 so just copying the DNS from the Dashboard into the RDP address will NOT work without adding the correct port.
One more thing folks should check when having trouble connecting is password length.
I thought I would be all secure by using a guid for a password. RDP worked fine from home (on older XP RDP client), but not from office. At first I thought it was a firewall issue. After verifying with the IT guys that I had full outbound access, I looked a little closer at the RDP error message.
It was saying my credentials were rejected. Finally, I created a second account on the VM and gave it RDP access. I was able to log in fine. The only difference between the two users was this time I didn't bother with a long password.
So I shortened the password on my main account and got in with no problem. I'm not sure what the limit is, but it seems to be less than 32.

bind ip to subdomain

i have a linux client which uses pppoe to connect to the internet and
everytime this client comes online I wanna bind his ipadress to a subdomain.
dyndns is not an option due to their TTL.
It looks like i have to setup my own nameserver on my root server to accomplish this task because I cannot create the keys needed to run an nsupdate on the client with a provider nameserver... am I correct?
If so is there a good Howto for setting up a bind server for this specific task?
I havent ever maintained pppoe but if it uses dhcp to provide the ip address to the client, you could do updates from the dhcp to the dns.
Instructions on how to do this for debian here: http://www.debian-administration.org/article/Configuring_Dynamic_DNS__DHCP_on_Debian_Stable
Do not thou that you can adapt these to other distros too. You can find the same software atleast on fedora and ubuntu, difference is only how you install the required software.
One posibility is to set their machine to register with somebody like DynDNS. They have all the software you need to automatically notify them when they come online/go offline. This will give them a domain name of something like whatever.homelinux.org (it does not really matter). You then put static CNAME entries in your DNS to point your nice domain names eg southern.company.com to point to whatever.homelinux.org.
When they come online the domain will start to resolve and stop when they go off line since DynDNS have low TTL for this very reason. You can use large TTL in your zone file since the CNAMEs will not change.
Well dont you just need to create an A-Record for this IP on your DNS Server?
If your domain is 'google.com' and you wanted your host to be called 'server1'. Create an A-Record for 'server1' and point it to your machines IP.
Unless I am misunderstanding what you are asking for help with.

Resources