Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: smeerbartje on November 07, 2008, 11:59:47 AM

Title: Create pinhole in Firewall
Post by: smeerbartje on November 07, 2008, 11:59:47 AM
At the excellent Wiki pages, I see this page (http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual#Managing_the_firewall) which describes how to make a pinhole in the firewall in order to run certain deamons on the server itself. Is this better then adding a portforward for the same port to 127.0.0.1... which also does the job.
Title: Re: Create pinhole in Firewall
Post by: cactus on November 07, 2008, 02:32:05 PM
At the excellent Wiki pages, I see this page (http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual#Managing_the_firewall) which describes how to make a pinhole in the firewall in order to run certain deamons on the server itself. Is this better then adding a portforward for the same port to 127.0.0.1... which also does the job.
This is the advised way (as you are quoting the developers guide, the guideline for development of SME Server) for public services running on the server itself, port forwards are a work around for it IMHO if they are pointing to localhost.
Title: Re: Create pinhole in Firewall
Post by: smeerbartje on November 07, 2008, 02:46:38 PM
Okay, thanks for your quick reply. But is it possible to retrieve a list of all pinholed rules?
Title: Re: Create pinhole in Firewall
Post by: mmccarn on November 07, 2008, 04:29:34 PM
Raw dump of configuration database for all services:
Code: [Select]
db configuration print | grep "=service"
List of service names for all services that have "access=public" and "status=enabled":
Code: [Select]
db configuration print |awk -F"[=|]" '/\=service.*public.*enabled/  {print $1}'
Raw dump of configuration database for public, enabled services:
Code: [Select]
db configuration print |awk -F"[=|]" '/\=service.*public.*enabled/  {print $_}'
Title: Re: Create pinhole in Firewall
Post by: smeerbartje on November 07, 2008, 04:38:31 PM
Cool, thanks!!