What is a good strategy for accessing an API which is limited to a static IP Address from Heroku? - http

I need my app to be able access an third party API who limits access based on a single, static IP Address.
Due to the dynamic nature of the Heroku dynos and routing mesh, this is not possible - I'll need something with a fixed IP Address to act as a proxy.
An US East EC2 Linux/Nginx instance would seem the sensible choice, but these seems like a lot of work/maintenance for something pretty trivial. Does anyone know of any services out there that do this?

Ok so after a bit of research I've discovered the best way to do this currently is indeed with an AWS US East EC2 instance running some sort of proxy. I've gone with linux/nginx.
I've also learned there is a Heroku add-on currently in alpha stage of development that will handle exactly this requirement. If you'd like to test it, get in touch with Heroku support.

You can also use the Proximo add-on to get a static outbound IP address via proxy without any of the maintenance headaches.

Related

How to make My PC work as Host Server?

I have an ASP.NET web application that has been hosted in IIS local Machine.
My Question is :
Is there any free or paid method that allows browsing this web
application from the internet as Host Server ?
Thanks
The easiest way to to publish it directly onto the internet. You do run the risk of attackers then being able to attach your machine, so you will need to brush up on your security skills. It might be worth looking into one of the free hosting options from AWS, Azure or Google Cloud.
To use your local machine as a web server, first, configure it to use a static IP. Its been a while since I've done it on windows, but this looks about right http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/.
Next you will need to configure port forwarding on your model. You want to send all traffic on port 80 to your machine, using its new fixed IP address. If your using HTTPS as well, configure port 443 to go to your machine. There are too many different modem brands, all of which handle this slightly differently, to consider offering any more help on this. You will need to do some reading up on your particular modem for step-by-step instructions.
If your internet connection is using a fixed IP, then you can stop here.
If not, or if you just want a domain name, then its worth signing up for a dynamic dns service. I use No-ip, its free, it integrates with my modem and I haven't had any problems with it in the last few years. Once this is in place, you will be able to hit your webserver just like a real one. Using something like "http://mypc.no-ip.biz/mydemoapp/
But again, be warned about exposing your machine on the internet. There are nasty people out there who love to hijack other peoples computers.
Update:
This should give you some guidance on port forwarding
http://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/
Try http://www.noip.com I just logged in and it seemed happy. Otherwise, have a click through all the settings in your modem looking for ddns or dynamic DNS. There is usually a drop down of all the providers that it will talk to. And some providers have apps that you run on your PC , which is easier that working with the modem for some. (Or for models that don't support ddns.)

meteor based websites can't be accessible from corporate networks

I built 2 apps based on meteor for big clients - MAN and BMW Denmark. Unfortunately both can't see apps (just white screen in browsers) from own internal networks. I able to see it, my partners able to see it, issue somehow happened only from their[bmw and man] networks. I think somehow it's related to their firewalls or any kind of security settings/services, but it's impossible to get any info from their tech. department. What kind of issues could be the reason of this scenario? I'm 100% sure it's related to meteor only, 'coz old-school solutions (Django-based) works fine from same domain. And it's not related to exact apps 'coz 'em works on any another browser outside of corporate networks.
If it's not the port as suggested, the IT group may have restrictions in place, like an aggressive web filter or strict site whitelisting. Speaking from my team's experience inside a large corporation, we even have trouble building our apps behind the firewall because of the package checks with every server refresh. We get the same thing with NPM and bower.
What do see happening if you run Fiddler? Blank screens can be due to a bad request.
We had a situation similar to yours and the issue was related to the F5 load balancing appliance stripping HTTP headers and the corporate network using a proxy server. The header we lost was the X-Forwaded-for causing issues when going through the corporate proxy server. We had to troubleshoot with their IT to resolve it.
Compare the Fiddler trace from outside the corporate network with one from within the corporate network.
If it works outside the corporate network, the issue is probably something like I'm describing above.
It's most likely defaulting the websocket port to something other than 80/443. A lot of corporate firewalls block traffic on ports other than 80 & 443.

How to connect to localhost with DSL IP forward

I'm trying to connect to wamp from other computer.
I have a tp-link TD-8811. Is there any way to open my localhost from out
also i dont have a static IP.
A quick look at the specs for your TP-link device show that it is capable of DMZ and Virtual Server configurations. Please see here for a Step-by-Step: http://www.tp-link.com/en/article/?faqid=205 I input your model number in the search and came up with this article. I hope this helps.
There are many options for accessing a dynamic IP from outside.
Almost all services that do CNAME aliases for dynamic IPs offer both free and paid services. I never felt the need to pay for a service that i only used occasionally... The paid packages are usually geared to make your life easier.
Look at: no-ip.com -or- dyndns.com -or- google: "connect to dynamic ip address" and take your pick from the results.
After all of this is done, I'd seriously consider setting up (as an absolute minimum) a quick and dirty encrypted channel for your security. Your Router does not support IPsec/VPN, but that doesn't mean that you cannot ssh to your computer (regardless of host/client OS). There are also port-knocking methods to "speak" to your PC's firewall and instruct it to open your desired data port. You'll need to forward a few more ports from your router to get this set up, but if you'll achieve a closed system that you can open and close again on demand.
Apologies for the non-howto style of this answer, I hope it helps.

Debugging ASP.NET application in a networkless environment

I get a
Stack Trace:
[SocketException (0x2af9): No such host is known]
System.Net.Dns.GetAddrInfo(String name) +471
when trying to debug an ASP.NET web site on a laptop that has no network interfaces connected.
It is logical since no DNS server is present to resolve the localhost GetAddrInfo call. How do I work around this issue and allow myself to debug web site in a disconnected environment?
I'm a pretty dedicated "hack great things on long plane flights" guy. The long term answer is you design the app to work in a disconnected environment. This is tougher with today's apps that tend to rely upon public internet services to function. Then again they are putting wifi on planes.
Anyhow, specific advice is hard to give as the important question is "why are you hitting the external host in the first place". If you only have a a limited number of sites it reaches out to and it can handle not being able to talk to the external services in question you could use the windows hosts file to provide your own local DNS services. You could probably fake some more things behind that. But that does not scale well in general.
You could add a virtual network card. That should bypass the problem with the DNS. Here are few options on doing that:
How do you create a virtual network interface on Windows?

Subdomains. How do you do development with subdomains?

I am currently building an web app which also utilizes websockets. (Rails for webserver and Nodejs for socket.io)
I have structured my application to use subdomains to separate between connection to the Nodejs server and the Rails webserver. I have "socket.mysite.com" redirected to the Node server and everything else to the webserver.
I am able to test this functionality on localhost. I simply modified my /etc/hosts to include the following:
127.0.0.1 socket.mysite.com
127.0.0.1 mysite.com
I know that on production I simply have to generate a CNAME record for socket.mysite.com and this will also work on my users' computers.
However, I am accustomed to testing my application by passing an IP address around. My team typically set up the server on our own machines and do development. When we want to test our individual servers, we just pass around an IP like "http://123.45.123.45".
With the new subdomain hack, this is no longer possible without modifying each of my tester's /etc/hosts. I honestly don't expect my testers to modify their /etc/hosts on the spot. What I can do is have each member of my team have their own domain and create the appropriate CNAME records for each individual team member.
Is there an easier way to allow me to run my app on an IP and just pass that IP around?
It sounds like your needs have scaled beyond the days of just simply editing a host file. While you could continue to have everyone on your team continue to edit host files, there are two main risks that I see here:
For your idea to just use IP Addresses, you risk missing something in testing that you wouldn't see unless you were on production, as the issue may be dependent on something in the domain configuration.
For using host entries, you introduce a lot of complexity and unnecessary changes to each developer and tester's configuration, which of course leaves the door open for mistakes, and it also takes time that will add-up over the long term.
Setting up a DNS server may be helpful in your case. You could map a set of domains for each developer that match a certain pattern so that your application will still run correctly. This would allow you to share the URLS without having to constantly reconfigure each person's computer. Additionally, marketing and sales stakeholders can easily view product demos as well, without needing to learn what the elusive host file is for.
If you have an IT department, they can help you setup the DNS. However, if you are a small team without a real IT department, some users have found success using DNS systems designed for home or small office networks.

Resources