Square v2 Server Error - square-connect

I am testing with the v2 C# payment example.
https://github.com/petespatio/connect-api-examples/tree/master/connect-examples/v2/csharp_payment/PaymentExample
When i run locally everything works properly and i can actually create a payment.
When i try to run on my website (1and1 hosted), i get
error calling charge: unable to connect to the remote server
Does anyone know what has to be done to allow this connection?
Regards

Have you tried pining the server you are connecting to? That's a good place to start. Try:
ping connect.squareup.com
To see if you can connect at all. If you can't ping the server, it might be a firewall issue on your server.
1&1 has information about setting firewall rules on their hardware firewalls for their dedicated linux servers here:
https://help.1and1.com/servers-c37684/dedicated-server-linux-c37687/system-security-c37699
and information on setting firewall rules for their cloud servers here:
https://www.1and1.com/cloud-community/learn/networking/firewall/
Hope this helps!

Related

Let's Encrypt NET::ERR_CERT_INVALID

I'm trying to setup HTTPS to some of my company's web services.
Currently I have several web services sharing the same public ip address proxied by a firewall (all allowing both 80 and 443):
web1.company.net
web2.company.net
web3.company.net
and so on...
I have SSH access to these VMs only when connected to the company's VPN.
I tried setting up let's encrypt with auto renewal with 2 different docker images (and both are giving the same "error"):
jwilder/nginx-proxy + jrcs/letsencrypt-nginx-proxy-companion
https-portal
After completing the setup, if I'm connected to the VPN, the HTTPS works perfectly (I basically see the closed lock next to the link).
Whenever I disconnect the VPN connection and test the same website I get the following:
I also tried to check the certificate chains.
When I'm connected to the VPN I get the correct certificate chain:
When I'm not connected to the VPN I believe, I don't:
Any clue on what can cause this? Maybe the firewall doesn't know how to proxy the request because part of what it needs is encrypted and it doesn't know how to decrypt it? I'm a total newbie in this.
All help is appreciated and thanks in advance.

How to set up Distributed Jmeter on AWS with Windows

I am trying to set up my JMeter master/slave set up on AWS EC2 instances using windows. Out of the box integration didn't work (connection refused errors) and after some investigation I got to know that RMI communication only works if the machines are on same subnet (is this true?). I found this great article and I tried to follow it as is on windows (tried running ssh port forward tunneling via cygwin) but not have any luck. So I was hoping if someone already done this with Windows and can share their experience.
Out of the box integration didn't work (connection refused errors) and
after some investigation I got to know that RMI communication only
works if the machines are on same subnet (is this true?)
It is not necessary. Even if the machines are in a different subnet and addressable via the network, RMI should work. Here make sure the Security Groups and NACLs are properly set so that both EC2 instances can communicate with each other via the network.
You can check whether you can ping(For this you need to enable ICMP in your Security Groups and also make sure other needed ports are opened for RMI) from one EC2 instance to another. If the servers can communicate with each other, then you need to troubleshoot internal firewall configuration in windows EC2 instances.
We have used https://testable.io/ AMI's from the marketplace. It takes care of all configuration and just needs to worry only about testing and the results.
https://aws.amazon.com/marketplace/pp/B073JNTVKP
All our endpoints are secured to certain IP-ranges from testable.io. If you have internal, still you need to setup those security settings.
Hope it helps.

Can't connect to Tigase server running on EC2 Instance: Connection Refused

After installing Tigase on an AWS EC2 instance I keep getting the error message 'connection refused' when I try to connect to it using an xmpp client.
The instance is attached to a security group with rules to allow traffic to the necessary ports (tigase needs 5223 primarily and some others for more exotic features). I've also tried it with rules allowing all traffic to all ports from all sources but I still get the same message.
I've also checked iptables because I noticed some people needed to configure those as well in specific cases, I made sure it allows all connections but still I can't connect to Tigase.
Yes Tigase is running, there are no relevant errors in the Tigase logs
SSH (port 22) and HTTP (port 80) work fine
Enabling ICMP (ping) on all ports works fine
I've tried several xmpp clients, same problem
I've deleted and recreated instances several times
Re-installed Tigase on fresh instances several times with various configuration options
Tried using domain name associated with Elastic IP, normal IP and tried public DNS directly.
Configured the DNS in the way necessary for Tigase as described here
I've looked everywhere and have not been able to find anything to fix this. Networking isn't my main area of expertise and I'd really appreciate any advice.
Wow, in case anyone runs into the same problem in the future, turns out that this was related to the AMI. I was using an Amazon Linux AMI and switched to Ubuntu Server 14.04 LTS. I wish I tried this sooner but I didn't really consider this a possible solution earlier. Apparently Amazon Linux doesn't play well with Tigase.

FTP on Windows 2008 r2 on Google Compute Engine

I'm having difficulty setting up FTP to my new Windows 2008 R2 Server on the Google Compute Engine. I've tried to follow the basic steps here: Can you use FTP with Google Compute?
I need deeper help with more of a step by step approach with details as to where to enter IP ranges, IP addresses, etc.
I've setup many FTP servers on Windows before, but with this one FileZilla gives me the error of "ECONNREFUSED - Connection refused by server". I've even tried to setup Anonymous FTP to no avail. It seems that it is not even reaching the server, so I'm fairly certain it's a firewall issue.
I've tried to open a passive range of tcp:5000-6000 on both the Google Network's firewall rules and my Windows Firewall on the server. Port 21 is open in both.
Incidentally, WebDav is working well, although that's probably because http and https are opened when setting up the server. Also, I know FTP is insecure. I have no choice in that matter.
Really baffling. Thank you.
List firewall rules on all instances
gcloud compute firewall-rules list
https://cloud.google.com/compute/docs/operating-systems/windows
Add allowed ips to RDP firewall rule
gcloud compute firewall-rules create rdp --allow tcp:3389 --source-ranges CIDR_ADDRESSES
https://cloud.google.com/compute/docs/operating-systems/windows

Set up a simple go server in a webhost

I wanted to set up a simple go server in a webhost. I acquired a domain mydomain.com and hosted it using Bluehost. Now, going through the Go tutorial, I went through this example http://tour.golang.org/#59 and it works fine on my machine. Now, instead, I want to make the HelloWorldServer work when I call mydomain.com:4000 or some other port.
What I did was ssh to my server at bluehost, install go there, then compile the server and run. But then I try to access mydomain.com:4000 and it is not found. I also tried to change "localhost:4000" to just ":4000". any ideas how to make it work ?
Any help or pointers are appreciated. (some more details: it is a shared-hosting account)
This is due to the firewall on your BlueHost server not having ports (including 4000) open on a shared hosting account, Firewall Port Restrictions
If you want to do some simple (and not so simple) web hosting, why don't you look at Google App Engine

Resources