Saturday, May 16, 2015

ubuntu - SSL connection refused




I'm getting "Connection refused" errors for some sites being served over SSL on my Ubuntu box (10.04 LTS). It doesn't affect all sites: https://github.com/, for example, loads no problem, but https://codeeval.com does not.



I've checked my firewall settings, and there are no rules affecting connection to sites over port 443. But running nmap yields the following:



$ nmap -sT -r -n -p443 codeeval.com

Starting Nmap 5.00 ( http://nmap.org ) at 2011-06-22 11:25 BST
Interesting ports on 184.72.48.116:
PORT STATE SERVICE
443/tcp closed https


Nmap done: 1 IP address (1 host up) scanned in 1.31 seconds


To check that it wasn't a problem with the site, I SSH'd into another computer on my local network and ran the same command, this time getting:



$ nmap -sT -r -n -p443 codeeval.com

Starting Nmap 5.00 ( http://nmap.org ) at 2011-06-22 11:37 BST
Interesting ports on 184.72.48.116:

PORT STATE SERVICE
443/tcp open https

Nmap done: 1 IP address (1 host up) scanned in 0.53 seconds


There's clearly something wrong with my local config, but I can't work out what might be causing it. I haven't been able to track down any meaningful log messages; the only response when I try to connect is "Connection refused."



Does anyone have any insight into what might be causing this?


Answer




Actually, I've found the solution. I followed the advice here - SSH Connection refused - which I assumed to be an unrelated problem.



Clearing the IP tables and resetting the rules fixed my problem.



EDIT - A follow up:



I've also determined what caused the problem, though I'm now looking for a long-term solution. It would seem that the changes made to my IP tables made by software called IPBlock persist even after the application process has ended. The only way I can seem to prevent this is by flushing the tables after I quit IPBlock. Does anyone have any better suggestions?


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...