Koozali.org: home of the SME Server

Close external port 80 - leave 443 open?

Offline purzel

  • *
  • 19
  • +0/-0
Close external port 80 - leave 443 open?
« on: July 11, 2015, 11:50:55 AM »
Hi there!

I've found the http://wiki.contribs.org/Firewall#Open_Ports_in_Private_Server.2FGateway_Mode tutorial, but config setprop httpd-e-smith access private closes both Web ports, config setprop httpd-e-smith access public opens both.
I want to close port 80 only, leaving 443 open for public. How to?

And, how to close external port 25 - it stays open whatever I try (e.g. config setprop smtpd access private)

TIA
purzel
« Last Edit: July 11, 2015, 11:52:44 AM by purzel »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Close external port 80 - leave 443 open?
« Reply #1 on: July 11, 2015, 12:06:57 PM »
you need a custom template or a firewall in front of your server (set up in server only mode)

in any case, please explain what you're trying to achieve, thank you

Offline purzel

  • *
  • 19
  • +0/-0
Re: Close external port 80 - leave 443 open?
« Reply #2 on: July 11, 2015, 12:26:11 PM »
I've installed SME 9.0 in Private Server / Gateway mode using an ADSL internet connection.
Since there are so much external tries to access nonexisting files (looks for me like attack tries) via normal HTTP. I hope to reduce those tries by closing port 80. BUT I want to acces my SME myself from outside via HTTPS.

Offline mmccarn

  • *
  • 2,653
  • +10/-0
Re: Close external port 80 - leave 443 open?
« Reply #3 on: July 11, 2015, 02:48:16 PM »
Changing the value of 'TCPPort' on my SME8 server disables remote access on port 80 while leaving https available on port 443.  This command does not reconfigure apache to listen on port 81 so access on that port is also unavailable.

Code: [Select]
config setprop httpd-e-smith TCPPort 81
signal-event remoteaccess-update

This solution leaves port 80 open to the local network.