LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-14-2016, 03:51 PM   #1
knottulf
LQ Newbie
 
Registered: Oct 2012
Posts: 22

Rep: Reputation: Disabled
Open port 443, ufw, via ssh


Hi
I have a problem with a virtual ubuntu 14.04 lts server I control via ssh login. I try to install Lets Encrypt certificate, which ends with this msg:

urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Failed to connect to 217.170.205.92:443 for TLS-SNI-01 challenge

Port 443 obviously is not open. How to open it? It seems the answer is ufw, which I had to install, but when enabling it, I am warned that this might interfere with existing ssh connections, which is exactly what I use to communicate.

Now, what do I do then?

I propably don't fully understand the roles of apache, acme and what service or whatever shall listen to the certificate issue's testing.
 
Old 11-14-2016, 04:17 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
https://help.ubuntu.com/community/UFW
should be something like
Code:
sudo ufw allow https
Restarting by addition to ufw rules usually issues a Warning.
Never had trouble with ssh when I saw it.

Last edited by Habitual; 11-14-2016 at 04:18 PM.
 
1 members found this post helpful.
Old 11-14-2016, 11:33 PM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Quote:
Originally Posted by knottulf View Post
It seems the answer is ufw, which I had to install, but when enabling it, I am warned that this might interfere with existing ssh connections, which is exactly what I use to communicate.
In addition to opening the port for HTTPS, be sure the port for SSH is open before you enable UFW.

Code:
sudo ufw status verbose
If SSH (22) is not already open, then you need to open it before turning on UFW.

Code:
sudo ufw allow ssh
Otherwise you will be locked out of SSH the moment you turn on UFW.
 
1 members found this post helpful.
Old 11-14-2016, 11:42 PM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
There is also no reason to install ufw to "open" a port.
Unless you already have a firewall rule rejecting ir dropping such traffic, then the port is already "open"

More likely something using it already (webserver?), so stop that before running the LE client or maybe read the instructions.
 
Old 11-14-2016, 11:52 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Have you configured Apache to listen on port 443/HTTPS?

Last edited by astrogeek; 11-14-2016 at 11:54 PM. Reason: Meant https
 
Old 11-15-2016, 05:25 AM   #6
knottulf
LQ Newbie
 
Registered: Oct 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Cool Good!

I found this ufw howto:
https://ubuntuforums.org/showthread.php?t=823741

Started with
Quote:
sudo ufw allow ssh
sudo ufw default deny
sudo ufw enable
Still my shell worked (aaahh!)
But port 80 blocked: no webpages served

then
Quote:
sudo ufw allow 80
webserver working!

Then installing the letsencrypt certificate.

Working! :-)

Thanx!
 
Old 11-15-2016, 05:32 AM   #7
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,307
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Ok. Port 80 (http) and port 22 (ssh) are working for you. You'll also need to open port 443 (https) to use your Let's Encrypt certificate.
 
1 members found this post helpful.
Old 11-15-2016, 05:55 AM   #8
knottulf
LQ Newbie
 
Registered: Oct 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Ok. Port 80 (http) and port 22 (ssh) are working for you. You'll also need to open port 443 (https) to use your Let's Encrypt certificate.
Have done. Works :-)
 
  


Reply

Tags
letsencrypt, port, tls



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH Over Port 443 | Doesn't Work ! Benygh Linux - Newbie 5 03-16-2013 01:41 PM
cannot use ssh with port 443 as proxy bogwato Linux - Networking 2 07-15-2009 04:20 PM
SSH on port 443? nsusa Linux - Newbie 1 11-08-2005 08:53 PM
SSH on port 443 Randvegeta Linux - Networking 4 09-25-2005 06:17 AM
ssh over port 443 pupton Linux - Software 18 10-08-2004 07:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration