Windows Azure VPN public access - azure

I created a VM in a VPN in Windows Azure. I added TCP endpoints for the particular machine which runs server 2012. But everytime I run a small program listening on TCP like the example in nodejs, any client simply refuses to connect. This happens even when I disable the firewall? I tried with linux (ubuntu) too. Can someone help me out and let me know what steps I am missing? I connected with:
server1.cloudapp.net:tcp_port
RDP and SSH work fine through TCP.

Here are a few things to check, which may provide more clue.
1) double check your endpoint, make sure the public port and private port are set correctly
2) rdp to the VM and do "netstat -an" to check if the port is indeed listening

Related

Access Azure VM from behind a NAT

So I am pretty new to all of this and currently learning about ssh and NAT.
So I have a VM setup on Azure and in order to connect to it I need to ssh into it. But the problem is I am unable to ssh into it because I am behind a NAT as I am currently studying in a University, hence getting "connection timed out" error all the time.
Also I have tried changing the default port(22) to 443 or 80 still same error which confirms I am behind a NAT.
So currently the only way to ssh is to use a VPN which works fine.
But after researching a bit I found that I can also use Reverse SSH Tunneling to achieve the same but couldn't figured out a way of how to do it. I know it is a bit riskier than using a VPN only but anyway just wanted to try.
So can anyone help me?
An outgoing SSH connection (your machine -> Azure VM) should not be affected if you are behind a NAT. NAT usually blocks incoming SSH access to your machine not out from it.
Also I have tried changing the default port(22) to 443 or 80 still the same error which confirms I am behind a NAT.
You changed the default port on which machine, you or the Azure VM? Changing the default port on your machine will not affect the outgoing SSH connection as it is only for incoming SSH connection to the SSH server on your machine (if you have one running locally).
Your best bet would be to actually look at the security groups of the Azure Virtual Network you VM is located in. Make sure it allows incoming SSH connection on port 22 to your VM.

Virtual server port forwarding

local connection
Nmap scan of public ip address
Open Port Check Tool result
Virtual server configuration
I have a linux machine on a dekstop with arch linux installed that I use as a server running Apache2 (it works perfectly fine locally), and I want to use port forwarding to access it from the public ip address.
I tried using the router's virtual server service, so I redirected my local to port 2112 of my public ip address, I already used http://www.portchecktool.com/ to scan the port, and it says that the port is open whenever I enable it (I tried changing the port number many times, 443, 22, 5555...). But when I try to connect, it says 'Unable to connect'.
(Even thought the port scanner tool says the port is open on my public ip, when I scan my router's port with nmap it says it's closed)
I know I didn't provide many details, but is there something that I'm missing ?
EDIT:
It seems that the problem only occurs locally, which is why the nmap and port checker results are different, I asked a friend of mine to connect to my public ip address on port 2112, and he told me that it's working fine, and that he could see the page, why does this problem occur ? Why can I access it from outside LAN but not from the inside ?
There are a few parts to this answer:
To keep it simple I am going to assume a few things as you did not specify too many things.
What you have
Ubuntu Server VM running on your Windows machine
What you are trying to do
Connect to the VM (running Apache2) to view a website on the server via your public IP
If either of these are incorrect let me know
Ensure you first have port-fording setup on your main router to go to your Windows machine local IP. Open the correct port that your Appache2 server is running on.
Ensure you have opened the correct port on your windows machine firewall to allow that inbound traffic
Change the network settings for your VM to bridge the connection

AWS EC2 Error: The site can't be reached - ec2.us-west-1.compute.amazonaws.com took too late to respond. Deploy NodeJS

I currently have an EC2 instance up and running with Amazon Linux running and transferred my project (which contains both React/NodeJS/Express) onto the EC2 instance via SFTP using FileZilla.
For the EC2's Security Groups, I opened a port for 3000 (protocol: tcp, source: 0.0.0.0/0), which is how my Express is defined as well.
So I sshed into EC2 instance and ran the project's Express, and sees it listening to port 3000 within the terminal. But once I hit the Public DNS with ec2...us-west-1.compute.amazonaws.com:3000, it says The site can't be reached - ec2...us-west-1.compute.amazonaws.com took too late to respond.
What could be the issue and how can I go about from here to connect to it?
Thank you in advance and will upvote/accept answer.
Just check if your Node.js server is running on the EC2 instance.
Debugging:
Check first if It working locally properly.
Check for the node.js server in EC2.
sudo netstat -tulpn | grep :3000
try to run server with --verbose flag i.e npm run server --verbose
it will show logs of the server while starting.
Check for the security group Setting for the EC2 instance.
try to connect with the ip:port i.e 35.2..:3000
If still it not working and response taking long time.
that means some other service is running on the same port.
try this in ec2:
sudo killall -9 node
npm run server
And connect with using IP(54.4.5.*:3000) or public DNS (http://ec2...us-west-1.compute.amazonaws.com:3000).
Hope It will help :)
You may be encountering an issue with outbound traffic. You may be inside a company's network, either physically connected or VPN'd in. In some instances, your VPN isnt set up to handle split traffic, so you must abide by your company's outbound restrictions.
In a situation like this, you would want to use a proxy to access your site. when locking down your security group, make sure you use your proxy's public IP (not your company's).
Usually, when we have connectivity issues, it is something basic or a firewall. I assume you have checked whether a firewall is running on either end, eg. iptables -L -n. Also, any protocol analyzer like wireshark or tcpdump would tell you where packets to port 3000 are visible.

Amazon Nodejs webserver

I'm getting stuck here, so i have an amazon ec2 (standard redhat server) host up and working. i can connect to it personally no problem, however it cannot be connected to outside of my ip.
I've checked the rules and i have port 80 and 3000 open to 0.0.0.0/0 to be able to communicate, however outside of my computer (and computers in this network) i can not connect.
Everything I've found is about connecting to ssh which works fine, i have no rules in iptables, i haven't dealt much with them before, but since i can connect to the service i don't think its the issue.
summary:
Web server is running, i can connect from my computer to it, and any others in my local network, but nothing outside of it works.
i do have httpd installed as well as a simple forward from the browser to port 3000, however i cant connect to it either from outside my network.
so this is a new one for me, the dns forwarding works in houst, but not outside. so inside and outside here, i can use IP address to connect, but inside only i can connect with my dns lookup. not sure what caused this, but its not an amazon problem at least. going to look at that side.

Azure virtual server RDP re enable after shutdown

I've stopped my virtual server and then started it.
after restart i lost the ability to access remotly to my server (rdp).
i have the needed end point for remote access but is still not working.
i have tried to :
1) delete end point and re-create it.
2) scale up my server forward and backward.
still it look like it can be two things:
1) rdp service after server start is down
2) no firewall rule is created.
notify that after server was started it's IP Address was changed!!!
Thanks
Use server name not IP, as IP may change.
Make sure that you use external port specified in the endpoint.
Make sure that your private port is set to 3389.
Make sure TCP is selected as the protocol.

Resources