Write failed: Broken pipe - linux

i was accessing a vm from a server ip . today i changed that vm ip to a different ip.but while restarting network it showed
Shutting down interface eth0: Write failed: Broken pipe
after that i am not able to access the old ip as well as the new ip i assigned.i think it shutted down the eth0 interface . so i am not able to access.so how to reset that vm network configuration now from server ip??? i am not able to ssh now to that vm from server as well .
note: i ahve a server ip.i am doing ssh to that ip first.then i was doing ssh to a vm ip. i was not able to access directly the vm from outside. so i was configuring that vm to a new ip for outbound access.

Related

How to ssh to Azure VM using private IP address from internet

I'm new to Azure. Just deployed an Ubuntu VM but thought I'd only create a private IP address, no public IP.
How do I ssh from my laptop at home to the Azure VM using the 10.x.x.x IP address?
I've tried:
Using the Azure Cloud Shell but connection just times out
Using ssh on my laptop, but its looking for the VM on my LAN and times out.
You can't SSH from your local machine to your VM with a private IP because your machine isn't in the same network as the VM. You would only be able to SSH to the VM from another VM on the same virtual network.
In order to SSH to your VM from outside of the vnet you will need a NIC attached with a Public IP and the default port of 22 open on your Network Security Group.
Edit: because I couldn't find a relevant document for this I wrote a blog post. https://medium.com/#joelatwar/how-to-ssh-to-your-azure-linux-vms-with-username-and-password-from-windows-linux-or-mac-df7d07ea3be1
I have found some other way working.
Temporarily attach the VM with private ip address under a public azure lb, configure a nat rule for ssh in the load balancer.make sure you have allowed the ssh from inside vnet in the nsg where the vm is attached.
SSH into the public load balancer ip and you will be able to access the internal machine via azure load balancer ip.
In the meanwhile there exists Azure Bastion which could help you.

My Virtual Server Linux Dosen't connect to internet

I Have Virtual server That My App is connected this and webService is on there
app can connect and get data and i can connect to that by vnc-Viewer or ...
but
server can not connect to internet or any website
please help me
There are two option for VM.
1. linux
2. window.
Linux :- check and find the ip has connected to ethernet port and also entry to /etc/resolv.conf.
nameserver 8.8.8.8
nameserver 8.8.4.4
then start the network service using command service network restart(centos-6) and also start sshd service for outside ping.
Window:- in window case you have to check that remote setting has enabled.
window property - > remote setting.
then ping the ip outside the network, it may be work

Unable to ping VM outside windows Azure

I followed the following link to create the azure instance
http://michaelwasham.com/2013/09/03/connecting-clouds-site-to-site-aws-azure/
I am able to ssh to the VM from my local machine, however I am not able to ssh or ping from the VM to any public servers (www.google.com, www.yahoo.com).That is the communication is happening only between VMs within the Windows azure Cloud.
Please let me know how to enable outbound traffic to public servers from Windows Azure VM.
ICMP is blocked by default (see this SO post: ping google.com or 8.8.8.8 fails) for the Virtual IP Address
But with the new instance level public-ip address, you will get an ip address per virtual server:
https://azure.microsoft.com/documentation/articles/virtual-networks-instance-level-public-ip/
Now ping works (ping 8.8.8.8) after a reboot of the VM in my case.

How to connect to a webserver hosted on vmplayer guest os?

I am running a webserver (eg: tomcat7) in vmplayer guest, with NAT and I am able to view the webserver from guest using it's hostname:port but host browser is unable to connect to this webserver. Any idea? Is there any specific network configuration that needs to be done for host to connect to guest?
Note: I used ifconfig and got ip address from eth8, but ping request times out all the time.
VMWARE player network settings screenshot
Update
I also had to add entries in both machines hosts file for DNS
Change the network settings to use Bridged. That will connect to your router and get an IP off DHCP which your Host will be able to see. NAT is using your host address.

Connection to azure virtual machine public port is timed out

I am using Azure Virtual Machine (Windows Server 2008 R2 image) provided from the gallery and created Public port and private port using the portal. I did remote log in to VM and I run a TCP server application inside VM (TCP server binds to the private port of the VM). Problem I face is that I can not connect it through the public IP and port (from external machine). I have created a inbound rule in VM's Firewall, where I enable connection to the Private port of VM. I tried recreating the VM, also the new ports. Still problem persists. One more thing I observed is that my TCP Client is able to connect to RemoteDesktop port of the VM also the PowerShell port. But does not connect to the port that I created through the portal. Pls suggest what can be wrong?
Note: I also observed some weird behavior. I enabled all ports for my TCP Server app in Inbound rule of firewall and found that some unknown IP (was similar to azure internal IP) is connecting to my server. Why it is happening?
I would like to understand as to how you are trying to connect with the Virtual Machine, using RDP or trying to test the connectivity, for example, using Port Ping.
Endpoints for RDP and Powershell are configured by default. So if you are trying to connect using Remote Desktop, you can directly connect to the VM using MSTSC from Run and provide the IP of the VM followed by the Port Number using the below format
xx.xx.xx.xx:3389
However if you would like to test the connectivity to the VM, I suggest you to use Port Ping instead of ICMP ping since ICMP traffic is blocked by the Azure load balancer and the ping requests timeout. While Ping.exe uses ICMP, other tools such as PsPing, Nmap, or Telnet allow you to test connectivity to a specific TCP port.
On the other hand, after creating the VM, you can add endpoints additionally as needed. You can also manage incoming traffic to the public port by configuring rules for the Network Access Control List (ACL) of the endpoint.
The private port is used internally by the virtual machine to listen for traffic on that endpoint.
The public port is used by the Azure load balancer to communicate with the virtual machine from
external resources. After you create an endpoint, you can use the network access control list
(ACL) to define rules that help isolate and control the incoming traffic on the public port. For
more information, see About Network Access Control Lists.

Resources