Unable to access some specific GET calls on a port - networking

I have a Virtual Machine which is deployed on a Windows server. I have a custom port let's say 1100 on which some web APIs are called. Those APIs are accessed internally and externally as well. But there are some GET commands which are giving ERR CONNECTION RESET on the same port when accessed externally. i.e. the same commands are working internally on the VM and as well as on the server but when we try to access it from outside the network it gives an error. Other Calls/APIs are working very well on the same port 1100.
What steps do to make it executable?
Note I am using the Mikrotik Firewall behind the server
Any help would be highly appreciated.

Related

Accessing localhost API endpoint from different machine

I have a pressure sensor plugged into my computer, and the only way to collect the data is through a localhost API endpoint, meaning right now only that machine can collect data. Is there any way to receive data from the localhost API on a different machine? I also need to ping the API 20-40 times a second if that matters.
There are couple of ways I can think of, I am assuming both the machines are on same network
Use localhost API to collect the data in database and create a GET endpoint inside same application for fetching the data according your parameters. You can access GET endpoint from different machine by hitting network ip address of your local machine. Which you can check using ifconfig command in your terminal, check en0 type where you will find something like 192.168.X.X. From other machine you can hit http://192.168.X.X:<port>/getData, where <port> is the localhost port.
If you don't want to use database, then you can use publish subscribe mechanism which is real time. see http://autobahn.ws/python/
How publish subscribe works ?
You will have to make your localhost machine a publisher (server) which will publish events or sensor data in your case (real time). The other machine will be subscriber (client ) which will listen to the events from your server and do necessary processing.
Its uses WAMP (Web application messaging protocol) for communication. The sample code for basic publisher and subsriber can be found here.
Follow steps:
1 : Download ngrok,
2 : Go to the path where ngrok.exe file present and open that path in cmd.
3 : Connect your account.
paste : ngrok authtoken1pA6advIt950uA4y2Rixgc8rdx9_23MSDokKjWhbPUW3NSrZK
4 : Replace your port no including bracket.
paste : ngrok http {9003} -host-header="localhost:{9003}".
5 : copy forward line and paste in other system to check.
Forwarding http://d1c0bc16ff7b.ngrok.io

Cannot connect (via http) to IIS app on Azure VM

I have created a SQL VM on Microsoft Azure and it's been like a walk in the park:
I was able to connect via RDP all the time. I installed an app to IIS and it was working ok.
Now, i wanted to connect from the outside world, but Chrome just gives me the page is not available error.
My DNS name is sqlmilos.cloudapp.net.
I took down windows firewall on windows server.
IIS is bound to port 80.
As I understand I connect to my VM via cloud service which was created at the same time as VM, and it has same dns name: sqlmilos.cloudapp.net
That cloud service has 2 input endpoints (shown in dashboard):
SQL : 23.102.171.184:5986
SQL : 23.102.171.184:63907
That 63907 port is for RDP and it's working, obviously.
I thought maybe I should bind IIS to 5986 port, just for test, but iis says that port is already used.
So, I was hoping that somebody could give me some pointers how to resolve this.
Best regards,
UPDATE:
I just realized that you can add you own endpoints to VM, so I added one for port 80, so now I have 3 ports open: 80, 5986 and 63907,
but I still cannot connect to application.

azure connect between azure myWebRole and nonazure server not working

My webapplication hosted on windows azure, needs to communicate with TFS Server. When any one login to my web app using live id, I want the logged in user to use my Team foundation server(TFS) credentials -username,password and domain to programatically authenticate and connect to our TFS server and create some work items.
I configured my azure connect for the communication to happen between azure WebRole and TFS server (our TFS is non-azure ).I added both the WebRole and the TFS Server into single Connection Group
In my azureportal ,I can see mywebrole and my TFSServer as connected the machine endpoint is active, and that it refreshes since the last connected updates
.But when I try to run my web application from azure and when it tries to communicate with our TFS server ,its throwing error message saying Error message : Team Foundation services are not available from server eg.,http://xyz-abcxyx-01:8080/tfs/eas/. Technical information (for administrator): The remote name could not be resolved: 'xyz-abcxyx-01'
Any suggestions to resolve this issue ?
You should enable remote desktop on your WebRole and connect to one of your instances. Then, try to ping the IP of your TFS server (not the hostname xyz-abcxyx-01). Maybe this is simply a DNS issue (even though using hostnames works with Windows Azure Connect).
If pinging the IP works, but pinging the hostname doesn't work you have a few options left:
Use the IP instead of the hostname. This won't work if you configured your TFS to use host headers.
Create an elevated startup task to modify the hosts file and map the IP to the hostname. In your code you can keep working with the hostname.
Try to modify the DNS server configured in your WebRole to use the default DNS server + your internal DNS server. But to me this doesn't look like a clean solution.
Anyways, in each solution you'll want to store the IP/hostname in the ServiceConfiguration and make sure your code supports changes to the ServiceConfiguration. This will allow you to change the IP/hostname without having to redeploy.
You should check if TFS server is listening on all network interfaces, include the one created by Azure Connect (start with 2a01). Next try to connect to TFS from a machine on the local LAN, just to make sure it is configured correctly. You don't need to use IP for referring to TFS, DNS name is definitely supported out of box.

trouble hosting asp.net on iis

I'm doing some test hosting of an asp.net program I created
I can access it fine from the local machine (both debugging and pointing the virtual directory to it)
I can also access (local) by using the localhost or using the ip
however when i get on a different machine on the same network (i can ping my machine)
I get the following error:
Connection Interrupted
The connection to the server was reset while the page was loading.
The network link was interrupted while negotiating a connection. Please try again.
Does anyone have any idea what I'm doing wrong?
Crash893
EDIT:
I have duplicate this question on serverfault.com
I would generally take a snapshot of the network traffic with Wireshark (or other network sniffer) and see what is happening on the wire. Compare this to a site that works. Windows firewall, a browser proxy, or some other network software may be at fault.

Accessing asp. net development server external to VM

Guys, been knocking my head against the desk (instead of the mac) for hours. I'm running VS 2008 in a parallels VM. I can access the development server in the VM if local host is used, if I use the designated ip for the VM or try to access it externally it does not work. All firewalls are off and I verified that I can access iis externally.
Any Ideas what could be wrong?
I ran into this same problem and am using a TCP tunnel to bypass it. Download this Java app & just tunnel the traffic back. No messing with IIS necessary!
http://jcbserver.uwaterloo.ca/cs436/software/tgui/tcpTunnelGUI.shtml
In command prompt, you'd then run the java app like this... Let's assume you want external access on port 80 and your standard debug environment runs on port 1088...
java -jar tunnel.jar 80 localhost 1088
Yes, it is by design. Consider using IIS instead.
The first answer is that you can't do it because the development server is specifically made to just run locally, otherwise it becomes a security risk.
The second answer is that you can get around anything, this hints that there is a way to do it using a reverse-proxy (but the post he links to seems to be dead)
EDIT : After viewing RichardOD's answer, I fear that my answer below is wrong and you can not access it using IP.
But I suggest you to go with deploying it to IIS.
The VS2008 internal web server ( which I guess is cassini ) creates a port for your app and runs a web server for your app on that port. If you want to access it from outside the machine you have to use that port in addition to IP.

Resources